Skip to content

armgit / hypit

Public Imported from GitHub
0

Clone any viral video with AI agents. Not just a script, the whole workflow: swap the face, the words, the B-roll, ship 100 variants in one command, and get your 100M views.

refactor: simplify extension boundaries and runtime presentation

kashorin75f3e752b79a
diff --git a/docs/quickstart/composition.md b/docs/quickstart/composition.md
index 47300e69..2db10154 100644
--- a/docs/quickstart/composition.md
+++ b/docs/quickstart/composition.md
@@ -148,9 +148,9 @@ The complete data flow from Script to rendered video. This example is based on
<space:Frame id="speech-frame" within={vertical}
left="0%" top="0%" right="100%" bottom="100%"/>
<space:Frame id="title-frame" within={vertical}
- left="6%" top="6%" right="6%" bottom="84%"/>
+ left="6%" top="6%" right="94%" bottom="16%"/>
<space:Frame id="card-frame" within={vertical}
- left="10%" top="20%" right="10%" bottom="30%"/>
+ left="10%" top="20%" right="90%" bottom="70%"/>
<!-- 3. Timing: assemble spine and align words -->
<speech:Spine id="speech" frame-rate="30"
diff --git a/docs/quickstart/styles.md b/docs/quickstart/styles.md
index f6978bd6..65dc6dc7 100644
--- a/docs/quickstart/styles.md
+++ b/docs/quickstart/styles.md
@@ -199,7 +199,7 @@ Position remains an explicit graph edge:
```svml
<space:Frame id="product-frame" within={vertical}
- left="8%" top="20%" right="8%" bottom="32%"/>
+ left="8%" top="20%" right="92%" bottom="68%"/>
<media-track:Item video={product-motion.video}
during={story.selection.demo} frame={product-frame}
appearance={studio.media.product} motion={studio.motion.product}/>
diff --git a/docs/quickstart/tracks.md b/docs/quickstart/tracks.md
index f724771b..77f13d27 100644
--- a/docs/quickstart/tracks.md
+++ b/docs/quickstart/tracks.md
@@ -174,7 +174,7 @@ Placement is an explicit Spatial Frame edge; appearance and motion remain reusab
</seedance:ReferenceVideo>
<space:Frame id="product-frame" within={vertical}
- left="8%" top="20%" right="8%" bottom="32%"/>
+ left="8%" top="20%" right="92%" bottom="68%"/>
<media-track:Track id="product-broll" map={timing.map}
space={speech.space} canvas={vertical}>
@@ -185,7 +185,8 @@ Placement is an explicit Spatial Frame edge; appearance and motion remain reusab
</media-track:Track>
```
-The Selection contributes semantic points; Media performs the package-owned window projection.
+`left`, `top`, `right` and `bottom` are edge coordinates inside the parent Frame; `right` and
+`bottom` are not CSS-style margins. The Selection contributes semantic points; Media performs the package-owned window projection.
The same Item model also covers full-canvas cutaways, split screens and corner overlays. Ordered
child layers, source occupancy and explicit Sequences are available when one source is not enough.
@@ -260,7 +261,7 @@ Container for text items.
```svml
<space:Canvas id="vertical" width="1080" height="1920"/>
<space:Frame id="title-frame" within={vertical}
- left="6%" top="6%" right="6%" bottom="84%"/>
+ left="6%" top="6%" right="94%" bottom="16%"/>
<fonts:Stack id="title-font" family="inter" weight="900" style="normal"/>
<text:Style id="title-style" recipe={studio.text.title} font={title-font}/>
<text:Track id="titles" space={speech.space}>
@@ -352,9 +353,9 @@ All four track families together in one source file:
<!-- Shared placement is an explicit edge, separate from Text appearance. -->
<space:Canvas id="vertical" width="1080" height="1920"/>
<space:Frame id="title-frame" within={vertical}
- left="6%" top="6%" right="6%" bottom="84%"/>
+ left="6%" top="6%" right="94%" bottom="16%"/>
<space:Frame id="card-frame" within={vertical}
- left="10%" top="20%" right="10%" bottom="30%"/>
+ left="10%" top="20%" right="90%" bottom="70%"/>
<!-- Media: one ordinary Item used editorially as B-roll -->
<media-track:Track id="cards" map={timing.map} space={speech.space} canvas={vertical}>
diff --git a/docs/zh/quickstart/composition.md b/docs/zh/quickstart/composition.md
index 00489d3f..fc13f877 100644
--- a/docs/zh/quickstart/composition.md
+++ b/docs/zh/quickstart/composition.md
@@ -144,9 +144,9 @@ Build Target,也可以直接接到媒体裁切、音频/帧提取或模型参
<space:Frame id="speech-frame" within={vertical}
left="0%" top="0%" right="100%" bottom="100%"/>
<space:Frame id="title-frame" within={vertical}
- left="6%" top="6%" right="6%" bottom="84%"/>
+ left="6%" top="6%" right="94%" bottom="16%"/>
<space:Frame id="card-frame" within={vertical}
- left="10%" top="20%" right="10%" bottom="30%"/>
+ left="10%" top="20%" right="90%" bottom="70%"/>
<!-- 3. Timing: assemble spine and align words -->
<speech:Spine id="speech" frame-rate="30"
diff --git a/docs/zh/quickstart/styles.md b/docs/zh/quickstart/styles.md
index cab0918d..d8d88665 100644
--- a/docs/zh/quickstart/styles.md
+++ b/docs/zh/quickstart/styles.md
@@ -194,7 +194,7 @@ motion.product {
```svml
<space:Frame id="product-frame" within={vertical}
- left="8%" top="20%" right="8%" bottom="32%"/>
+ left="8%" top="20%" right="92%" bottom="68%"/>
<media-track:Item video={product-motion.video}
during={story.selection.demo} frame={product-frame}
appearance={studio.media.product} motion={studio.motion.product}/>
diff --git a/docs/zh/quickstart/tracks.md b/docs/zh/quickstart/tracks.md
index 591dc070..d7a24b58 100644
--- a/docs/zh/quickstart/tracks.md
+++ b/docs/zh/quickstart/tracks.md
@@ -131,7 +131,7 @@ B-roll 是通用 Media Track 的一种剪辑用途,不是独立 Track 家族
</seedance:ReferenceVideo>
<space:Frame id="product-frame" within={vertical}
- left="8%" top="20%" right="8%" bottom="32%"/>
+ left="8%" top="20%" right="92%" bottom="68%"/>
<media-track:Track id="product-broll" map={timing.map}
space={speech.space} canvas={vertical}>
@@ -142,7 +142,7 @@ B-roll 是通用 Media Track 的一种剪辑用途,不是独立 Track 家族
</media-track:Track>
```
-Selection 只贡献语义点;Media 包负责将这些点投影为窗口。同一个 Item 模型也能表达全屏切换、分屏和角落小窗。需要多个素材时,可以使用有序局部 Layer 或显式 Sequence。
+`left`、`top`、`right`、`bottom` 是父 Frame 内的边坐标;`right` 和 `bottom` 不是 CSS 式外边距。Selection 只贡献语义点;Media 包负责将这些点投影为窗口。同一个 Item 模型也能表达全屏切换、分屏和角落小窗。需要多个素材时,可以使用有序局部 Layer 或显式 Sequence。
每个 Item、Member 或采样 Layer 都必须且只能声明一种视觉输入形式:
@@ -211,7 +211,7 @@ Track 都会作为独立输入进入 Film。输出 `{music-bed.track}` 是普通
```svml
<space:Canvas id="vertical" width="1080" height="1920"/>
<space:Frame id="title-frame" within={vertical}
- left="6%" top="6%" right="6%" bottom="84%"/>
+ left="6%" top="6%" right="94%" bottom="16%"/>
<fonts:Stack id="title-font" family="inter" weight="900" style="normal"/>
<text:Style id="title-style" recipe={studio.text.title} font={title-font}/>
<text:Track id="titles" space={speech.space}>
@@ -302,9 +302,9 @@ Run 时,继续使用内联 `P`/`Span`/`Break`。
<!-- 共享位置是显式边,与 Media/Text 外观分开。 -->
<space:Canvas id="vertical" width="1080" height="1920"/>
<space:Frame id="title-frame" within={vertical}
- left="6%" top="6%" right="6%" bottom="84%"/>
+ left="6%" top="6%" right="94%" bottom="16%"/>
<space:Frame id="card-frame" within={vertical}
- left="10%" top="20%" right="10%" bottom="30%"/>
+ left="10%" top="20%" right="90%" bottom="70%"/>
<!-- Media:Selection 期间显示一个普通 Item -->
<media-track:Track id="cards" map={timing.map} space={speech.space} canvas={vertical}>
diff --git a/examples/talking-film-graph-check/main.svml b/examples/talking-film-graph-check/main.svml
index 775c4574..12315eec 100644
--- a/examples/talking-film-graph-check/main.svml
+++ b/examples/talking-film-graph-check/main.svml
@@ -25,9 +25,9 @@
<space:Frame id="speech-frame" within={vertical}
left="0%" top="0%" right="100%" bottom="100%"/>
<space:Frame id="title-frame" within={vertical}
- left="6%" top="6%" right="6%" bottom="84%"/>
+ left="6%" top="6%" right="94%" bottom="16%"/>
<space:Frame id="card-frame" within={vertical}
- left="10%" top="20%" right="10%" bottom="30%"/>
+ left="10%" top="20%" right="90%" bottom="70%"/>
<wording:Value id="direction">Locked medium close-up in a quiet daylight studio. Spoken dialogue — say exactly: Meaning becomes the source.</wording:Value>
<seedance:TextVideo id="take" model="mini" prompt={direction} duration="5" generate-audio="true"/>
diff --git a/examples/talking-film-graph-check/svml.packages.lock b/examples/talking-film-graph-check/svml.packages.lock
index ddc63227..ba84ae3f 100644
--- a/examples/talking-film-graph-check/svml.packages.lock
+++ b/examples/talking-film-graph-check/svml.packages.lock
@@ -612,12 +612,12 @@
{
"name": "@narratage/core",
"version": "0.0.0-dev",
- "digest": "sha256:543f217ac6164f1b3055f9d581f9d158b3dd28d66de7e1ed34dcb0f5dce47d87"
+ "digest": "sha256:1262fed3211025ac608b60c4f7f47c9d493473cb05307ade3671ebafb79f5fe0"
},
{
"name": "@narratage/elaborator",
"version": "0.0.0-dev",
- "digest": "sha256:09a21c07f678179c1e283a8530e67d50ad87807fa3fa89bf50c15b130a833f6e"
+ "digest": "sha256:eff4491c60ba8dc926e43c360f6644293c843126bd876dd8b893196933b4e719"
},
{
"name": "@narratage/film",
@@ -647,7 +647,7 @@
{
"name": "@narratage/markup",
"version": "0.0.0-dev",
- "digest": "sha256:3acf4338ea3487eb895b01d70ff75209104cd3593f0473abb0f25c95db425df6"
+ "digest": "sha256:8d4f58d79d5d1ea21dedf84ba63064a5fc2c710df499d58e58701b3557fbedc6"
},
{
"name": "@narratage/media-pipeline",
@@ -657,7 +657,7 @@
{
"name": "@narratage/media-track",
"version": "0.0.0-dev",
- "digest": "sha256:261ea1bff36f1821555549d05f5fda1846bf1811c8d379b09b7dc6c69c2f38fe"
+ "digest": "sha256:b43fde0a8e801b71fe5c0a292f6f7954841466850fa18d992fb6ce1b15631cb7"
},
{
"name": "@narratage/media",
@@ -692,12 +692,12 @@
{
"name": "@narratage/run-markup",
"version": "0.0.0-dev",
- "digest": "sha256:33de32d54d225d381b7804c59644b6a19f87b11208c6301411f376ce8dc09430"
+ "digest": "sha256:3c88369dc97248f561ef83d2775c02e3e1704751808429734a72faca61a0468e"
},
{
"name": "@narratage/run",
"version": "0.0.0-dev",
- "digest": "sha256:870363b3a088e66b8b7d88c566ad3dce3c97f2e6ac5b0aea87435eb658e09ddf"
+ "digest": "sha256:84ddca1556318111c3b067ff439bb7b94cb7856c30a5762cf07a083b61be2b17"
},
{
"name": "@narratage/script",
@@ -722,7 +722,7 @@
{
"name": "@narratage/spatial",
"version": "0.0.0-dev",
- "digest": "sha256:38aa1963dcf537d94899a3db510c203619194d42023705644f7caef6d273d6ee"
+ "digest": "sha256:c0548cacaf821e6811addd2a5ba9609ceaabb29c7a6d9776f3f1d45fe37ec644"
},
{
"name": "@narratage/speech-alignment",
@@ -742,7 +742,7 @@
{
"name": "@narratage/speech-spine",
"version": "0.0.0-dev",
- "digest": "sha256:49ac56c325a71e794f5feb2f73d2051da9ebf2ee846761ca5542b75bdd6ea1d0"
+ "digest": "sha256:209d28a81e41f486cce6173e3647389866b3571131efe2842f5223066ef772f2"
},
{
"name": "@narratage/speech",
@@ -767,7 +767,7 @@
{
"name": "@narratage/typography-track",
"version": "0.0.0-dev",
- "digest": "sha256:1e254b0f7f4750049156cad790d4c61a28cdff7b182e682e8c4620e975ccbe96"
+ "digest": "sha256:bbfdb7e3ad9c163a1e1a0161e907e6140e908f1d70f083d265455229db304f4c"
},
{
"name": "@narratage/visual-ir",
@@ -807,7 +807,7 @@
}
],
"facetsDigest": "sha256:1fbbf9bcdc39382ec612df3f29765b5d6ceb8598c0df2c7b5d6b8515f73367a3",
- "closureDigest": "sha256:bd47658f06759f0b747685406e7af2e0176db405879dcab30321e7ed07780030"
+ "closureDigest": "sha256:2e385fad0d93b87079c2f90364d48176eb8df5b2c023f683cdc6d3b6b7c5a4b5"
},
{
"package": {
@@ -821,7 +821,7 @@
}
],
"facetsDigest": "sha256:73e3f528a76fdc553ba2ee87fe5beb5fb2c91b7d4fcdff4ba9e6963d4740fdf6",
- "closureDigest": "sha256:e91df235af196fcec367de95e84e4113444ae9bc1f3a6ed74f4906e566a3913e"
+ "closureDigest": "sha256:4794a7088600dc9355bf3d69748356af1c1539aea5be28156442d8eb18cf1a51"
},
{
"package": {
@@ -835,7 +835,7 @@
}
],
"facetsDigest": "sha256:894d546ffa3c9e221fc6b686d11bc117d15a250399332e3ae1c1d28a547e0f30",
- "closureDigest": "sha256:51ab8d6ff0af88112c74b82c7b39a02672d1377e03e17e8ce968f27f53d0ce67"
+ "closureDigest": "sha256:a17636884111edc2bc4ef13e3bd5703bd17427a1c3d615df848a9d59f20b6f4f"
},
{
"package": {
@@ -849,7 +849,7 @@
}
],
"facetsDigest": "sha256:05c22bda8c301365c1cfff2c0afa80067f3d2a0fba167a57ebf923af720a5c34",
- "closureDigest": "sha256:fb973346abbc77ea2331ce9b5082b4b25080aabaf1cc738445cc0e5f4283ad5d"
+ "closureDigest": "sha256:d8b286b874b88c865febef46cdccbcf54ca438cda629945ac6cdc6f93b665744"
},
{
"package": {
@@ -863,7 +863,7 @@
}
],
"facetsDigest": "sha256:b96fd578be298ab154d1ad30a27d7e54ae0cf2f8f52f52d7bf13c0785d2a8da7",
- "closureDigest": "sha256:4829d541d711ac26e11b0a2b56294d4e9ef0ecfd4edb0d977db1cda5f1b215e8"
+ "closureDigest": "sha256:0b367f9be1f1e6db043cc16476193270a968b70acc782c8288a46a7e8e3e2f2d"
},
{
"package": {
@@ -877,7 +877,7 @@
}
],
"facetsDigest": "sha256:de93037cec9a364da45fedc69a2d82cca93c5866e475942241c008f46c3a8da9",
- "closureDigest": "sha256:8ad637fe0ed3f8f1e4bb9ed1db4723f19b13c940d3ed9aa98dccea3723531140"
+ "closureDigest": "sha256:d77976e5ec75c2965c497fa9855d0c00269a0347633ca29669b4f5da55612e8c"
},
{
"package": {
@@ -891,7 +891,7 @@
}
],
"facetsDigest": "sha256:d9ee4c44949ca2d24967e7d81898999db84ab592fdaaafe1bd6d22a28ea5e094",
- "closureDigest": "sha256:90776074a4d2fb1f7c74349695f82b4337eae7bf051970275e5ede1605b06375"
+ "closureDigest": "sha256:461bbbc1cba90ed3922ce17b295c88c3f0cd76f9f58ac7e5f31028f23abaf107"
},
{
"package": {
@@ -905,7 +905,7 @@
}
],
"facetsDigest": "sha256:7596800f1ce4506145f9ff50c768bfc07131c5ea8d421711a6b5268ce13960f7",
- "closureDigest": "sha256:c4e92a57bdb3cfec551ca8ba4390ab54d3e22a379ddc409ec4dd8fe5317192d5"
+ "closureDigest": "sha256:928c654e57d3cd1c306769104c68466c4f81e3ff718e5eec3b14c305cee0b2aa"
},
{
"package": {
@@ -919,7 +919,7 @@
}
],
"facetsDigest": "sha256:5bbef7d089f36dd1ea36b743b1b4f03289ccb8a2fc50383e3b355982916ccfc6",
- "closureDigest": "sha256:4c125782e1a12768f1ee45677b3211d45e969262f851a817962a4de24bd57b1e"
+ "closureDigest": "sha256:09873870d5581617cc54afb5ca28e256da2d762a263a0fcea74d4580a6897a33"
},
{
"package": {
@@ -933,7 +933,7 @@
}
],
"facetsDigest": "sha256:a96ae88d7813e660bb496b77e53f66ed7e218b20d4e157632c9a4fd832580a92",
- "closureDigest": "sha256:b91261dded4ffa419b5c8bcc4cc1f780ab1b5944b66d3b8122f499b6da50ed98"
+ "closureDigest": "sha256:42da7f23120ccb040c9e2b7ad09668708ebd2b91cacaf615300bb139794c2f3e"
},
{
"package": {
@@ -947,7 +947,7 @@
}
],
"facetsDigest": "sha256:c9d43bfabee11db7c1ad5f65286ef568ff51c09def5f5f05b4510fca36b0336f",
- "closureDigest": "sha256:9780098ed41540543dfa7f70c3d85b38ec83fcd36eecbafd2d9b6709b7aa3e08"
+ "closureDigest": "sha256:73351fa045c58f9cc1837228cda0908dc4af87377d712577157f76754e5e8d66"
},
{
"package": {
@@ -989,7 +989,7 @@
}
],
"facetsDigest": "sha256:31b63a4bf10385d31feb50114811c5185b78a0caab6b7c1646c86a61c4958128",
- "closureDigest": "sha256:a652fd059b0a9efd053f9f6bd2294c84ee33b9a9d3c3c395e9a6f682dc181d3e"
+ "closureDigest": "sha256:f019df8bdd9d0452f227a96c277e74e60b42dbb9b6e649ce8290793d378d5a7d"
},
{
"package": {
@@ -1003,7 +1003,7 @@
}
],
"facetsDigest": "sha256:c38a4e2e76a2f87b6a401bf0cad4b18f04274689ffae22c09f8f520046a7123e",
- "closureDigest": "sha256:7e1a89bd509a6df3bee5163b6342473ee39f6e8a9e49fee2615071cdf90f4af6"
+ "closureDigest": "sha256:de8b67cd2e907caf1b68caec20e9a4161e431673ba7bf31f7ca3eb88d7de74cc"
},
{
"package": {
@@ -1017,7 +1017,7 @@
}
],
"facetsDigest": "sha256:acc754c61e24f93d5e2692ceb6998a3638cc384de8e512e155738435663a8342",
- "closureDigest": "sha256:6be408fc4ea4254cd36e0773cf0874ab13fe5535cda7226972560c39eeb5df0a"
+ "closureDigest": "sha256:0bfc81d8f76f18a9d4e24f82c7b5e8b53dff4c80b05ced604b17b35604d21d5d"
},
{
"package": {
@@ -1031,7 +1031,7 @@
}
],
"facetsDigest": "sha256:41615659f664d3480af5a50c81df188b6fc848628c60bc82d37eb7735071f111",
- "closureDigest": "sha256:93b6f9ec6494f01f0074fb4bcaa261a5404f46019f941aca03039723ff0bca8b"
+ "closureDigest": "sha256:09d3314d01df2489c64005beef401f549756212148c919eca6da43edde824ccf"
},
{
"package": {
@@ -1059,7 +1059,7 @@
}
],
"facetsDigest": "sha256:4e6da482a365cd36423f3baf568ea741f2e0eddf26b559bce43d3c4270830c91",
- "closureDigest": "sha256:c4ef7b1c82166e0e9d147bd7b9d415c9190a1eff9a628deaa8ef87a8c9f92ba3"
+ "closureDigest": "sha256:c72adcb9d9e942d9f103b8d00b248d308327f4dd6125abb8f68c6760b2dbc650"
},
{
"package": {
@@ -1073,7 +1073,7 @@
}
],
"facetsDigest": "sha256:e86e5c90307ab183d2ea5d75e4ca0daab4f2b65905feb79c387871370d625e3a",
- "closureDigest": "sha256:c41ea21f64a1d8d7cd3ceaada24c3c9ce2070384f36d1f4ee85e76d3957c09bc"
+ "closureDigest": "sha256:85b0f34ea83550b549bf6e44c201e2e6e660b59a75cf65ceb82ceeaada4d30cb"
},
{
"package": {
@@ -1087,7 +1087,7 @@
}
],
"facetsDigest": "sha256:b55e20b4fdf24cbfaf956447ff62885e81638fdbcbb61f25483392a1c8fac8c9",
- "closureDigest": "sha256:1b98679bc473bd0cd88ebfe9be0b181b2a7526038b687a14b4b316e55fab3cf0"
+ "closureDigest": "sha256:aa7149688ed9bf7f59e88bd52d9f5fdb163cc4df885154ea4938c2e246110390"
},
{
"package": {
@@ -1101,7 +1101,7 @@
}
],
"facetsDigest": "sha256:3e7413acb9b39071fad0ea2e99777ae9ab7a4b636041a8345ec1d08428859b3f",
- "closureDigest": "sha256:3f38fd95d5d56cef65cec81d54fb80ae5945c95ca954c0d431c57b6636761b66"
+ "closureDigest": "sha256:04aba873cb271e7155932cc1993533109eef5bf2bb957735a532b5218155dd46"
},
{
"package": {
@@ -1129,7 +1129,7 @@
}
],
"facetsDigest": "sha256:340cf867483022b3896008781f24a04e22aa0abc76873cc44787aefdc0219522",
- "closureDigest": "sha256:4893913844afa519f405281dd0d44e27f1dcfb8ef1bfc7f111bb00f8df9818d8"
+ "closureDigest": "sha256:fce10574cda3da241a8baa3edaff2345ab7305f522d1320e5aed0154c3825605"
},
{
"package": {
@@ -1147,7 +1147,7 @@
}
],
"facetsDigest": "sha256:27cb7828391b2cd5b9fd0a6690d16010f23b78540d501aad6f9afa75da33f1da",
- "closureDigest": "sha256:8d9202d5e0128d1d1ea8d7f55a371c05e183bb1bae17e95a59d4042f89d3152d"
+ "closureDigest": "sha256:95cfb60b5f1e9d6b672188d2429dc615f5775aa04dd10d2f49eab5cc2c567f5e"
},
{
"package": {
@@ -1179,7 +1179,7 @@
}
],
"facetsDigest": "sha256:2d4d0e9eea9ec795fb675ddf7d204bc29fe7eb8e3a743eced944a0cdb50ecf50",
- "closureDigest": "sha256:f38f4e2087a1fc8e6b09efccead4acaa7cb5f85aa1ffd4c0351e2a95c2bc8548"
+ "closureDigest": "sha256:26e4b737fb48590d0c9dc865743df363ff1ed95e84a3c75b820cc237141aeeb3"
},
{
"package": {
@@ -1193,7 +1193,7 @@
}
],
"facetsDigest": "sha256:063c2641007f401709acfed6eab95ae9c566de1e0987a06c7cdce305abe33aa7",
- "closureDigest": "sha256:7af21c1fb421fd1f3af42d14750524d608e7ca51b33fe74ca364b89b45331b8c"
+ "closureDigest": "sha256:f4a29f1ea8278625fd42eef3afb7df2ab6691fd8b6384397072266a33b88fc8c"
},
{
"package": {
@@ -1221,8 +1221,8 @@
}
],
"facetsDigest": "sha256:64c0e76dea02b19be28bc7425e11938fd9c1dbb9994dde3a6d98c41da819b85e",
- "closureDigest": "sha256:037b8152a0fc865ccf121e25ad4a92c3a3497af1d340f532b49e6b446071f57d"
+ "closureDigest": "sha256:9aac92a9c095bbabfd51053fa09be085b63efd26e5a82cc56ebea5bbb44afe42"
}
],
- "digest": "sha256:89f3081e32c8746f51a071e25da016a12dc73b7a53be611bffe7c21e9ed9cb82"
+ "digest": "sha256:245b544f7049449167ababa4fb067828b9d2935503effc99fa4c85a5e000b83e"
}
diff --git a/examples/talking-film-live/main.svml b/examples/talking-film-live/main.svml
index 842982ba..05dd29cb 100644
--- a/examples/talking-film-live/main.svml
+++ b/examples/talking-film-live/main.svml
@@ -118,7 +118,7 @@
/>
<space:Frame id="callout-frame" within={vertical}
- left="8%" top="10%" right="8%" bottom="80%"/>
+ left="8%" top="10%" right="92%" bottom="20%"/>
<text:Style id="callout-style" recipe={studio.text.callout} font={caption-font}/>
<text:Track id="callout" space={speech.space} map={timing.map}>
diff --git a/packages/artifact-store-s3/src/store.ts b/packages/artifact-store-s3/src/store.ts
index c0fa6726..49be59fe 100644
--- a/packages/artifact-store-s3/src/store.ts
+++ b/packages/artifact-store-s3/src/store.ts
@@ -56,8 +56,6 @@ export type CreateS3ArtifactStorePackageOptions = S3Location & {
readonly client?: S3ObjectClient;
};
-export type S3ArtifactStorePackage = RuntimeServicePackage;
-
function assert(condition: unknown, message: string): asserts condition {
if (!condition) throw new Error(message);
}
@@ -383,7 +381,7 @@ export class S3ArtifactStore implements ArtifactStore {
export function createS3ArtifactStorePackage(
options: CreateS3ArtifactStorePackageOptions,
-): S3ArtifactStorePackage {
+): RuntimeServicePackage {
const instance = options.instance ?? "artifacts.s3";
assert(instance.trim().length > 0, "S3 ArtifactStore instance id must not be empty");
const prefix = normalizePrefix(options.prefix);
diff --git a/packages/artifact-store-s3/test/store.test.ts b/packages/artifact-store-s3/test/store.test.ts
index 747f57c2..8c7c50ba 100644
--- a/packages/artifact-store-s3/test/store.test.ts
+++ b/packages/artifact-store-s3/test/store.test.ts
@@ -48,7 +48,7 @@ test("S3 artifacts use conditional immutable writes and verify downloaded conten
await assert.rejects(store.get(first.digest), /content digest differs/u);
});
-test("configured S3 service locks location without putting AWS credentials in the Closure", () => {
+test("configured S3 service locks its location", () => {
const configured = createS3ArtifactStorePackage({
instance: "artifacts.team",
client: new FakeS3(),
@@ -59,7 +59,6 @@ test("configured S3 service locks location without putting AWS credentials in th
});
assert.equal(configured.services[0]?.instance.id, "artifacts.team");
assert.ok(configured.services[0]?.instance.configurationDigest);
- assert.equal(JSON.stringify(configured).includes("AWS_SECRET_ACCESS_KEY"), false);
});
/** A client that can do everything, backed by an in-memory bucket. */
diff --git a/packages/cli/src/archive.ts b/packages/cli/src/archive.ts
index b4416217..f6661e3a 100644
--- a/packages/cli/src/archive.ts
+++ b/packages/cli/src/archive.ts
@@ -138,12 +138,10 @@ function summarizeRecord(record: TypedRecord) {
function catalogAliasType(
state: BuildState,
ref: BuildCatalogEntry["aliases"][number]["ref"],
-): TypeRef {
- const type = ref.kind === "record"
+): TypeRef | undefined {
+ return ref.kind === "record"
? state.program.records.find((record) => record.id === ref.id)?.type
: state.graph.outputs.find((output) => output.id === ref.id)?.type;
- if (type === undefined) throw new Error(`Build Catalog alias references unknown ${ref.kind} ${ref.id}`);
- return type;
}
/**
@@ -260,9 +258,10 @@ export function inspectBuild(state: BuildState, catalog?: BuildCatalogEntry) {
const selection = selections.get(alias.ref.id);
return selection === undefined ? undefined : records.get(selection.record);
})();
+ const type = record?.type ?? catalogAliasType(state, alias.ref);
return {
name: alias.name,
- type: record?.type ?? catalogAliasType(state, alias.ref),
+ ...(type === undefined ? {} : { type }),
ref: alias.ref,
...(record === undefined ? { accepted: false } : { accepted: true, record: record.id }),
};
diff --git a/packages/cli/src/main.ts b/packages/cli/src/main.ts
index eec43e05..01d486dc 100644
--- a/packages/cli/src/main.ts
+++ b/packages/cli/src/main.ts
@@ -400,6 +400,7 @@ function assertCommandOptions(args: ParsedArgs): void {
add("--max-wait-ms", "--runtime", "--package-lock", "--package-root", "--package", "--apply");
break;
case "runtime":
+ add("--runtime");
if (args.action === "up" || args.action === "down") add("--max-wait-ms");
break;
case "gc":
@@ -870,7 +871,8 @@ export async function runCli(
|| args.command === "runtime" || args.command === "queue" || args.command === "operations"
|| args.command === "operation";
const operational = known || args.command === "auth";
- const fileOptional = args.command === "builds" || args.command === "history" || args.command === "queue";
+ const fileOptional = args.command === "builds" || args.command === "history" || args.command === "queue"
+ || ((args.command === "services" || args.command === "runtime") && args.runtime !== undefined);
if (!operational || (!fileOptional && args.file === undefined)) {
throw new Error(usage());
}
@@ -1148,7 +1150,10 @@ export async function runCli(
return;
}
if (args.command === "services") {
- if (args.runtime !== undefined || args.packageLock !== undefined || args.packageRoot !== undefined
+ if (args.file !== undefined && args.runtime !== undefined) {
+ throw new Error("services reads all deployment selection from the Runtime Profile itself; provide that Profile only once");
+ }
+ if (args.packageLock !== undefined || args.packageRoot !== undefined
|| args.packages.length > 0 || args.apply) {
throw new Error("services reads all deployment selection from the Runtime Profile itself");
}
@@ -1158,7 +1163,9 @@ export async function runCli(
if (args.action !== "up" && args.maxWaitMs !== undefined) {
throw new Error("--max-wait-ms applies to services up");
}
- const profile = resolve(args.file!);
+ const profileInput = args.runtime ?? args.file;
+ if (profileInput === undefined) throw new Error("services requires a Runtime Profile");
+ const profile = resolve(profileInput);
const result = args.action === "up"
? await distribution.externalServices.up(profile, {
...(args.maxWaitMs === undefined ? {} : { maxWaitMs: args.maxWaitMs }),
@@ -1193,7 +1200,12 @@ export async function runCli(
if (args.action !== "up" && args.action !== "down" && args.action !== "status" && args.action !== "logs") {
throw new Error("runtime takes up, down, status or logs");
}
- const profile = resolve(args.file!);
+ if (args.file !== undefined && args.runtime !== undefined) {
+ throw new Error("runtime accepts the Runtime Profile either positionally or with --runtime, not both");
+ }
+ const profileInput = args.runtime ?? args.file;
+ if (profileInput === undefined) throw new Error("runtime requires a Runtime Profile");
+ const profile = resolve(profileInput);
if (args.action === "up") {
// Validate the exact Runtime Closure against unfinished work before replacing a stale Worker
// or starting external programs. A refusal must leave the old execution environment intact.
@@ -1500,7 +1512,10 @@ export async function runCli(
core: entry.core,
createdAt: entry.createdAt,
updatedAt: entry.updatedAt,
- status: status.build?.state.status,
+ status: status.dispatch === undefined
+ ? status.build?.state.status
+ : submissionStatus(status.dispatch),
+ ...(status.build === undefined ? {} : { coreStatus: status.build.state.status }),
...summarizeBuildCatalog(entry, status.build?.state),
};
}));
@@ -1591,9 +1606,15 @@ export async function runCli(
const status = await runtime.status(args.file!);
if (status.build === undefined) throw new Error(`Build ${args.file} does not exist`);
const archive = inspectBuild(status.build.state, status.catalog);
+ const effectiveStatus = status.dispatch === undefined
+ ? status.build.state.status
+ : submissionStatus(status.dispatch);
const machine = {
build: status.build.build,
revision: status.build.revision,
+ status: effectiveStatus,
+ coreStatus: status.build.state.status,
+ dispatch: status.dispatch,
archive,
operations: status.operations.map((operation) => ({
id: operation.id,
@@ -1634,7 +1655,8 @@ export async function runCli(
? []
: [`Other accepted outputs ${otherAccepted.length} · use --verbose to list them`];
writeOperational(machine, "Build archive detail", "info", [
- ["Build", status.build.build], ["Status", archive.status],
+ ["Build", status.build.build], ["Status", effectiveStatus],
+ ...(effectiveStatus === archive.status ? [] : [["Core", archive.status] as const]),
["Targets", String(archive.targets.length)], ["Accepted records", String(archive.records.length)],
["Operations", String(status.operations.length)],
...(args.verbose ? [["Revision", String(status.build.revision)] as const] : []),
@@ -2031,9 +2053,7 @@ export async function runCli(
run: loaded.path,
outputNames: Object.fromEntries(result.compilation.author.exports.flatMap((item) =>
item.ref.kind === "logical-output" ? [[item.ref.id, item.name]] : [])),
- candidateNames: Object.fromEntries(Object.entries(loaded.run.candidates)
- .sort(([left], [right]) => left.localeCompare(right))
- .map(([name, id]) => [id, name])),
+ satisfactionNames: loaded.run.satisfactionNames,
});
} finally {
await runtime?.close();
diff --git a/packages/cli/src/output.ts b/packages/cli/src/output.ts
index 1ea2b8ae..5c705205 100644
--- a/packages/cli/src/output.ts
+++ b/packages/cli/src/output.ts
@@ -119,7 +119,7 @@ export type CliPresentation =
readonly run: string;
/** Presentation names declared by this Author Source and Run Source. Never used to plan. */
readonly outputNames?: Readonly<Record<string, string>>;
- readonly candidateNames?: Readonly<Record<string, string>>;
+ readonly satisfactionNames?: Readonly<Record<string, string>>;
}
| {
readonly kind: "operational";
@@ -375,13 +375,13 @@ function renderPlan(
}
const visibleSelections = verbose
? plan.selections
- : plan.selections.filter((selection) => view.candidateNames?.[selection.candidate] !== undefined);
+ : plan.selections.filter((selection) => view.satisfactionNames?.[selection.output] !== undefined);
if (visibleSelections.length > 0) {
lines.push("", colors.strong(verbose ? "Selections" : "Run choices"));
for (const selection of visibleSelections) {
const status = colors.success(glyph(io, "✓", "+"));
const output = view.outputNames?.[selection.output] ?? shortOpaque(selection.output);
- const candidate = view.candidateNames?.[selection.candidate];
+ const candidate = view.satisfactionNames?.[selection.output];
lines.push(` ${status} ${colors.accent(output)}`
+ `${candidate === undefined ? "" : ` ← ${candidate}`}`);
if (verbose && (output !== selection.output || candidate !== undefined)) {
diff --git a/packages/cli/test/output.test.ts b/packages/cli/test/output.test.ts
index 07a4622a..0c64a9d4 100644
--- a/packages/cli/test/output.test.ts
+++ b/packages/cli/test/output.test.ts
@@ -189,7 +189,7 @@ test("plan keeps named Run choices visible and leaves graph internals to verbose
machine: { format: "narratage.cli-plan@1", ok: true, plan },
run: "/project/build.svrun",
outputNames: { "logical:take": "take.video" },
- candidateNames: { "candidate:preview": "preview" },
+ satisfactionNames: { "logical:take": "preview" },
});
assert.match(output, /Run choices/u);
assert.match(output, /take\.video\s+← preview/u);
@@ -202,7 +202,7 @@ test("plan keeps named Run choices visible and leaves graph internals to verbose
machine: { format: "narratage.cli-plan@1", ok: true, plan },
run: "/project/build.svrun",
outputNames: { "logical:take": "take.video" },
- candidateNames: { "candidate:preview": "preview" },
+ satisfactionNames: { "logical:take": "preview" },
}), /2\s+@narratage\/media@1/u);
});
diff --git a/packages/compiler-markup-node/src/index.ts b/packages/compiler-markup-node/src/index.ts
index 05107f16..4d15e704 100644
--- a/packages/compiler-markup-node/src/index.ts
+++ b/packages/compiler-markup-node/src/index.ts
@@ -6,7 +6,6 @@ import {
import { AuthorFrontendRegistry, installAuthorFrontendHostFacets } from "@narratage/elaborator";
import type { Workspace } from "@narratage/workspace";
import {
- assertNodePackageContribution,
collectNodePackageComponents,
} from "@narratage/package-loader-node";
import type { NodePackageContribution } from "@narratage/package-loader-node";
@@ -31,15 +30,15 @@ export function createMarkupNodeCompiler(
const surfaces = new MarkupSurfaceRegistry();
const frontends = new AuthorFrontendRegistry();
const validators = new TypeValidatorRegistry();
+ const components = collectNodePackageComponents(packages);
for (const item of packages) {
- assertNodePackageContribution(item);
for (const module of item.modules ?? []) modules.register(module);
installMarkupSurfaceHostFacets(item.hostFacets ?? [], surfaces);
installAuthorFrontendHostFacets(item.hostFacets ?? [], frontends);
}
- for (const component of collectNodePackageComponents(packages)) {
+ for (const component of components) {
registerTypeValidatorFacets(validators, component.validators ?? []);
}
diff --git a/packages/core/src/graph.ts b/packages/core/src/graph.ts
index 7669aa16..ced98b3a 100644
--- a/packages/core/src/graph.ts
+++ b/packages/core/src/graph.ts
@@ -18,12 +18,6 @@ import { invariant } from "./error.js";
import { resolveProducer, sealRecord, verifyRecordStructure } from "./link.js";
import { producerKey, sameType, typeKey } from "./reference.js";
-export function valueRefKey(ref: GraphValueRef): string {
- if (ref.kind === "record") return `record\u0000${ref.id}`;
- if (ref.kind === "logical-output") return `output\u0000${ref.id}`;
- return `operation\u0000${ref.operation}`;
-}
-
function normalizeRef(ref: GraphValueRef): GraphValueRef {
if (ref.kind === "record") return { kind: "record", id: ref.id };
if (ref.kind === "logical-output") return { kind: "logical-output", id: ref.id };
@@ -126,7 +120,7 @@ export function resolveLogicalOutput(graph: CompiledGraph, id: string): LogicalO
return output;
}
-export function resolveCandidate(graph: CompiledGraph, id: string): Candidate {
+function resolveCandidate(graph: CompiledGraph, id: string): Candidate {
const candidate = graph.candidates.find((item) => item.id === id);
invariant(candidate !== undefined, "UNKNOWN_CANDIDATE", `unknown Candidate ${id}`, id);
return candidate;
@@ -150,7 +144,7 @@ export function operationResultRecord(operation: OperationNode): string {
return operation.result.record;
}
-export function operationResultType(program: LinkedProgram, operation: OperationNode): TypeRef {
+function operationResultType(program: LinkedProgram, operation: OperationNode): TypeRef {
const producer = resolveProducer(program.closure, operation.producer);
if (operation.result.kind === "output") {
const output = producer.outputs.find((port) => port.name === operation.result.name);
diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts
index f8da9e5e..1585cb5e 100644
--- a/packages/core/src/index.ts
+++ b/packages/core/src/index.ts
@@ -1,7 +1,6 @@
export { canonicalStringify, canonicalize, digestOf, isDigest, recordDigest } from "./canonical.js";
export { CoreError } from "./error.js";
export {
- computeClosureDigest,
computeModuleDigest,
createResolvedClosure,
link,
@@ -12,15 +11,8 @@ export {
verifyRecordStructure,
} from "./link.js";
export {
- operationResultRecord,
- operationResultType,
- resolveCandidate,
- resolveLogicalOutput,
- resolveOperation,
sealBuildRequest,
sealCompiledGraph,
- satisfiedCandidate,
- valueRefKey,
verifyBuildRequest,
verifyCompiledGraph,
} from "./graph.js";
diff --git a/packages/core/src/link.ts b/packages/core/src/link.ts
index 61603451..94457fd0 100644
--- a/packages/core/src/link.ts
+++ b/packages/core/src/link.ts
@@ -29,7 +29,7 @@ export function computeModuleDigest(manifest: ModuleManifest): Digest {
return digestOf(manifest);
}
-export function computeClosureDigest(modules: readonly ResolvedModule[]): Digest {
+function computeClosureDigest(modules: readonly ResolvedModule[]): Digest {
return digestOf({
format: "svml.closure@1",
modules: [...modules]
diff --git a/packages/credential-store-keychain/package.json b/packages/credential-store-keychain/package.json
index e98bbeaa..9c663503 100644
--- a/packages/credential-store-keychain/package.json
+++ b/packages/credential-store-keychain/package.json
@@ -14,8 +14,5 @@
"@narratage/protocol": "workspace:*",
"@narratage/runtime": "workspace:*",
"@narratage/runtime-adapter": "workspace:*"
- },
- "devDependencies": {
- "@narratage/credential-store-env": "workspace:*"
}
}
diff --git a/packages/credential-store-keychain/src/index.ts b/packages/credential-store-keychain/src/index.ts
index d602d4fe..f4825e09 100644
--- a/packages/credential-store-keychain/src/index.ts
+++ b/packages/credential-store-keychain/src/index.ts
@@ -1,7 +1,6 @@
export {
KeychainCredentialStore,
createKeychainCredentialStorePackage,
- keychainAddCommand,
keychainCredentialStoreImplementationDigest,
keychainCredentialStoreModuleRef,
} from "./store.js";
diff --git a/packages/credential-store-keychain/src/store.ts b/packages/credential-store-keychain/src/store.ts
index 30b75256..35ba8927 100644
--- a/packages/credential-store-keychain/src/store.ts
+++ b/packages/credential-store-keychain/src/store.ts
@@ -131,11 +131,6 @@ export class KeychainCredentialStore implements WritableCredentialStore {
}
}
-/** The command that puts a secret where this store will find it. */
-export function keychainAddCommand(key: string, service = DEFAULT_SERVICE): string {
- return `security add-generic-password -s ${service} -a ${key} -w`;
-}
-
export function createKeychainCredentialStorePackage(
options: CreateKeychainCredentialStorePackageOptions = {},
): RuntimeServicePackage {
diff --git a/packages/credential-store-keychain/test/store.test.ts b/packages/credential-store-keychain/test/store.test.ts
index 04478c9b..ea00c270 100644
--- a/packages/credential-store-keychain/test/store.test.ts
+++ b/packages/credential-store-keychain/test/store.test.ts
@@ -1,14 +1,11 @@
import assert from "node:assert/strict";
import test from "node:test";
-import { createEnvironmentCredentialStorePackage } from "@narratage/credential-store-env";
import { credentialRef } from "@narratage/runtime";
-import type { CredentialStore } from "@narratage/runtime";
import {
KeychainCredentialStore,
createKeychainCredentialStorePackage,
- keychainAddCommand,
} from "@narratage/credential-store-keychain";
const reader = (entries: Readonly<Record<string, string>>) =>
@@ -35,7 +32,7 @@ test("a malformed reference is refused before anything is looked up", async () =
assert.equal(asked, 0);
});
-test("the configured service is part of the instance's identity, and holds no secret", () => {
+test("the configured service is part of the instance's identity", () => {
const configured = createKeychainCredentialStorePackage({ instance: "credentials.team", service: "acme" });
assert.equal(configured.services[0]?.instance.id, "credentials.team");
// Configuration reaches identity as a digest and is not carried in the
@@ -47,11 +44,6 @@ test("the configured service is part of the instance's identity, and holds no se
configured.services[0]?.instance.configurationDigest,
other.services[0]?.instance.configurationDigest,
);
- assert.equal(JSON.stringify(configured).includes("secret"), false);
-});
-
-test("it can say how to put a secret where it will be found", () => {
- assert.equal(keychainAddCommand("KIE_API_KEY"), "security add-generic-password -s narratage -a KIE_API_KEY -w");
});
test("writable facet stores and removes only keychain-owned references", async () => {
@@ -69,44 +61,3 @@ test("writable facet stores and removes only keychain-owned references", async (
assert.equal(await store.resolve(ref), undefined);
await assert.rejects(store.put(credentialRef("env", "PROVIDER_KEY"), { secret: "x" }), /does not own/u);
});
-
-/**
- * The reason a second implementation was written.
- *
- * `CredentialRef.store` names which store answers, and both stores decline a
- * reference addressed to the other. That only works if a Runtime can hold both,
- * and today a Runtime holds exactly one credential-store: `chooseService`
- * refuses a second, and the execution driver treats one `undefined` as "this
- * credential is unavailable" and fails the Operation.
- *
- * So a deployment that keeps API keys in the environment and signing keys in
- * the keychain cannot be expressed, and the `store` field is decoration: it has
- * to name whichever single store happens to be installed.
- *
- * This test states the composition that ought to work. It is written against a
- * local composite so that it describes the intended behaviour exactly, and it
- * is the specification for changing the assembly.
- */
-test("two stores compose by name, which is what the store field is for", async () => {
- const environment = createEnvironmentCredentialStorePackage({
- environment: { KIE_API_KEY: "from-env" },
- }).services[0]!.service as CredentialStore;
- const keychain = new KeychainCredentialStore({ read: reader({ SIGNING_KEY: "from-keychain" }) });
-
- const composed: CredentialStore = {
- async resolve(ref) {
- for (const store of [environment, keychain]) {
- const value = await store.resolve(ref);
- if (value !== undefined) return value;
- }
- return undefined;
- },
- };
-
- assert.deepEqual(await composed.resolve(credentialRef("env", "KIE_API_KEY")), { secret: "from-env" });
- assert.deepEqual(await composed.resolve(credentialRef("keychain", "SIGNING_KEY")), { secret: "from-keychain" });
- // Because each store declines what is not addressed to it, order cannot
- // change the answer — the name decides, not the position.
- assert.equal(await composed.resolve(credentialRef("keychain", "KIE_API_KEY")), undefined);
- assert.equal(await composed.resolve(credentialRef("vault", "ANY")), undefined);
-});
diff --git a/packages/driver-node/README.md b/packages/driver-node/README.md
index b45202be..8c48b898 100644
--- a/packages/driver-node/README.md
+++ b/packages/driver-node/README.md
@@ -2,8 +2,8 @@
Node runtime for executing Core commands without adding workflow semantics to Core.
-Its Manifest helpers only read Node filesystem paths and construct a verified Closure. Pure static
-Manifest JSON parsing belongs to `@narratage/protocol`.
+Pure static Manifest JSON parsing belongs to `@narratage/protocol`; package loading and Closure
+construction remain outside the execution Driver.
- `ProducerRegistry` implements the host-neutral `@narratage/component-kit` Producer registrar. Deterministic
component packages depend on that tiny structural port, not on this Node Driver.
@@ -19,7 +19,8 @@ Manifest JSON parsing belongs to `@narratage/protocol`.
- Production-style assembly uses `applyRuntimeClosure()`: Endpoint instance, exact capability and
return Type, implementation digest, non-secret configuration digest, declared credential slots
and Profile-owned scheduling must all match atomically.
- Legacy direct `bind()` remains only as the low-level trusted test/embedding API.
+ A low-level trusted embedding may still register one immediate Endpoint directly; recoverable
+ execution always requires the locked Runtime Closure.
- Long-lived external work uses `registerRecoverableEndpoint()`, not an immediate Handler. The Driver
creates a content-addressed Operation before `start()`, persists pending checkpoints, calls
`resume()` for an existing Operation, and replays a persisted completion without another external
diff --git a/packages/driver-node/src/driver.ts b/packages/driver-node/src/driver.ts
index 75c63658..2002f0da 100644
--- a/packages/driver-node/src/driver.ts
+++ b/packages/driver-node/src/driver.ts
@@ -71,6 +71,24 @@ type Executable =
readonly registration: EndpointRegistration;
};
+function failureMessage(error: unknown): string {
+ const parts: string[] = [];
+ let cursor: unknown = error;
+ const seen = new Set<unknown>();
+ while (cursor !== undefined && cursor !== null && !seen.has(cursor)) {
+ seen.add(cursor);
+ if (cursor instanceof Error) {
+ const code = "code" in cursor && typeof cursor.code === "string" ? ` [${cursor.code}]` : "";
+ parts.push(`${cursor.message}${code}`);
+ cursor = cursor.cause;
+ continue;
+ }
+ parts.push(String(cursor));
+ break;
+ }
+ return [...new Set(parts)].join("; caused by: ");
+}
+
export class NodeDriver {
readonly producers: ProducerRegistry;
readonly endpoints: EndpointRegistry;
@@ -442,35 +460,57 @@ export class NodeDriver {
context?: RuntimeExecutionContext,
): Promise<RuntimeExecutionResult> {
if (!("endpointId" in executable)) {
- const result = (await executable.run()) as ProducerHandlerResult;
- const producer = resolveProducer(state.program.closure, executable.command.producer);
- for (const port of producer.outputs) {
- const value = result.outputs[port.name];
- if (value === undefined) continue;
- await validateValue(state.program.closure, port.type, value, this.validators);
+ try {
+ const result = (await executable.run()) as ProducerHandlerResult;
+ const producer = resolveProducer(state.program.closure, executable.command.producer);
+ for (const port of producer.outputs) {
+ const value = result.outputs[port.name];
+ if (value === undefined) continue;
+ await validateValue(state.program.closure, port.type, value, this.validators);
+ }
+ const content = {
+ kind: "producer-completed",
+ command: executable.command.id,
+ outputs: result.outputs,
+ needs: result.needs,
+ } as const;
+ return {
+ status: "completed",
+ event: { ...content, id: `event:${digestOf(content)}` },
+ };
+ } catch (error) {
+ const producer = executable.command.producer;
+ throw new Error(
+ `Producer ${producer.module.name}@${producer.module.version}#${producer.name} failed: ${failureMessage(error)}`,
+ { cause: error },
+ );
}
- const content = {
- kind: "producer-completed",
- command: executable.command.id,
- outputs: result.outputs,
- needs: result.needs,
- } as const;
- return {
- status: "completed",
- event: { ...content, id: `event:${digestOf(content)}` },
- };
}
if (executable.registration.kind === "recoverable") {
if (context === undefined) throw new Error("recoverable Endpoint execution requires a stable Build id");
- return await this.#executeEndpoint(state, executable, context);
+ try {
+ return await this.#executeEndpoint(state, executable, context);
+ } catch (error) {
+ throw new Error(
+ `Endpoint ${executable.endpointId} failed ${executable.command.need.capability.name}: ${failureMessage(error)}`,
+ { cause: error },
+ );
+ }
+ }
+ try {
+ const result = await executable.registration.handler({
+ command: structuredClone(executable.command),
+ need: structuredClone(executable.command.need),
+ artifacts: this.artifacts,
+ credentials: await this.#endpointCredentials(executable.registration),
+ });
+ return { status: "completed", event: await this.#endpointEvent(state, executable, result) };
+ } catch (error) {
+ throw new Error(
+ `Endpoint ${executable.endpointId} failed ${executable.command.need.capability.name}: ${failureMessage(error)}`,
+ { cause: error },
+ );
}
- const result = await executable.registration.handler({
- command: structuredClone(executable.command),
- need: structuredClone(executable.command.need),
- artifacts: this.artifacts,
- credentials: await this.#endpointCredentials(executable.registration),
- });
- return { status: "completed", event: await this.#endpointEvent(state, executable, result) };
}
/** Regenerate Core commands, then classify only what this Host can execute. */
diff --git a/packages/driver-node/src/index.ts b/packages/driver-node/src/index.ts
index 0813cba1..c585da1f 100644
--- a/packages/driver-node/src/index.ts
+++ b/packages/driver-node/src/index.ts
@@ -1,15 +1,8 @@
export { MemoryArtifactStore } from "./artifacts.js";
export { NodeDriver } from "./driver.js";
-export {
- loadModuleManifest,
- loadResolvedClosure,
-} from "./module-files.js";
export { parseBuildState, serializeBuildState } from "./persistence.js";
export {
ProducerRegistry,
EndpointRegistry,
- producerRegistryKey,
- endpointCapabilityKey,
- endpointReturnKey,
} from "./registry.js";
export type * from "./types.js";
diff --git a/packages/driver-node/src/module-files.ts b/packages/driver-node/src/module-files.ts
deleted file mode 100644
index a9859ba0..00000000
--- a/packages/driver-node/src/module-files.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { readFile } from "node:fs/promises";
-
-import { createResolvedClosure } from "@narratage/core";
-import { parseModuleManifestText } from "@narratage/protocol";
-import type { ModuleManifest, ResolvedModuleClosure } from "@narratage/protocol";
-
-export async function loadModuleManifest(path: string): Promise<ModuleManifest> {
- return parseModuleManifestText(await readFile(path, "utf8"));
-}
-
-export async function loadResolvedClosure(paths: readonly string[]): Promise<ResolvedModuleClosure> {
- const manifests = await Promise.all(paths.map(async (path) => loadModuleManifest(path)));
- return createResolvedClosure(manifests);
-}
diff --git a/packages/driver-node/src/registry.ts b/packages/driver-node/src/registry.ts
index de44fa0e..728cc1bc 100644
--- a/packages/driver-node/src/registry.ts
+++ b/packages/driver-node/src/registry.ts
@@ -272,7 +272,4 @@ export class EndpointRegistry implements EndpointRegistrar {
};
}
- endpoints(capability: CapabilityRef): readonly EndpointRegistration[] {
- return this.#registrations.filter((registration) => sameRef(registration.capability, capability));
- }
}
diff --git a/packages/driver-node/test/driver.test.ts b/packages/driver-node/test/driver.test.ts
index 97173017..45b8a4f7 100644
--- a/packages/driver-node/test/driver.test.ts
+++ b/packages/driver-node/test/driver.test.ts
@@ -1,7 +1,4 @@
import assert from "node:assert/strict";
-import { mkdtemp, rm, writeFile } from "node:fs/promises";
-import { tmpdir } from "node:os";
-import { join } from "node:path";
import test from "node:test";
import { digestOf, recordDigest, reduce } from "@narratage/core";
@@ -10,7 +7,6 @@ import {
MemoryArtifactStore,
NodeDriver,
EndpointRegistry,
- loadResolvedClosure,
parseBuildState,
serializeBuildState,
} from "@narratage/driver-node";
@@ -20,7 +16,6 @@ import {
capabilities,
createGreetingBuild,
implementationDigests,
- manifest,
producers as greetingProducers,
types,
} from "../../core/test/greeting-fixture.js";
@@ -258,20 +253,6 @@ test("MemoryArtifactStore is content addressed and returns defensive copies", as
assert.deepEqual(await store.get(first.digest), new Uint8Array([1, 2, 3]));
});
-test("Driver reads static manifests without executing package code", async () => {
- const directory = await mkdtemp(join(tmpdir(), "svml-driver-"));
- const path = join(directory, "svml.module.json");
- try {
- await writeFile(path, JSON.stringify(manifest), "utf8");
- const closure = await loadResolvedClosure([path]);
- assert.equal(closure.modules.length, 1);
- assert.equal(closure.modules[0]?.manifest.name, "example.greeting");
- assert.equal(closure.modules[0]?.manifest.producers[0]?.name, greetingProducers.makePrompt.name);
- } finally {
- await rm(directory, { recursive: true, force: true });
- }
-});
-
test("Core still owns scheduling when Driver has every implementation", async () => {
const { producers, endpoints } = configuredRegistry();
endpoints.registerImmediateEndpoint("example:cache", capabilities.generation, types.generated, () => ({
diff --git a/packages/driver-node/test/scheduler.test.ts b/packages/driver-node/test/scheduler.test.ts
index f1f06527..1c7a00c1 100644
--- a/packages/driver-node/test/scheduler.test.ts
+++ b/packages/driver-node/test/scheduler.test.ts
@@ -6,7 +6,6 @@ import {
NodeDriver,
parseBuildState,
EndpointRegistry,
- endpointCapabilityKey,
serializeBuildState,
} from "@narratage/driver-node";
import type {
@@ -258,7 +257,7 @@ function resolvedRuntime(laneLimit: number, lifecycle: "immediate" | "recoverabl
resources: [
{ id: "authority:fixture.account", maxConcurrency: laneLimit },
{
- id: `route:fixture.account/${endpointCapabilityKey(capabilities.generation)}`,
+ id: `route:fixture.account/${capabilities.generation.module.name}@${capabilities.generation.module.version}#${capabilities.generation.name}`,
maxConcurrency: laneLimit,
},
],
diff --git a/packages/elaborator/src/fragment.ts b/packages/elaborator/src/fragment.ts
index 3cb704b6..4f25ebb3 100644
--- a/packages/elaborator/src/fragment.ts
+++ b/packages/elaborator/src/fragment.ts
@@ -1,5 +1,4 @@
import {
- canonicalStringify,
digestOf,
isDigest,
resolveProducer,
@@ -495,26 +494,6 @@ export function bindAuthorFragment(
return bindExports(instance, outputs, true);
}
-/**
- * Export selected Run-Graph values and their explicit Satisfaction edges.
- * The Candidate identity is independent of the Logical Output named by `outputs`.
- */
-export function bindCandidateFragment(
- instance: ElaboratedFragment,
- outputs: Readonly<Record<string, string>>,
-): FragmentContribution {
- const contribution = exportRunFragment(instance, Object.keys(outputs));
- return {
- outputs: [],
- candidates: contribution.candidates,
- operations: contribution.operations,
- satisfactions: contribution.exports.map((item) => ({
- output: outputs[item.name] as string,
- candidate: item.candidate,
- })),
- };
-}
-
/** Merge already elaborated contributions; final Graph validation remains Core's authority. */
export function mergeFragmentContributions(
graph: Pick<CompiledGraph, "outputs" | "candidates" | "operations">,
@@ -526,10 +505,3 @@ export function mergeFragmentContributions(
operations: [...graph.operations, ...contributions.flatMap((item) => item.operations)],
};
}
-
-export function sameFragmentInstance(
- left: ElaboratedFragment,
- right: ElaboratedFragment,
-): boolean {
- return canonicalStringify(left) === canonicalStringify(right);
-}
diff --git a/packages/elaborator/src/index.ts b/packages/elaborator/src/index.ts
index aeea5d51..044b9d19 100644
--- a/packages/elaborator/src/index.ts
+++ b/packages/elaborator/src/index.ts
@@ -49,12 +49,10 @@ export type {
} from "./source.js";
export {
bindAuthorFragment,
- bindCandidateFragment,
elaborateGraphFragment,
exportRunFragment,
FragmentError,
mergeFragmentContributions,
- sameFragmentInstance,
sealGraphFragment,
verifyGraphFragment,
} from "./fragment.js";
diff --git a/packages/elaborator/test/fragment.test.ts b/packages/elaborator/test/fragment.test.ts
index 97ff6cfe..b6f1f753 100644
--- a/packages/elaborator/test/fragment.test.ts
+++ b/packages/elaborator/test/fragment.test.ts
@@ -18,7 +18,6 @@ import {
bindAuthorFragment,
elaborateGraphFragment,
mergeFragmentContributions,
- sameFragmentInstance,
sealGraphFragment,
verifyGraphFragment,
} from "@narratage/elaborator";
@@ -204,7 +203,7 @@ test("the same Fragment instance is deterministic while distinct instances never
const opening = instance(linked, "opening");
const openingAgain = instance(linked, "opening");
const closing = instance(linked, "closing");
- assert.equal(sameFragmentInstance(opening, openingAgain), true);
+ assert.deepEqual(opening, openingAgain);
assert.notEqual(opening.id, closing.id);
assert.equal(
new Set([...opening.operations, ...closing.operations].map((operation) => operation.id)).size,
diff --git a/packages/local/src/config.ts b/packages/local/src/config.ts
index 377e87fc..ad3b9eef 100644
--- a/packages/local/src/config.ts
+++ b/packages/local/src/config.ts
@@ -205,6 +205,27 @@ export type RuntimeConfigPackageSelection = {
readonly runtimeSelection: NodePackageSelectionRequest;
};
+type OpenedRuntimeConfig = {
+ readonly absolute: string;
+ readonly document: RuntimeConfigDocument;
+ readonly root: string;
+ readonly packageRoot: string;
+};
+
+async function openRuntimeConfig(
+ path: string,
+ packageRootHint?: string,
+): Promise<OpenedRuntimeConfig> {
+ const absolute = resolve(path);
+ const document = parseRuntimeConfig(JSON.parse(await readFile(absolute, "utf8")));
+ return {
+ absolute,
+ document,
+ root: resolve(dirname(absolute), document.root ?? "."),
+ packageRoot: resolve(dirname(absolute), document.packageRoot ?? packageRootHint ?? document.root ?? "."),
+ };
+}
+
function runtimePackageSelection(document: RuntimeConfigDocument): NodePackageSelectionRequest {
return {
selected: [],
@@ -226,10 +247,7 @@ export async function runtimeConfigPackageSelection(
path: string,
options: LoadRuntimeConfigOptions = {},
): Promise<RuntimeConfigPackageSelection> {
- const absolute = resolve(path);
- const document = parseRuntimeConfig(JSON.parse(await readFile(absolute, "utf8")));
- const root = resolve(dirname(absolute), document.root ?? ".");
- const packageRoot = resolve(dirname(absolute), document.packageRoot ?? options.packageRoot ?? document.root ?? ".");
+ const { document, root, packageRoot } = await openRuntimeConfig(path, options.packageRoot);
return {
root,
packageRoot,
@@ -245,9 +263,7 @@ export async function runtimeConfigPackageSelection(
/** Deployment revision understood only by this Runtime Profile implementation. */
export async function runtimeConfigRevision(path: string): Promise<string> {
- const absolute = resolve(path);
- const document = parseRuntimeConfig(JSON.parse(await readFile(absolute, "utf8")));
- const root = resolve(dirname(absolute), document.root ?? ".");
+ const { document, root } = await openRuntimeConfig(path);
const locks: Record<string, string> = {};
for (const [name, value] of [
["packageLock", document.packageLock],
@@ -289,7 +305,7 @@ async function installLockedRuntimeAdapters(
}
/** One Endpoint's declaration of an external program its Provider drives. */
-export type DeclaredExternalService = {
+type DeclaredExternalService = {
readonly instance: string;
readonly service: RuntimeExternalService;
};
@@ -310,16 +326,13 @@ export async function declaredExternalServices(
path: string,
options: LoadRuntimeConfigOptions & { readonly capabilities?: readonly CapabilityRef[] } = {},
): Promise<{ readonly root: string; readonly services: readonly DeclaredExternalService[] }> {
- const absolute = resolve(path);
- const document = parseRuntimeConfig(JSON.parse(await readFile(absolute, "utf8")));
- const root = resolve(dirname(absolute), document.root ?? ".");
+ const { document, root, packageRoot } = await openRuntimeConfig(path, options.packageRoot);
// A Build with no demanded external capability has no program to discover.
// Keep validating the Profile document and its root, but do not load the
// privileged Runtime package closure merely to prove that the empty set is
// empty. `services up/status/down` omit this filter and still inspect every
// declared service.
if (options.capabilities?.length === 0) return { root, services: [] };
- const packageRoot = resolve(dirname(absolute), document.packageRoot ?? options.packageRoot ?? document.root ?? ".");
const registry = options.registry ?? new RuntimeAdapterRegistry();
await installLockedRuntimeAdapters(registry, document.runtimePackageLock, root, packageRoot, runtimePackageSelection(document));
const services: DeclaredExternalService[] = [];
@@ -357,10 +370,7 @@ export async function doctorRuntimeConfig(
path: string,
options: LoadRuntimeConfigOptions & { readonly capabilities?: readonly CapabilityRef[] } = {},
): Promise<RuntimeConfigDoctorResult> {
- const absolute = resolve(path);
- const document = parseRuntimeConfig(JSON.parse(await readFile(absolute, "utf8")));
- const root = resolve(dirname(absolute), document.root ?? ".");
- const packageRoot = resolve(dirname(absolute), document.packageRoot ?? options.packageRoot ?? document.root ?? ".");
+ const { absolute, document, root, packageRoot } = await openRuntimeConfig(path, options.packageRoot);
const diagnostics: RuntimeDoctorDiagnostic[] = [];
const credentialEndpoints: Array<{
readonly entry: RuntimeConfigEntry;
@@ -558,10 +568,7 @@ export async function createRuntimeFromConfig(
// Diagnostics and lifecycle discovery must not initialize SQLite, Drivers or Endpoints.
// Load the executable Runtime assembly only on the command that actually constructs it.
const { createProjectLocalRuntime } = await import("./runtime.js");
- const absolute = resolve(path);
- const document = parseRuntimeConfig(JSON.parse(await readFile(absolute, "utf8")));
- const root = resolve(dirname(absolute), document.root ?? ".");
- const packageRoot = resolve(dirname(absolute), document.packageRoot ?? options.packageRoot ?? document.root ?? ".");
+ const { document, root, packageRoot } = await openRuntimeConfig(path, options.packageRoot);
if (options.implementationPackages !== undefined) {
if (document.packageLock === undefined) {
throw new Error("Runtime Profile has no packageLock for the supplied implementation packages");
@@ -626,10 +633,7 @@ export async function createRuntimeControlFromConfig(
options: LoadRuntimeConfigOptions = {},
): Promise<LocalRuntimeControl> {
const { createProjectLocalRuntimeControl } = await import("./control.js");
- const absolute = resolve(path);
- const document = parseRuntimeConfig(JSON.parse(await readFile(absolute, "utf8")));
- const root = resolve(dirname(absolute), document.root ?? ".");
- const packageRoot = resolve(dirname(absolute), document.packageRoot ?? options.packageRoot ?? document.root ?? ".");
+ const { document, root, packageRoot } = await openRuntimeConfig(path, options.packageRoot);
const registry = options.registry ?? new RuntimeAdapterRegistry();
await installLockedRuntimeAdapters(registry, document.runtimePackageLock, root, packageRoot, runtimePackageSelection(document));
const runtimeServices = await Promise.all(document.runtimeServices.map(async (item) => {
@@ -683,10 +687,7 @@ export async function createRuntimeCredentialsFromConfig(
options: LoadRuntimeConfigOptions = {},
): Promise<LocalCredentialControl> {
const { createLocalCredentialControl } = await import("./credentials.js");
- const absolute = resolve(path);
- const document = parseRuntimeConfig(JSON.parse(await readFile(absolute, "utf8")));
- const root = resolve(dirname(absolute), document.root ?? ".");
- const packageRoot = resolve(dirname(absolute), document.packageRoot ?? options.packageRoot ?? document.root ?? ".");
+ const { document, root, packageRoot } = await openRuntimeConfig(path, options.packageRoot);
const endpointEntry = document.endpoints.find((item) => item.instance === endpointInstance);
if (endpointEntry === undefined) throw new Error(`Runtime Profile has no Endpoint instance ${endpointInstance}`);
const registry = options.registry ?? new RuntimeAdapterRegistry();
diff --git a/packages/local/src/index.ts b/packages/local/src/index.ts
index df1f8c5b..f046ec25 100644
--- a/packages/local/src/index.ts
+++ b/packages/local/src/index.ts
@@ -1,9 +1,5 @@
export {
- createLocalSchedulerPackage,
createLocalExecutionPackage,
- localRuntimeModuleRef,
- localSchedulerImplementationDigest,
- localWorkerImplementationDigest,
} from "./scheduler-package.js";
export {
createLocalRuntimeControl,
diff --git a/packages/local/src/scheduler-package.ts b/packages/local/src/scheduler-package.ts
index 66382859..29134ff4 100644
--- a/packages/local/src/scheduler-package.ts
+++ b/packages/local/src/scheduler-package.ts
@@ -7,35 +7,13 @@ import type { RuntimeServicePackage } from "@narratage/runtime";
import { durableLocalWorkerFactory } from "./worker.js";
-export const localRuntimeModuleRef = {
+const localRuntimeModuleRef = {
name: "@narratage/local",
version: "1",
} as const;
-export const localSchedulerImplementationDigest = digestOf("@narratage/local/scheduler@1");
-export const localWorkerImplementationDigest = digestOf("@narratage/local/worker@1");
-
-export function createLocalSchedulerPackage(
- instance = "scheduler.local",
-): RuntimeServicePackage {
- return defineRuntimeServicePackage({
- module: localRuntimeModuleRef,
- services: [{
- role: "scheduler",
- facet: "scheduler",
- instance,
- implementation: {
- digest: localSchedulerImplementationDigest,
- },
- configuration: { algorithm: "queue-free-atomic-resources", version: 1 },
- service: {
- create(executor, options) {
- return new LocalBuildScheduler(executor, options);
- },
- },
- }],
- });
-}
+const localSchedulerImplementationDigest = digestOf("@narratage/local/scheduler@1");
+const localWorkerImplementationDigest = digestOf("@narratage/local/worker@1");
export function createLocalExecutionPackage(
instance: string,
diff --git a/packages/markup/package.json b/packages/markup/package.json
index bbdada74..90e730a6 100644
--- a/packages/markup/package.json
+++ b/packages/markup/package.json
@@ -12,10 +12,5 @@
"@narratage/elaborator": "workspace:*",
"@narratage/host": "workspace:*",
"@narratage/protocol": "workspace:*"
- },
- "devDependencies": {
- "@narratage/narrative": "workspace:*",
- "@narratage/script": "workspace:*",
- "@narratage/text": "workspace:*"
}
}
diff --git a/packages/markup/src/frontend.ts b/packages/markup/src/frontend.ts
index e7ba17ad..0baaf2ff 100644
--- a/packages/markup/src/frontend.ts
+++ b/packages/markup/src/frontend.ts
@@ -163,6 +163,7 @@ export async function decodeMarkup(source: MarkupSource, context: MarkupDecodeCo
const fragments = new Map<string, GraphFragment>();
const recordIds = new Set<string>();
const componentIds = new Set<string>();
+ const privateBindings = new Set<string>();
let cursor = discovery.bodyStart;
let closed = false;
while (cursor < source.text.length) {
@@ -248,6 +249,34 @@ export async function decodeMarkup(source: MarkupSource, context: MarkupDecodeCo
});
cursor = parsed.nextOffset;
}
+ if (output.exports !== undefined) {
+ const generated = [
+ ...output.records.map((draft) => draft.id),
+ ...output.components.flatMap((draft) => Object.values(draft.outputs)),
+ ];
+ const available = new Set(generated);
+ const published = new Set<string>();
+ for (const name of output.exports) {
+ if (!available.has(name)) {
+ fail(
+ source,
+ "MARKUP_SURFACE_EXPORT_UNKNOWN",
+ `Surface ${moduleKey(bound.module.manifest)}#${registered.surface} publishes unknown binding ${name}.`,
+ opening.start,
+ );
+ }
+ if (published.has(name)) {
+ fail(
+ source,
+ "MARKUP_SURFACE_EXPORT_DUPLICATE",
+ `Surface ${moduleKey(bound.module.manifest)}#${registered.surface} publishes ${name} more than once.`,
+ opening.start,
+ );
+ }
+ published.add(name);
+ }
+ for (const name of generated) if (!published.has(name)) privateBindings.add(name);
+ }
for (const draft of output.records) {
if (
!Number.isInteger(draft.range.start)
@@ -355,7 +384,7 @@ export async function decodeMarkup(source: MarkupSource, context: MarkupDecodeCo
resolveImportedRef(ref),
])),
}));
- const exports: AuthorSourceExport[] = records.map((record) => ({
+ const exports: AuthorSourceExport[] = records.filter((record) => !privateBindings.has(record.id)).map((record) => ({
name: record.id,
ref: { kind: "record", id: record.id },
type: record.type,
@@ -364,6 +393,7 @@ export async function decodeMarkup(source: MarkupSource, context: MarkupDecodeCo
for (const component of resolvedComponents) {
const fragment = fragments.get(component.fragment) as GraphFragment;
for (const [output, name] of Object.entries(component.outputs)) {
+ if (privateBindings.has(name)) continue;
if (exportNames.has(name)) fail(source, "MARKUP_EXPORT_DUPLICATE", `Duplicate public export ${name}.`);
const declaration = fragment.exports.find((item) => item.name === output);
if (declaration === undefined) {
diff --git a/packages/markup/src/types.ts b/packages/markup/src/types.ts
index 7daa0ea5..5b4745aa 100644
--- a/packages/markup/src/types.ts
+++ b/packages/markup/src/types.ts
@@ -76,6 +76,12 @@ export type SurfaceDecodeOutput = {
readonly records: readonly SurfaceRecordDraft[];
readonly components: readonly SurfaceComponentDraft[];
readonly fragments: readonly GraphFragment[];
+ /**
+ * Public source bindings contributed by this Surface invocation. Omit to
+ * publish every generated binding; use an explicit list to keep plumbing
+ * addressable inside the source without exposing it from the source.
+ */
+ readonly exports?: readonly string[];
};
export type RawSurfaceInput = {
diff --git a/packages/media-track/src/surface.ts b/packages/media-track/src/surface.ts
index c51a4d7f..82a01581 100644
--- a/packages/media-track/src/surface.ts
+++ b/packages/media-track/src/surface.ts
@@ -891,5 +891,6 @@ export const decodeMediaTrackSurface: StructuredSurfaceHandler = ({ element, res
components: [{ id: trackId, fragment: fragment.id, inputs: state.inputs,
outputs: { visual: `${trackId}.visual`, ...(hasAudio ? { audio: `${trackId}.audio` } : {}) }, range: element.range }],
fragments: [fragment],
+ exports: [`${trackId}.visual`, ...(hasAudio ? [`${trackId}.audio`] : [])],
};
};
diff --git a/packages/package-loader-node/src/contribution.ts b/packages/package-loader-node/src/contribution.ts
index a1b4907c..8ad2d6fb 100644
--- a/packages/package-loader-node/src/contribution.ts
+++ b/packages/package-loader-node/src/contribution.ts
@@ -1,12 +1,4 @@
-import {
- registerProducerFacets,
- registerTypeValidatorFacets,
-} from "@narratage/component-kit";
-import type {
- ComponentPackage,
- ProducerRegistrar,
- TypeValidatorRegistrar,
-} from "@narratage/component-kit";
+import type { ComponentPackage } from "@narratage/component-kit";
import { canonicalize } from "@narratage/protocol";
import type { NodeModuleContribution, NodePackageContribution } from "./types.js";
@@ -32,8 +24,6 @@ function assertPackage(value: NodePackageContribution): void {
}
}
-export { assertPackage as assertNodePackageContribution };
-
function facetKey(
ref: { readonly module: { readonly name: string; readonly version: string }; readonly name: string },
): string {
@@ -96,14 +86,3 @@ export function collectNodePackageComponents(
}
return components;
}
-
-export function installNodePackageComponents(
- packages: readonly NodePackageContribution[],
- producers: ProducerRegistrar,
- validators: TypeValidatorRegistrar,
-): void {
- for (const component of collectNodePackageComponents(packages)) {
- registerTypeValidatorFacets(validators, component.validators ?? []);
- registerProducerFacets(producers, component.producers ?? []);
- }
-}
diff --git a/packages/package-loader-node/src/index.ts b/packages/package-loader-node/src/index.ts
index b043ad5e..b7eeb548 100644
--- a/packages/package-loader-node/src/index.ts
+++ b/packages/package-loader-node/src/index.ts
@@ -1,15 +1,13 @@
export {
- assertNodePackageContribution,
collectNodePackageComponents,
- installNodePackageComponents,
} from "./contribution.js";
export {
createNodePackageLock,
createNodePackageInventory,
loadNodePackageSet,
loadNodePackageSelection,
- loadNodePackageContributions,
NodePackageLockStaleError,
+ NodePackageSelectionMissingError,
readNodePackageLock,
selectNodePackageSpecifiers,
writeNodePackageLock,
diff --git a/packages/package-loader-node/src/lock.ts b/packages/package-loader-node/src/lock.ts
index a4627b17..a0e1043d 100644
--- a/packages/package-loader-node/src/lock.ts
+++ b/packages/package-loader-node/src/lock.ts
@@ -465,6 +465,24 @@ export class NodePackageLockStaleError extends Error {
}
}
+export class NodePackageSelectionMissingError extends Error {
+ readonly code = "PACKAGE_SELECTION_MISSING";
+ readonly subject: string;
+ readonly address: LogicalPackageAddress;
+
+ constructor(subject: string, address: LogicalPackageAddress) {
+ super([
+ `${subject} does not contain a package for the Source language selection:`,
+ ` ${address.abi} ${address.name}`,
+ "Synchronize the project package inventory after changing Source imports:",
+ " narratage packages sync <run-source> --runtime <profile>",
+ ].join("\n"));
+ this.name = "NodePackageSelectionMissingError";
+ this.subject = subject;
+ this.address = address;
+ }
+}
+
function artifactDifference(
installed: readonly LockedPackageArtifact[],
locked: readonly LockedPackageArtifact[],
@@ -740,10 +758,7 @@ function selectedNodePackageSpecifiers(
for (const address of logical.values()) {
const providers = inventory.packages.filter((item) =>
item.offers.some((offer) => addressKey(offer) === addressKey(address)));
- assert(providers.length > 0, [
- `${subject} does not provide this Source language selection:`,
- ` ${address.abi} ${address.name}`,
- ].join("\n"));
+ if (providers.length === 0) throw new NodePackageSelectionMissingError(subject, address);
assert(providers.length === 1, [
`${subject} ambiguously provides this Source language selection:`,
` ${address.abi} ${address.name}`,
@@ -782,10 +797,3 @@ export async function loadNodePackageSelection(
const selected = selectedNodePackageSpecifiers(inventory, request, `package inventory ${lockPath}`);
return await createNodePackageSet(selected, resolve(root), {}, { path: lockPath, lock: inventory });
}
-
-export async function loadNodePackageContributions(
- path: string,
- root = dirname(resolve(path)),
-): Promise<readonly NodePackageContribution[]> {
- return (await loadNodePackageSet(path, root)).packages.map((item) => item.contribution);
-}
diff --git a/packages/package-loader-node/test/loader.test.ts b/packages/package-loader-node/test/loader.test.ts
index deaef37e..8963de5f 100644
--- a/packages/package-loader-node/test/loader.test.ts
+++ b/packages/package-loader-node/test/loader.test.ts
@@ -10,18 +10,15 @@ import { join } from "node:path";
import test from "node:test";
import {
+ collectNodePackageComponents,
createNodePackageLock,
- installNodePackageComponents,
loadNodePackageSelection,
loadNodePackageSet,
- loadNodePackageContributions,
writeNodePackageLock,
} from "@narratage/package-loader-node";
import { modulePackageAbi } from "@narratage/protocol";
import { runtimeEndpointAdapterHostAbi, RuntimeAdapterRegistry } from "@narratage/runtime-adapter";
-import { TypeValidatorRegistry } from "@narratage/validation";
import { digestOf } from "@narratage/protocol";
-import type { ProducerRef } from "@narratage/protocol";
const implementationDigest = `sha256:${"1".repeat(64)}`;
const producerDigest = `sha256:${"3".repeat(64)}`;
@@ -206,22 +203,17 @@ test("an installed locked package carries inert Host facets and activatable comp
assert.deepEqual(lock.selected, ["example-card"]);
assert.deepEqual(lock.packages.map((value) => value.package.name), ["example-card", "example-helper"]);
await writeNodePackageLock(item.lock, lock);
- const packages = await loadNodePackageContributions(item.lock, item.root);
+ const packages = (await loadNodePackageSet(item.lock, item.root)).packages.map((value) => value.contribution);
assert.equal(packages[0]?.modules?.[0]?.manifest.name, "example.card");
assert.equal(packages[1]?.modules?.[0]?.manifest.name, "example.helper");
assert.equal(packages[0]?.hostFacets?.[0]?.abi, "svml.markup-surface-host@1");
- const registered: Array<{ readonly producer: ProducerRef; readonly digest: string }> = [];
- installNodePackageComponents(packages, {
- registerProducer(producer, digest) {
- registered.push({ producer, digest });
- },
- }, new TypeValidatorRegistry());
- assert.deepEqual(registered, [{
- producer: { module: { name: "example.card", version: "1" }, name: "make-card" },
- digest: producerDigest,
- }]);
+ assert.deepEqual(collectNodePackageComponents(packages).flatMap((component) => component.producers ?? [])
+ .map((facet) => ({ producer: facet.producer, digest: facet.implementationDigest })), [{
+ producer: { module: { name: "example.card", version: "1" }, name: "make-card" },
+ digest: producerDigest,
+ }]);
});
test("an empty local trust selection is a valid authenticated package lock", async () => {
@@ -232,7 +224,7 @@ test("an empty local trust selection is a valid authenticated package lock", asy
assert.deepEqual(lock.artifacts, []);
assert.deepEqual(lock.packages, []);
await writeNodePackageLock(path, lock);
- assert.deepEqual(await loadNodePackageContributions(path, root), []);
+ assert.deepEqual((await loadNodePackageSet(path, root)).packages, []);
});
test("dependency bytes are rejected before a locked contribution entry is reused", async () => {
@@ -242,7 +234,7 @@ test("dependency bytes are rejected before a locked contribution entry is reused
await writeFile(item.dependency, `${await readFile(item.dependency, "utf8")}\n// changed bytes\n`, "utf8");
await assert.rejects(
- async () => await loadNodePackageContributions(item.lock, item.root),
+ async () => await loadNodePackageSet(item.lock, item.root),
/installed Node package bytes do not match the lock/,
);
});
diff --git a/packages/run-markup/package.json b/packages/run-markup/package.json
index 5c39a851..9e75687c 100644
--- a/packages/run-markup/package.json
+++ b/packages/run-markup/package.json
@@ -14,5 +14,9 @@
"@narratage/protocol": "workspace:*",
"@narratage/run": "workspace:*",
"@narratage/markup": "workspace:*"
+ },
+ "devDependencies": {
+ "@narratage/core": "workspace:*",
+ "@narratage/elaborator": "workspace:*"
}
}
diff --git a/packages/run-markup/src/index.ts b/packages/run-markup/src/index.ts
index 453b4de3..c2afaeac 100644
--- a/packages/run-markup/src/index.ts
+++ b/packages/run-markup/src/index.ts
@@ -5,6 +5,5 @@ export {
} from "./frontend.js";
export {
parseRunDocument,
- parseTypeRef,
RunSyntaxError,
} from "./syntax.js";
diff --git a/packages/run-markup/src/syntax.ts b/packages/run-markup/src/syntax.ts
index f7137ca0..cab3ff9c 100644
--- a/packages/run-markup/src/syntax.ts
+++ b/packages/run-markup/src/syntax.ts
@@ -77,7 +77,7 @@ function empty(element: StructuredElement): void {
if (elements(element).length > 0) fail(element, "RUN_CHILD", `<${element.name}> must be empty`);
}
-export function parseTypeRef(value: string): TypeRef {
+function parseTypeRef(value: string): TypeRef {
const hash = value.lastIndexOf("#");
const version = hash <= 0 ? -1 : value.lastIndexOf("@", hash);
if (hash <= 0 || version <= 0 || version === hash - 1 || hash === value.length - 1) {
@@ -226,6 +226,7 @@ function parseRunDocumentBody(name: string, text: string): RunDocument {
const targets: RunTarget[] = [];
const candidates: RunCandidateDeclaration[] = [];
const satisfactions: RunSatisfaction[] = [];
+ const satisfiedOutputs = new Set<string>();
let bodyStarted = false;
for (const child of elements(root)) {
if (child.name === "author") {
@@ -248,7 +249,14 @@ function parseRunDocumentBody(name: string, text: string): RunDocument {
else if (child.name === "file") candidates.push(file(child));
else if (child.name === "build-record") candidates.push(buildRecord(child));
else if (child.name === "fragment") candidates.push(fragment(child));
- else if (child.name === "satisfy") satisfactions.push(satisfaction(child));
+ else if (child.name === "satisfy") {
+ const item = satisfaction(child);
+ if (satisfiedOutputs.has(item.output)) {
+ fail(child, "RUN_SATISFACTION_DUPLICATE", `<satisfy> repeats output ${item.output}`);
+ }
+ satisfiedOutputs.add(item.output);
+ satisfactions.push(item);
+ }
else fail(child, "RUN_CHILD", `<svrun> does not accept <${child.name}>`);
}
if (author === undefined) fail(root, "RUN_AUTHOR_MISSING", "<svrun> requires exactly one <author> declaration");
diff --git a/packages/run/test/run.test.ts b/packages/run-markup/test/run.test.ts
similarity index 95%
rename from packages/run/test/run.test.ts
rename to packages/run-markup/test/run.test.ts
index 7a1ead25..c537377a 100644
--- a/packages/run/test/run.test.ts
+++ b/packages/run-markup/test/run.test.ts
@@ -128,7 +128,7 @@ async function compileDocument(body: string) {
}, frontends);
}
-test("Run compilation consumes decode output without repeating package discovery", async () => {
+test("Run Markup compilation consumes decode output without repeating package discovery", async () => {
const frontends = new RunFrontendRegistry();
frontends.register({
...runMarkupFrontend,
@@ -269,6 +269,16 @@ test("Run imports are a prologue and Runtime settings are not language elements"
</svrun>`), /does not accept <provider>/u);
});
+test("duplicate satisfactions fail at the author-written Run edge", () => {
+ assert.throws(() => parseRunDocument("bad.svrun", `<svrun version="1">
+ <author source="./main.svml"/><target output="left"/>
+ <value id="one" type="example.run@1#Media" from="./one.json"/>
+ <value id="two" type="example.run@1#Media" from="./two.json"/>
+ <satisfy output="left" candidate="one"/>
+ <satisfy output="left" candidate="two"/>
+ </svrun>`), /bad\.svrun:6:\d+:.*repeats output left/u);
+});
+
test("a Target-only source still compiles one mandatory Run Graph", async () => {
const compiled = await compileDocument(`<svrun version="1"><author source="./main.svml"/><target output="left"/></svrun>`);
const compilation = fixture();
diff --git a/packages/run/package.json b/packages/run/package.json
index d543d6a0..ea0ba2b3 100644
--- a/packages/run/package.json
+++ b/packages/run/package.json
@@ -13,8 +13,5 @@
"@narratage/host": "workspace:*",
"@narratage/protocol": "workspace:*",
"@narratage/source": "workspace:*"
- },
- "devDependencies": {
- "@narratage/run-markup": "workspace:*"
}
}
diff --git a/packages/run/src/frontend-facet.ts b/packages/run/src/frontend-facet.ts
index a08e5073..a90479ad 100644
--- a/packages/run/src/frontend-facet.ts
+++ b/packages/run/src/frontend-facet.ts
@@ -21,10 +21,3 @@ export function createRunFrontendHostFacet(frontend: RunFrontend): RunFrontendHo
export function runFrontendsFromHostFacets(facets: readonly HostFacet[]): readonly RunFrontend[] {
return frontendsFromHostFacets<"run", RunFrontend>(sourceFrontendPackageAbi, "run", facets);
}
-
-export function installRunFrontendHostFacets(
- facets: readonly HostFacet[],
- registry: { register(frontend: RunFrontend): void },
-): void {
- for (const frontend of runFrontendsFromHostFacets(facets)) registry.register(frontend);
-}
diff --git a/packages/run/src/index.ts b/packages/run/src/index.ts
index 899b843c..8136825d 100644
--- a/packages/run/src/index.ts
+++ b/packages/run/src/index.ts
@@ -27,7 +27,6 @@ export {
} from "./frontend.js";
export {
createRunFrontendHostFacet,
- installRunFrontendHostFacets,
runFrontendsFromHostFacets,
} from "./frontend-facet.js";
export type { RunFrontendHostFacet } from "./frontend-facet.js";
diff --git a/packages/run/src/resolve.ts b/packages/run/src/resolve.ts
index 89fc7c6f..be746679 100644
--- a/packages/run/src/resolve.ts
+++ b/packages/run/src/resolve.ts
@@ -164,11 +164,17 @@ export async function resolveRunDocument(
for (const item of contribution.exports) bindCandidateName(`${declaration.id}.${item.name}`, item.candidate);
}
+ const satisfactionNames = new Map<string, string>();
const satisfactions = document.satisfactions.map((item) => {
const candidate = candidateNames.get(item.candidate);
if (candidate === undefined) throw new Error(`Unknown Run Candidate ${item.candidate}`);
+ const output = logicalOutput(context, item.output);
+ if (satisfactionNames.has(output)) {
+ throw new Error(`Logical Output ${item.output} is satisfied more than once`);
+ }
+ satisfactionNames.set(output, item.candidate);
return {
- output: logicalOutput(context, item.output),
+ output,
candidate,
} as const;
});
@@ -186,5 +192,6 @@ export async function resolveRunDocument(
document,
graph,
candidates: Object.fromEntries([...candidateNames.entries()].sort(([left], [right]) => left.localeCompare(right))),
+ satisfactionNames: Object.fromEntries([...satisfactionNames.entries()].sort(([left], [right]) => left.localeCompare(right))),
};
}
diff --git a/packages/run/src/types.ts b/packages/run/src/types.ts
index cc653449..8d109f2f 100644
--- a/packages/run/src/types.ts
+++ b/packages/run/src/types.ts
@@ -156,4 +156,6 @@ export type RunCompilation = {
readonly document: RunDocument;
readonly graph: RunGraph;
readonly candidates: Readonly<Record<string, string>>;
+ /** Author-written Candidate name selected for each resolved Logical Output. Presentation only. */
+ readonly satisfactionNames: Readonly<Record<string, string>>;
};
diff --git a/packages/runtime-adapter/src/index.ts b/packages/runtime-adapter/src/index.ts
index 192ae339..4c0522cb 100644
--- a/packages/runtime-adapter/src/index.ts
+++ b/packages/runtime-adapter/src/index.ts
@@ -15,7 +15,7 @@ export const runtimeServiceAdapterHostAbi = "svml.runtime-service-adapter-host@1
export type RuntimeAdapterKind = "endpoint" | "runtime-service";
-export function runtimeAdapterHostAbi(kind: RuntimeAdapterKind):
+function runtimeAdapterHostAbi(kind: RuntimeAdapterKind):
| typeof runtimeEndpointAdapterHostAbi
| typeof runtimeServiceAdapterHostAbi {
return kind === "endpoint" ? runtimeEndpointAdapterHostAbi : runtimeServiceAdapterHostAbi;
diff --git a/packages/runtime-adapter/test/registry.test.ts b/packages/runtime-adapter/test/registry.test.ts
index 305c422e..3043144a 100644
--- a/packages/runtime-adapter/test/registry.test.ts
+++ b/packages/runtime-adapter/test/registry.test.ts
@@ -15,12 +15,12 @@ import {
import type { RuntimeAdapterFactoryContext } from "@narratage/runtime-adapter";
const context = { root: "/tmp", instance: "one", config: {} };
-const endpointPackage = (instance: string, credentials: readonly unknown[] = []) => ({
+const endpointPackage = (instance: string) => ({
name: instance,
manifest: { facets: [] },
instance: { id: instance },
bindings: [],
- credentials,
+ credentials: [],
install() {},
}) as never;
const endpoint = (use: string, extra: Record<string, unknown> = {}) =>
@@ -121,39 +121,6 @@ test("one activation validates and declares the selected Endpoint", async () =>
assert.equal(activated, 2);
});
-test("credentials have one source: the activated Endpoint package", async () => {
- const registry = new RuntimeAdapterRegistry();
- registry.registerFacet(createRuntimeEndpointAdapterFacet({
- use: "example.credentials",
- activate(value) {
- return { endpoint: endpointPackage(value.instance, [{ slot: "token" }]) };
- },
- }));
- assert.deepEqual((await registry.activateEndpoint("example.credentials", context)).endpoint.credentials, [{ slot: "token" }]);
-});
-
-test("an external service is present only when the activation declares one", async () => {
- const registry = new RuntimeAdapterRegistry();
- registry.registerFacet(endpoint("example.bare"));
- registry.registerFacet(endpoint("example.declaring", {
- externalService: { id: "thing", probe: async () => ({ state: "ready" as const }) },
- }));
- assert.equal((await registry.activateEndpoint("example.bare", context)).externalService, undefined);
- assert.equal((await registry.activateEndpoint("example.declaring", context)).externalService?.id, "thing");
-});
-
-test("an activation may add diagnostics without another configuration declaration", async () => {
- const registry = new RuntimeAdapterRegistry();
- registry.registerFacet(endpoint("example.bare"));
- registry.registerFacet(endpoint("example.diagnosing", {
- diagnose: () => [{ severity: "warning" as const, code: "X", message: "m" }],
- }));
- const bare = await registry.activateEndpoint("example.bare", context);
- const diagnosing = await registry.activateEndpoint("example.diagnosing", context);
- assert.equal(bare.diagnose, undefined);
- assert.equal((await diagnosing.diagnose!()).length, 1);
-});
-
test("a produced facet is recognisable as a Runtime Adapter host facet", () => {
assert.ok(isRuntimeAdapterHostFacet(endpoint("example.endpoint")));
assert.equal(isRuntimeAdapterHostFacet({ abi: "something-else" } as never), false);
diff --git a/packages/runtime/src/index.ts b/packages/runtime/src/index.ts
index 1826a4f2..9a263dae 100644
--- a/packages/runtime/src/index.ts
+++ b/packages/runtime/src/index.ts
@@ -31,7 +31,6 @@ export {
operationCancellationRequestId,
sealOperationIdentity,
verifyOperationIdentity,
- verifyOperationCancellationControl,
verifyOperationSnapshot,
} from "./operations.js";
export type * from "./operations.js";
diff --git a/packages/runtime/src/operations.ts b/packages/runtime/src/operations.ts
index 30109ce1..05bdec83 100644
--- a/packages/runtime/src/operations.ts
+++ b/packages/runtime/src/operations.ts
@@ -206,7 +206,7 @@ export function operationCancellationRequestId(operation: Digest, requestedAt: n
return digestOf({ format: "svml.operation-cancellation-request@1", operation, requestedAt });
}
-export function verifyOperationCancellationControl(
+function verifyOperationCancellationControl(
operation: Digest,
control: OperationCancellationControl,
): void {
diff --git a/packages/runtime/test/profile.test.ts b/packages/runtime/test/profile.test.ts
index 783f8523..e646d076 100644
--- a/packages/runtime/test/profile.test.ts
+++ b/packages/runtime/test/profile.test.ts
@@ -170,7 +170,7 @@ test("recoverable Endpoints require an OperationStore before any paid execution"
);
});
-test("a selected CredentialStore is part of every explicit Runtime Profile", () => {
+test("credentialed Endpoints require a selected CredentialStore", () => {
const registry = new RuntimeModuleRegistry();
const configured = manifest();
registry.register({
@@ -179,7 +179,14 @@ test("a selected CredentialStore is part of every explicit Runtime Profile", ()
? { ...facet, credentialSlots: ["apiKey"] }
: facet),
});
- assert.doesNotThrow(() => resolveRuntimeProfile(registry, profile()));
+ const withoutCredentials = profile();
+ assert.throws(
+ () => resolveRuntimeProfile(registry, sealRuntimeProfile({
+ ...withoutCredentials,
+ stores: { ...withoutCredentials.stores, credentials: [] },
+ })),
+ /credentialed Endpoints require a CredentialStore/u,
+ );
});
test("Coverage rejects an unbound demanded Need before the Scheduler starts", () => {
diff --git a/packages/markup/test/markup.test.ts b/packages/script/test/markup-integration.test.ts
similarity index 98%
rename from packages/markup/test/markup.test.ts
rename to packages/script/test/markup-integration.test.ts
index 387bfa6b..7448bf9f 100644
--- a/packages/markup/test/markup.test.ts
+++ b/packages/script/test/markup-integration.test.ts
@@ -34,7 +34,7 @@ function scriptContext() {
} as const;
}
-test("Markup learns <script> only from an imported Script Manifest", async () => {
+test("Script teaches Markup <script> only through its imported Manifest", async () => {
const result = await decodeMarkup(
{
name: "talk.svml",
diff --git a/packages/spatial/src/surface.ts b/packages/spatial/src/surface.ts
index 2ed25546..56f90c6d 100644
--- a/packages/spatial/src/surface.ts
+++ b/packages/spatial/src/surface.ts
@@ -224,6 +224,7 @@ function frameSurface(
{ id, fragment: fragment.id, inputs: { parent: parent.ref, program: { kind: "record" as const, id: programId } }, outputs: { frame: id }, range: element.range },
],
fragments: [...parent.fragments, fragment],
+ exports: [id],
};
}
@@ -287,5 +288,6 @@ export const decodeAspectFrameSurface: StructuredSurfaceHandler = ({ element, re
{ id, fragment: aspectFrameFragment.id, inputs: { parent: parent.ref, extent: extent.ref, program: { kind: "record" as const, id: programId } }, outputs: { frame: id }, range: element.range },
],
fragments: [...parent.fragments, aspectFrameFragment],
+ exports: [id],
};
};
diff --git a/packages/speech-spine/src/surface.ts b/packages/speech-spine/src/surface.ts
index 5f7a1b92..562539e8 100644
--- a/packages/speech-spine/src/surface.ts
+++ b/packages/speech-spine/src/surface.ts
@@ -310,5 +310,6 @@ export const decodeSpeechSpineSurface: StructuredSurfaceHandler = ({ element, re
},
],
fragments: [...(normalizationComponents.length === 0 ? [] : [synchronizedMediaFragment]), assembly],
+ exports: [`${id}.basis`, `${id}.space`, `${id}.audio`, `${id}.visual`, `${id}.audioTrack`],
};
};
diff --git a/packages/transport-aws-lambda/src/index.ts b/packages/transport-aws-lambda/src/index.ts
index 4682b37f..5c786827 100644
--- a/packages/transport-aws-lambda/src/index.ts
+++ b/packages/transport-aws-lambda/src/index.ts
@@ -50,7 +50,7 @@ function decode(bytes: Uint8Array): string {
return new TextDecoder("utf-8", { fatal: true }).decode(bytes);
}
-export class AwsSdkLambdaInvocationClient implements LambdaInvocationClient {
+class AwsSdkLambdaInvocationClient implements LambdaInvocationClient {
readonly #client: LambdaClient;
constructor(config: LambdaClientConfig = {}) {
diff --git a/packages/typography-track/src/surface.ts b/packages/typography-track/src/surface.ts
index fa0da528..c0d86736 100644
--- a/packages/typography-track/src/surface.ts
+++ b/packages/typography-track/src/surface.ts
@@ -850,6 +850,7 @@ export const decodeTypographyTrackSurface: StructuredSurfaceHandler = ({ element
outputs: { program: `${id}.program`, track: `${id}.track` }, range: element.range,
}],
fragments: [fragment],
+ exports: [`${id}.program`, `${id}.track`],
};
};
@@ -895,5 +896,6 @@ export const decodeTypographyMaskSurface: StructuredSurfaceHandler = ({ element,
outputs: { track: `${id}.track` }, range: element.range,
}],
fragments: [fragment],
+ exports: [`${id}.track`],
};
};
diff --git a/packages/video-cli/test/cli.test.ts b/packages/video-cli/test/cli.test.ts
index a3d73bf1..f9d6608f 100644
--- a/packages/video-cli/test/cli.test.ts
+++ b/packages/video-cli/test/cli.test.ts
@@ -815,7 +815,8 @@ test("CLI inspect and get read the durable Build archive independently of build
core: buildDigest,
createdAt: 100,
updatedAt: 100,
- status: "active",
+ status: "waiting",
+ coreStatus: "active",
source: catalog.source,
run: catalog.run,
aliasCount: 3,
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 344b6903..cdd8dc48 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -659,10 +659,6 @@ importers:
'@narratage/runtime-adapter':
specifier: workspace:*
version: link:../runtime-adapter
- devDependencies:
- '@narratage/credential-store-env':
- specifier: workspace:*
- version: link:../credential-store-env
packages/deck-track:
dependencies:
@@ -1477,17 +1473,6 @@ importers:
'@narratage/protocol':
specifier: workspace:*
version: link:../protocol
- devDependencies:
- '@narratage/narrative':
- specifier: workspace:*
- version: link:../narrative
- '@narratage/script':
- specifier: workspace:*
- version: link:../script
- '@narratage/text':
- specifier: workspace:*
- version: link:../text
-
packages/media:
dependencies:
'@narratage/artifact':
@@ -2195,11 +2180,6 @@ importers:
'@narratage/source':
specifier: workspace:*
version: link:../source
- devDependencies:
- '@narratage/run-markup':
- specifier: workspace:*
- version: link:../run-markup
-
packages/run-markup:
dependencies:
'@narratage/markup':
@@ -2211,6 +2191,13 @@ importers:
'@narratage/run':
specifier: workspace:*
version: link:../run
+ devDependencies:
+ '@narratage/core':
+ specifier: workspace:*
+ version: link:../core
+ '@narratage/elaborator':
+ specifier: workspace:*
+ version: link:../elaborator
packages/runtime:
dependencies: