narraeon 0.5.5 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -323,10 +323,13 @@ summary 是目录简介,用于识别文档和判断是否需要读取。只写
323
323
  先按玩家授权与互动需要确定本轮叙事范围和停笔位置,再保存该范围内的事实。保存进行中活动的实际进展、必要原话和待回应事项即可整理截至此刻的状态,不把尚未发生的完成结果提前写入。
324
324
 
325
325
  1. 玩家视图实际绑定的当前值改变,本轮终态叙事前写回。等待、赶路、休息或跨日后按世界粒度更新对应现值;绑定标记只说明界面读取范围。
326
- 2. 需要保存但玩家原文和最终叙事没有记录的信息,当轮保存,包括重要场外进展、未表露的认知和隐蔽后果。工具中间文本不能替代持久记录。
327
- 3. 其余可从玩家原文和最终叙事恢复的持续结果,允许事件收尾或合适的中间整理点归并。
326
+ 2. 当前情境已采用顶层 \`背景\` 时,时间、地点等定位值发生变化应在最终叙事提交前写回该节点,避免在其他情境字段维护同一现值的第二份。没有该字段的世界不必创建,未变化不必写入,仅维护记录不授权推进剧情。
327
+ 3. 需要保存但玩家原文和最终叙事没有记录的信息,当轮保存,包括重要场外进展、未表露的认知和隐蔽后果。工具中间文本不能替代持久记录。
328
+ 4. 其余可从玩家原文和最终叙事恢复的持续结果,允许事件收尾或合适的中间整理点归并。
328
329
 
329
- 按已确定的叙事范围完成本轮必须保存的写入。只有本轮选择登记检查点时,才核对上次检查点后的交互和本轮范围内的结果,补齐必要记录,更新认知、进程、约定和界面值,结束实际已失效的待办并清理重复。整理可以停在活动中途;准备好该停笔位置的记录后登记检查点,再输出最终叙事。检查点覆盖该叙事,若其中又增加重要结果,继续工具调用补齐。正常回复无需登记检查点,登记回执也不是语义完整性认证。
330
+ 按已确定的叙事范围完成本轮必须保存的写入。在本轮原定停笔位置判断整理时机:事件自然告一段落、实际转换场景,或持续活动经过多轮并积累了需要归并的进展时,主动集中整理,不等玩家要求,也不等整个活动完成。只有零散即时变化时,按上述保存时机继续互动;一次写入不等于一次检查点。
331
+
332
+ 整理时核对上次检查点后的交互和本轮范围内的结果,补齐必要记录,更新认知、进程、约定和界面值,结束实际已失效的待办并清理重复。此前已写回的事实核对后沿用,无需重复写入。准备好该停笔位置的记录后,调用 world_checkpoint,再输出最终叙事;进行中的活动和待回应事项按原状保存,整理不改变停笔位置。检查点覆盖该叙事,若其中又增加重要结果,继续工具调用补齐。登记回执不是语义完整性认证。
330
333
 
331
334
  ## 整理与连续性
332
335
 
@@ -566,10 +569,13 @@ summary is a catalog description for identifying a document and deciding whether
566
569
  First choose this turn's narrative scope and stopping point from player authorization and interaction needs, then save facts within that scope. Recording actual progress in an ongoing activity, necessary exact wording and matters awaiting a response can complete maintenance through this moment without writing unrealized completion outcomes in advance.
567
570
 
568
571
  1. Write changed current values actually selected by player views before this turn's final narrative. After waiting, travel, rest or a day change, update those values at the world's granularity; binding annotations describe read locations only.
569
- 2. Save needed information absent from player originals and final narrative during this turn, including important offstage progress, unexpressed knowledge and hidden consequences. Intermediate tool text is not a durable substitute.
570
- 3. Other durable outcomes recoverable from player originals and final narrative may be consolidated at event closure or a suitable intermediate point.
572
+ 2. If the current situation already uses the exact top-level \`背景\` field, write changed time, location or other positioning values there before final narrative submission; avoid maintaining a second current copy elsewhere in that situation. Worlds without the field need not create it, unchanged values need no write, and record maintenance does not authorize story advancement.
573
+ 3. Save needed information absent from player originals and final narrative during this turn, including important offstage progress, unexpressed knowledge and hidden consequences. Intermediate tool text is not a durable substitute.
574
+ 4. Other durable outcomes recoverable from player originals and final narrative may be consolidated at event closure or a suitable intermediate point.
575
+
576
+ Complete required writes within the chosen narrative scope. At this turn's already chosen stopping point, assess whether consolidation is due: proactively consolidate when an event naturally settles, the scene actually changes, or an ongoing activity has accumulated progress across several turns that needs consolidation. Do not wait for the player to request maintenance or for the whole activity to finish. With only isolated immediate changes, continue the interaction under the saving rules above; one write does not mean one checkpoint.
571
577
 
572
- Complete required writes within the chosen narrative scope. Only if you choose to register a checkpoint this turn, reconcile interactions since the previous checkpoint and outcomes within this turn's scope: fill necessary records, update knowledge, processes, commitments and interface values, close actually expired pending work and remove duplicates. Maintenance can stop during an activity; prepare records for that stopping point, register the checkpoint, then produce final narrative. The checkpoint covers that narrative; if it adds another important outcome, continue tool calls to save it. A normal reply needs no checkpoint, and registration is not certification of semantic completeness.
578
+ When consolidating, reconcile interactions since the previous checkpoint and outcomes within this turn's scope: fill necessary records, update knowledge, processes, commitments and interface values, close actually expired pending work and remove duplicates. Reuse already saved facts after checking them, without duplicate writes. Once records for that stopping point are ready, call world_checkpoint, then produce final narrative. Preserve ongoing activities and matters awaiting a response as they stand; maintenance does not move the stopping point. The checkpoint covers that narrative; if it adds another important outcome, continue tool calls to save it. Registration is not certification of semantic completeness.
573
579
 
574
580
  ## Maintenance and continuity
575
581
 
@@ -604,6 +610,8 @@ Preserve the visible meaning of player-view targets. Containers display subtrees
604
610
 
605
611
  这些区别适用于物品、伤病、地点、组织、交易、调查与人物关系,不要求固定目录、字段或数量。独立引用、自身状态或生命周期需要独立文档;小规模信息可集中在合适载体中。当前情境只承接眼前地点、在场者、进行中的事及待回应事项,不承担全部历史或未来分支。
606
612
 
613
+ 当前情境的受限 YAML 可选用精确顶层「背景」保存简短定位值,例如「背景: {时间: 青历三年六月初八,夜间, 地点: 南门客栈}」。Runtime 会将该节点的完整值随已提交叙事保存,用于解释旧原文的“明天”“这里”;缺失、null、空白字符串、空映射或空数组不采集,0 和 false 保留。字段内部不设固定 schema,在场名单、待办和长局面留在其他字段;采用后在背景中维护对应现值,避免同一时间地点的第二份现值。无需为未采用的既有内容创建或搬迁字段;运行中修订不会改写旧历史背景。
614
+
607
615
  summary 是目录简介:只写识别文档所需的简短身份、主题或稳定线索,不复述具体状态和事件经过。具体事实放在正文,仅在识别信息改变时更新标题与简介。
608
616
 
609
617
  ## 承载与发现一起安排
@@ -641,6 +649,8 @@ Keep important event accounts in one place, using independently referenceable ev
641
649
 
642
650
  These distinctions apply to objects, injuries, places, organizations, trades, investigations and personal relationships without fixed directories, fields or counts. Independent reference, evolving state or lifecycle tracking warrants a separate document; smaller records may share a suitable home. The current situation holds the immediate location, people present, ongoing matters and unanswered requests, not all history or future branches.
643
651
 
652
+ Restricted YAML current situations may optionally use the exact top-level field 背景 for brief positioning values, for example \`背景: {时间: night on day eight, 地点: South Gate Inn}\`. Runtime saves the complete node with committed narrative to interpret old references to tomorrow or here; missing, null, blank strings and empty maps/lists are unrecorded, while 0 and false survive. Its contents have no fixed schema. Keep attendance, pending matters and long situations elsewhere; when adopted, maintain corresponding current values in this node without a second copy. Do not create or relocate fields in existing content merely to adopt this convention. Running-world revisions never rewrite saved historical backgrounds.
653
+
644
654
  summary is a catalog description: include only a brief identity, topic or stable clue needed to identify the document, not detailed state or event accounts. Concrete facts belong in the body. Update titles and descriptions only when identifying information changes.
645
655
 
646
656
  ## Arrange storage and discovery together
@@ -1065,13 +1075,13 @@ followups: []
1065
1075
  } catch (error) { feedback.textContent = String(error); }
1066
1076
  });
1067
1077
  }());
1068
- `},sample:s}}function De(e){let t=e===`zh-CN`;return[{id:`author.mechanics`,name:t?`创作工具与结算(必选)`:`Authoring tools and settlement (required)`,required:!0,body:Oe(e,`setting`)},{id:`author.guidance`,name:t?`创作建议`:`Authoring guidance`,required:!1,body:P(e)},{id:`author.target`,name:t?`创作目标与读取授权(动态必选)`:`Target and read authorization (required, dynamic)`,required:!0,body:t?`实际请求在此显示内容包或修订世界身份及当前树边界。世界修订保留独占 epoch;跨 epoch 继续时在用户消息前显式通知并清空读取授权。文件正文只通过工具按需读取,不预注入整棵树。`:`The actual request shows the content package or revision world identity and current-tree boundary here. World revision retains its exclusive epoch; continuing across epochs announces the transition before the user message and clears read authorization. Files are read on demand through tools, never injected as a whole tree.`},{id:`author.play-reference`,name:t?`未来游玩参考(动态)`:`Future play reference (dynamic)`,required:!1,body:t?`在此展开当前预设已启用的游玩编排,明确标为未来游玩参考,不是本轮叙事要求。内容包及世界正文仍通过创作工具读取。`:`Expands the current preset's enabled play arrangement as future-play reference, not narrative instructions for this conversation. Actual package and world content remains behind authoring tools.`}]}function Oe(e,t){let n=e===`zh-CN`;return`# ${n?`创作工具与结算`:`Authoring tools and settlement`}\n\n${n?`只使用请求随附的工具及其参数契约。含工具调用的响应是中间步;收到全部工具结果后继续,非空且无工具调用的响应结束本次发送。完整工具响应按调用顺序结算,失败调用不撤销成功同级调用。修改既有文件前必须完整读取;cursor 只属于产生它的树 revision;本事务自身成功修改后的完整读取授权由 Runtime 承接。外部树变化或跨 epoch 后旧授权失效,需要重新读取。工具返回逻辑路径,不能访问宿主文件。文档引用使用返回的 @ref;YAML 整文档引用为单键 {$ref: "@ref"},locator 使用 map key 或从零开始的数组下标。成功回执决定当前值,模型文字不构成提交。`:`Use only the attached tools and their parameter contracts. Responses with tool calls are intermediate steps; continue after all results. A nonempty tool-free response ends this send. Complete tool responses settle calls in order; a failed call does not undo successful siblings. Completely read existing files before writing. Cursors belong to their producing tree revision. Runtime carries complete-read authorization through this transaction’s own successful changes. External tree changes or an epoch transition invalidate old authorization and require new reads. Tools expose logical paths, never host files. Use returned @refs for documents; YAML whole-document references are single-key {$ref: "@ref"} maps, and locators use map keys or zero-based array indexes. Actual receipts determine current values; model prose cannot commit changes.`}\n\n${t===`setting`?n?`内容包工具的成功变化在完整响应结算时原子发布到当前树,无需应用。setting_create 建立新文档身份;删除仅在无绑定与引用阻挡时接受。`:`Successful content-package changes publish atomically to the current tree when the complete response settles, with no Apply step. setting_create establishes new document identities; deletion is accepted only without binding or reference blockers.`:n?`世界修订工具只修改持久独占 epoch 的 state/* 与 control/* 工作树。opening.md 不可读取或修改,既有状态文档不可删除或移动。只有玩家应用或放弃才结束 epoch;应用提交世界,放弃不改变世界。跨 epoch 全部旧读取授权失效。`:`World-revision tools modify only state/* and control/* in the durably locked exclusive epoch. opening.md cannot be read or changed; existing state documents cannot be deleted or moved. Only player Apply or Discard ends the epoch; Apply commits the world, Discard leaves it unchanged. Every old read authorization expires across epochs.`}\n\n${n?`control/player-views.yaml 的 format 为 narraeon.player-views/v1;views 中每项有 id、title 和 items,items 中每项有 id、label、select。精确选择一个 YAML 字段使用 select: {document: "@ref", locator: {yaml: [字段名]}};Markdown 小节使用 locator: {markdown: [标题]}。document 必须来自实际返回的引用,locator 必须对应已读正文;省略 locator 会展示整份文档,选择容器会递归展示子树。`:`control/player-views.yaml uses format: narraeon.player-views/v1. Each views entry has id, title and items; each item has id, label and select. Select one YAML field with select: {document: "@ref", locator: {yaml: [field]}}; select a Markdown section with locator: {markdown: [heading]}. Use a returned document reference and a locator from the actual read body. Omitting locator displays the whole document; selecting a container recursively displays its subtree.`}`}function ke(e,t=!1){return e===`zh-CN`?`已有对话或注入原文足够接续时,不例行检索或重读。缺失信息会影响人物行为、重要承诺、因果或玩家选择时才检索${t?`;仅使用本会话冻结的旧工具定义与参数定位及读取最近原文`:`;缺少最近上下文可直接 history_read {latest:4}`}。不记得原词时提出少量候选词,${t?`用已声明旧历史搜索的单个 query 做字面搜索`:`用 history_search queries 的 any/all 字面搜索`},命中后按需完整读前后文${t?``:`;all 限于同一消息`}。零命中不证明事件未发生,可改词、${t?`扩大字面范围或读相邻上下文`:`放宽 all 为 any 或读相邻上下文`}。原文已足以判断时停止,不为穷尽分页而检索;重要矛盾可继续追查。玩家原文可能只是行动尝试、意图或主张,结果须结合后续叙事;主持原文也可能包含角色谎言、猜测、梦境或回忆,role=narrator 不证明事实已确认。过去持有不代表现在持有,明确当前世界修订优先于旧叙事。主持读到的信息不自动成为场内角色的知识。注入历史是已发生材料,不是本轮新请求,不能重复执行最后一条历史玩家行动。读取完整原文可能很大,参考原文长度并按需小步扩展;无需固定 list→search→read 流程。`:`Do not routinely search or reread when conversation or injected originals already suffice. Retrieve only when missing details affect behavior, important promises, causality or player choices${t?`; use only this session's frozen legacy tool definitions and arguments to locate and read recent originals`:`; missing recent context can be read directly with history_read {latest:4}`}. When exact wording is unknown, propose a few candidate terms and ${t?`use the declared legacy literal search with a single query`:`use history_search queries with any/all`}, then read surrounding originals as needed${t?``:`; all applies within one message`}. Zero literal matches do not prove an event never happened: change terms, ${t?`widen the literal scope or read nearby context`:`relax all to any or read nearby context`}. Stop once originals support the decision, without exhausting pages; important contradictions may warrant further investigation. Player originals may be attempts, intentions or claims; check subsequent narrative for outcomes. Narrator originals may contain character lies, guesses, dreams or memories; role=narrator does not confirm truth. Past possession is not current possession; explicit current world corrections take precedence. Host information does not automatically become in-scene character knowledge. Injected history is already committed material, not the current request; never repeat a final historical player action. Full originals can be large: use length information and expand in small windows. No fixed list→search→read ritual is required.`}function Ae(e){return e===`system`||e===`user`||e===`assistant`}function je(e){let t=e===`zh-CN`,n=j(e);return[{id:`play.mechanics`,name:t?`工具与响应结算(必选)`:`Tools and response settlement (required)`,required:!0,body:t?`# 工具与响应结算
1078
+ `},sample:s}}function De(e){let t=e===`zh-CN`;return[{id:`author.mechanics`,name:t?`创作工具与结算(必选)`:`Authoring tools and settlement (required)`,required:!0,body:Oe(e,`setting`)},{id:`author.guidance`,name:t?`创作建议`:`Authoring guidance`,required:!1,body:P(e)},{id:`author.target`,name:t?`创作目标与读取授权(动态必选)`:`Target and read authorization (required, dynamic)`,required:!0,body:t?`实际请求在此显示内容包或修订世界身份及当前树边界。世界修订保留独占 epoch;跨 epoch 继续时在用户消息前显式通知并清空读取授权。文件正文只通过工具按需读取,不预注入整棵树。`:`The actual request shows the content package or revision world identity and current-tree boundary here. World revision retains its exclusive epoch; continuing across epochs announces the transition before the user message and clears read authorization. Files are read on demand through tools, never injected as a whole tree.`},{id:`author.play-reference`,name:t?`未来游玩参考(动态)`:`Future play reference (dynamic)`,required:!1,body:t?`在此展开当前预设已启用的游玩编排,明确标为未来游玩参考,不是本轮叙事要求。内容包及世界正文仍通过创作工具读取。`:`Expands the current preset's enabled play arrangement as future-play reference, not narrative instructions for this conversation. Actual package and world content remains behind authoring tools.`}]}function Oe(e,t){let n=e===`zh-CN`;return`# ${n?`创作工具与结算`:`Authoring tools and settlement`}\n\n${n?`只使用请求随附的工具及其参数契约。含工具调用的响应是中间步;收到全部工具结果后继续,非空且无工具调用的响应结束本次发送。完整工具响应按调用顺序结算,失败调用不撤销成功同级调用。修改既有文件前必须完整读取;cursor 只属于产生它的树 revision;本事务自身成功修改后的完整读取授权由 Runtime 承接。外部树变化或跨 epoch 后旧授权失效,需要重新读取。工具返回逻辑路径,不能访问宿主文件。文档引用使用返回的 @ref;YAML 整文档引用为单键 {$ref: "@ref"},locator 使用 map key 或从零开始的数组下标。成功回执决定当前值,模型文字不构成提交。`:`Use only the attached tools and their parameter contracts. Responses with tool calls are intermediate steps; continue after all results. A nonempty tool-free response ends this send. Complete tool responses settle calls in order; a failed call does not undo successful siblings. Completely read existing files before writing. Cursors belong to their producing tree revision. Runtime carries complete-read authorization through this transaction’s own successful changes. External tree changes or an epoch transition invalidate old authorization and require new reads. Tools expose logical paths, never host files. Use returned @refs for documents; YAML whole-document references are single-key {$ref: "@ref"} maps, and locators use map keys or zero-based array indexes. Actual receipts determine current values; model prose cannot commit changes.`}\n\n${t===`setting`?n?`内容包工具的成功变化在完整响应结算时原子发布到当前树,无需应用。setting_create 建立新文档身份;删除仅在无绑定与引用阻挡时接受。`:`Successful content-package changes publish atomically to the current tree when the complete response settles, with no Apply step. setting_create establishes new document identities; deletion is accepted only without binding or reference blockers.`:n?`世界修订工具只修改持久独占 epoch 的 state/* 与 control/* 工作树。opening.md 不可读取或修改,既有状态文档不可删除或移动。只有玩家应用或放弃才结束 epoch;应用提交世界,放弃不改变世界。跨 epoch 全部旧读取授权失效。`:`World-revision tools modify only state/* and control/* in the durably locked exclusive epoch. opening.md cannot be read or changed; existing state documents cannot be deleted or moved. Only player Apply or Discard ends the epoch; Apply commits the world, Discard leaves it unchanged. Every old read authorization expires across epochs.`}\n\n${n?`control/player-views.yaml 的 format 为 narraeon.player-views/v1;views 中每项有 id、title 和 items,items 中每项有 id、label、select。精确选择一个 YAML 字段使用 select: {document: "@ref", locator: {yaml: [字段名]}};Markdown 小节使用 locator: {markdown: [标题]}。document 必须来自实际返回的引用,locator 必须对应已读正文;省略 locator 会展示整份文档,选择容器会递归展示子树。`:`control/player-views.yaml uses format: narraeon.player-views/v1. Each views entry has id, title and items; each item has id, label and select. Select one YAML field with select: {document: "@ref", locator: {yaml: [field]}}; select a Markdown section with locator: {markdown: [heading]}. Use a returned document reference and a locator from the actual read body. Omitting locator displays the whole document; selecting a container recursively displays its subtree.`}`}function ke(e,t=!1){return e===`zh-CN`?`已有对话或注入原文足够接续时,不例行检索或重读。缺失信息会影响人物行为、重要承诺、因果或玩家选择时才检索${t?`;仅使用本会话冻结的旧工具定义与参数定位及读取最近原文`:`;缺少最近上下文可直接 history_read {latest:4}`}。不记得原词时提出少量候选词,${t?`用已声明旧历史搜索的单个 query 做字面搜索`:`用 history_search queries 的 any/all 字面搜索`},命中后按需完整读前后文${t?``:`;all 限于同一消息`}。零命中不证明事件未发生,可改词、${t?`扩大字面范围或读相邻上下文`:`放宽 all 为 any 或读相邻上下文`}。原文已足以判断时停止,不为穷尽分页而检索;重要矛盾可继续追查。玩家原文可能只是行动尝试、意图或主张,结果须结合后续叙事;主持原文也可能包含角色谎言、猜测、梦境或回忆,role=narrator 不证明事实已确认。历史背景保存的是采集位置的情境,不是当前世界状态,也不认证整段每句话的发生时间;推进前后标记结合原文中的回忆、梦境和局部时间解释。背景在原文边界之外,搜索只匹配原文。过去持有不代表现在持有,明确当前世界修订优先于旧叙事。主持读到的信息不自动成为场内角色的知识。注入历史是已发生材料,不是本轮新请求,不能重复执行最后一条历史玩家行动。读取完整原文可能很大,参考原文长度并按需小步扩展;无需固定 list→search→read 流程。`:`Do not routinely search or reread when conversation or injected originals already suffice. Retrieve only when missing details affect behavior, important promises, causality or player choices${t?`; use only this session's frozen legacy tool definitions and arguments to locate and read recent originals`:`; missing recent context can be read directly with history_read {latest:4}`}. When exact wording is unknown, propose a few candidate terms and ${t?`use the declared legacy literal search with a single query`:`use history_search queries with any/all`}, then read surrounding originals as needed${t?``:`; all applies within one message`}. Zero literal matches do not prove an event never happened: change terms, ${t?`widen the literal scope or read nearby context`:`relax all to any or read nearby context`}. Stop once originals support the decision, without exhausting pages; important contradictions may warrant further investigation. Player originals may be attempts, intentions or claims; check subsequent narrative for outcomes. Narrator originals may contain character lies, guesses, dreams or memories; role=narrator does not confirm truth. Historical background records the captured situation, not current world state or the time of every sentence; interpret before/after annotations alongside memories, dreams and local times in the original. Background stays outside original-text boundaries and literal searches match only originals. Past possession is not current possession; explicit current world corrections take precedence. Host information does not automatically become in-scene character knowledge. Injected history is already committed material, not the current request; never repeat a final historical player action. Full originals can be large: use length information and expand in small windows. No fixed list→search→read ritual is required.`}function Ae(e){return e===`system`||e===`user`||e===`assistant`}function je(e){let t=e===`zh-CN`,n=j(e);return[{id:`play.mechanics`,name:t?`工具与响应结算(必选)`:`Tools and response settlement (required)`,required:!0,body:t?`# 工具与响应结算
1069
1079
 
1070
1080
  只可调用请求随附的工具。目录使用预加载索引或工具返回的 @dir-*,无需重复列目录确认;文档和历史使用返回的 @句柄。工具结果标明读取范围、完整性及 cursor;目录摘要不等于正文。材料覆盖中完整正文与精确读取授予对应范围的写入资格,界面绑定标注不授予额外权限。初始世界材料只在全新上下文加载一次;后续成功工具调用与回执更新当前值和读取资格,不必重读自己刚成功写入的内容。全新上下文不继承旧对话授权。
1071
1081
 
1072
1082
  world_patch 的 YAML locator 可以包含 map key 和从零开始的数组下标;remove 删除一个精确位置。未提供的元数据保持原值。world_retire 从目录注入中退役文档,文档仍可读取、引用和恢复。工具响应的成功状态变化与后续最终叙事分别提交,后续失败不回滚已提交变化。成功写入回执表示当前值已改变;以真实回执的结算状态为准,模型文字不能提交世界。
1073
1083
 
1074
- 包含工具调用的响应属于中间步,其中的文字尚未展示或提交为最终叙事。收到全部工具结果后,根据回执在最终正文中呈现本轮尚未展示的内容,并与已提交状态一致;没有工具调用的非空正文结束本次循环并由 Runtime 提交。world_checkpoint 仅登记整理声明与历史重放边界,在随后非空且无工具调用的最终正文成功提交后生效,边界包含该正文;登记后仍可继续工具调用。正常回复无需检查点,登记不结束世界内事件,也不自动切换上下文,玩家自行选择。全新上下文补入边界后的已提交玩家原文与最终叙事,排除开场白、工具和推理。
1084
+ 包含工具调用的响应属于中间步,其中的文字尚未展示或提交为最终叙事。收到全部工具结果后,根据回执在最终正文中呈现本轮尚未展示的内容,并与已提交状态一致;没有工具调用的非空正文结束本次循环并由 Runtime 提交。world_checkpoint 仅登记整理声明与历史重放边界,在随后非空且无工具调用的最终正文成功提交后生效,边界包含该正文;登记后仍可继续工具调用。登记不结束世界内事件,也不自动切换上下文,玩家自行选择。全新上下文补入边界后的已提交玩家原文与最终叙事,排除开场白、工具和推理。
1075
1085
 
1076
1086
  ${ke(e)}`:`# Tools and response settlement
1077
1087
 
@@ -1079,7 +1089,7 @@ Use only attached tools. Directories use @dir-* handles from the preload or tool
1079
1089
 
1080
1090
  YAML world_patch locators accept map keys and zero-based array indexes; remove deletes one exact location. Omitted metadata remains unchanged. world_retire removes a document from catalog injection while keeping it readable, referenceable and restorable. Successful tool-response state changes and later final narrative commit separately; later failure does not roll back committed changes. Successful write receipts change current values; the actual receipt determines settlement, not model prose.
1081
1091
 
1082
- Responses containing tool calls are intermediate steps; their text has not yet been displayed or committed as final narrative. After all tool results, use the receipts to present this turn's still-unshown content in final prose consistent with committed state. A nonempty tool-free response ends this loop and Runtime commits it. world_checkpoint only registers a consolidation declaration and history-replay boundary; it takes effect after the subsequent nonempty tool-free final prose successfully commits, including that prose. Further tool calls may follow registration. Normal replies need no checkpoint; registration neither ends an in-world event nor switches context, which the player chooses. Fresh-context replay contains committed player originals and final narratives after the boundary, excluding the opening, tools and reasoning.
1092
+ Responses containing tool calls are intermediate steps; their text has not yet been displayed or committed as final narrative. After all tool results, use the receipts to present this turn's still-unshown content in final prose consistent with committed state. A nonempty tool-free response ends this loop and Runtime commits it. world_checkpoint only registers a consolidation declaration and history-replay boundary; it takes effect after the subsequent nonempty tool-free final prose successfully commits, including that prose. Further tool calls may follow registration. Registration neither ends an in-world event nor switches context, which the player chooses. Fresh-context replay contains committed player originals and final narratives after the boundary, excluding the opening, tools and reasoning.
1083
1093
 
1084
1094
  ${ke(e)}`},{id:`play.style`,name:t?`通用文风`:`General style`,body:n[`blocks/style.md`],required:!1},...[`adjudication`,`state`].map(e=>({id:`play.${e}`,name:t?e===`state`?`状态维护建议`:`裁判与玩家代理权`:e===`state`?`State maintenance`:`Adjudication and player agency`,body:n[`blocks/${e}.md`],required:!1})),{id:`play.narrative`,name:t?`叙事建议`:`Narrative guidance`,body:O(e),required:!1},...Object.entries(n).filter(([e])=>e.startsWith(`blocks/style-`)).map(([e,t])=>({id:`play.${e.slice(7,-3)}`,name:/^#\s+(.+)$/mu.exec(t)?.[1]??e,body:t,required:!1}))]}function Me({entries:e,onChange:t,mergeConsecutiveMessages:n=!0,onMergeConsecutiveMessagesChange:r,migrationNotice:i,authoring:a=!1,directory:o,promptPreview:s,detail:c,onSelectPrompt:u}){let[d,f]=(0,l.useState)(e[0]?.id),[p,m]=(0,l.useState)(),h=_(),g=h===`zh-CN`,v=(e,t)=>g?t:e,y=a?De(h):je(h),x=e.find(e=>e.id===d)??e[0],S=x?.kind===`builtin`?y.find(e=>e.id===x.builtin):void 0,C=e=>e.kind===`world`?v(`Complete world prompt`,`完整内容包提示`):e.kind===`user`?e.name:y.find(t=>t.id===e.builtin).name,w=e.findIndex(e=>e.id===x?.id);function T(n,r){let i=e.findIndex(e=>e.id===n);if(i<0||r<0||r>=e.length||i===r)return;let a=[...e],[o]=a.splice(i,1);a.splice(r,0,o),t(a)}function E(n){t(e.map(e=>e.id===n.id?n:e))}function D(n=``,r=v(`New prompt`,`新提示词`),i=`system`){let a={id:ge(),kind:`user`,name:r,enabled:!0,body:n,messageRole:i},o=[...e];o.splice(w+1,0,a),t(o),f(a.id),u?.()}return(0,b.jsxs)(`section`,{"aria-label":a?v(`Ordered authoring prompts`,`设定完善提示词编排`):v(`Ordered play prompts`,`游玩提示词编排`),children:[i&&(0,b.jsx)(`p`,{role:`status`,children:i}),r&&(0,b.jsxs)(`label`,{children:[(0,b.jsx)(`input`,{type:`checkbox`,checked:n,onChange:e=>r(e.target.checked)}),v(`Merge adjacent messages with the same role`,`合并相邻同角色消息`)]}),(0,b.jsxs)(`div`,{className:`ordered-play-editor`,children:[(0,b.jsxs)(`aside`,{children:[(0,b.jsx)(`button`,{type:`button`,onClick:()=>D(),children:v(`Add prompt`,`新增提示词`)}),(0,b.jsx)(`ol`,{"aria-label":v(`Prompt order`,`提示词顺序`),children:e.map((e,t)=>(0,b.jsxs)(`li`,{draggable:!0,onDragStart:()=>m(e.id),onDragEnd:()=>m(void 0),onDragOver:e=>e.preventDefault(),onDrop:e=>{e.preventDefault(),p&&T(p,t),m(void 0)},children:[(0,b.jsx)(`button`,{type:`button`,"aria-pressed":!c&&e.id===x?.id,onClick:()=>{f(e.id),u?.()},onKeyDown:n=>{n.altKey&&[`ArrowUp`,`ArrowDown`].includes(n.key)&&(n.preventDefault(),T(e.id,t+(n.key===`ArrowUp`?-1:1)))},children:C(e)}),e.kind!==`world`&&(0,b.jsx)(`input`,{type:`checkbox`,"aria-label":`${v(`Enable`,`启用`)} ${C(e)}`,checked:e.enabled,disabled:e.kind===`builtin`&&y.find(t=>t.id===e.builtin)?.required,onChange:t=>E({...e,enabled:t.target.checked})}),e.kind!==`world`&&!e.enabled&&(0,b.jsx)(`small`,{children:v(`Disabled`,`已停用`)})]},e.id))}),(0,b.jsx)(`p`,{children:v(`Drag or use Alt + arrow keys to reorder.`,`拖动或按 Alt + 方向键排序。`)}),o]}),c??(x&&(0,b.jsxs)(`div`,{className:`ordered-play-content`,children:[(0,b.jsxs)(`div`,{className:`ordered-play-actions`,children:[(0,b.jsx)(`button`,{type:`button`,disabled:w<=0,onClick:()=>T(x.id,w-1),children:v(`Move up`,`上移`)}),(0,b.jsx)(`button`,{type:`button`,disabled:w>=e.length-1,onClick:()=>T(x.id,w+1),children:v(`Move down`,`下移`)}),x.kind!==`world`&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(`label`,{children:[(0,b.jsx)(`input`,{type:`checkbox`,checked:x.enabled,disabled:S?.required,onChange:e=>E({...x,enabled:e.target.checked})}),v(`Enabled`,`启用`)]}),(0,b.jsx)(`button`,{type:`button`,onClick:()=>D(x.kind===`user`?x.body:S.body,`${C(x)} ${v(`copy`,`副本`)}`,x.messageRole??`system`),children:v(`Clone prompt`,`克隆提示词`)})]}),x.kind===`user`&&(0,b.jsx)(`button`,{type:`button`,onClick:()=>{t(e.filter(e=>e.id!==x.id)),f(void 0)},children:v(`Delete prompt`,`删除提示词`)})]}),(0,b.jsxs)(`div`,{className:`ordered-play-prompt-heading`,children:[(0,b.jsxs)(`label`,{children:[v(`Message role`,`发送角色`),(0,b.jsxs)(`select`,{"aria-label":v(`Message role`,`发送角色`),value:x.messageRole??`system`,disabled:x.kind===`builtin`,onChange:e=>{Ae(e.target.value)&&E({...x,messageRole:e.target.value})},children:[(0,b.jsx)(`option`,{value:`system`,children:`System`}),(0,b.jsx)(`option`,{value:`user`,children:`User`}),(0,b.jsx)(`option`,{value:`assistant`,children:`Assistant`})]})]}),x.kind!==`world`&&(0,b.jsxs)(`label`,{children:[v(`Prompt name`,`提示词名称`),(0,b.jsx)(`input`,{"aria-label":v(`Prompt name`,`提示词名称`),value:C(x),readOnly:x.kind===`builtin`,onChange:e=>{x.kind===`user`&&E({...x,name:e.target.value})}})]})]}),x.kind===`world`?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`h4`,{children:C(x)}),(0,b.jsx)(`p`,{children:v(`World instructions appear here. On a fresh context, frame-selected materials and the directory index are supplied as an initial tool result. Continuing retains these materials and appends actual interactions. Inspect the content in a world or content-package Prompt Preview.`,`世界指令在此展开;全新上下文时,frame 选中的材料与目录索引作为初始工具结果提供。继续时保留初始材料,追加真实交互。请在具体世界或内容包的真实提示预览中检查正文。`)})]}):(0,b.jsxs)(b.Fragment,{children:[S&&(0,b.jsx)(`p`,{children:v(`Application builtin: always resolves the latest text. Clone to keep an editable, independent copy.`,`系统引用始终使用应用最新版正文;克隆获得可编辑、独立的固定副本。`)}),(0,b.jsxs)(`label`,{children:[v(`Prompt text`,`提示词正文`),(0,b.jsx)(`textarea`,{"aria-label":v(`Prompt text`,`提示词正文`),rows:22,readOnly:x.kind===`builtin`,value:x.kind===`user`?x.body:S.body,onChange:e=>{x.kind===`user`&&E({...x,body:e.target.value})}})]})]}),s]}))]}),a&&S?.id===`author.mechanics`&&(0,b.jsxs)(`details`,{children:[(0,b.jsx)(`summary`,{children:v(`World revision tool contract`,`世界修订工具契约`)}),(0,b.jsx)(`pre`,{children:Oe(h,`world-revision`)})]})]})}var Ne=Symbol.for(`yaml.alias`),Pe=Symbol.for(`yaml.document`),Fe=Symbol.for(`yaml.map`),Ie=Symbol.for(`yaml.pair`),Le=Symbol.for(`yaml.scalar`),Re=Symbol.for(`yaml.seq`),ze=Symbol.for(`yaml.node.type`),Be=e=>!!e&&typeof e==`object`&&e[ze]===Ne,Ve=e=>!!e&&typeof e==`object`&&e[ze]===Pe,He=e=>!!e&&typeof e==`object`&&e[ze]===Fe,Ue=e=>!!e&&typeof e==`object`&&e[ze]===Ie,U=e=>!!e&&typeof e==`object`&&e[ze]===Le,We=e=>!!e&&typeof e==`object`&&e[ze]===Re;function Ge(e){if(e&&typeof e==`object`)switch(e[ze]){case Fe:case Re:return!0}return!1}function Ke(e){if(e&&typeof e==`object`)switch(e[ze]){case Ne:case Fe:case Le:case Re:return!0}return!1}var qe=e=>(U(e)||Ge(e))&&!!e.anchor,Je=Symbol(`break visit`),Ye=Symbol(`skip children`),Xe=Symbol(`remove node`);function Ze(e,t){let n=$e(t);Ve(e)?Qe(null,e.contents,n,Object.freeze([e]))===Xe&&(e.contents=null):Qe(null,e,n,Object.freeze([]))}Ze.BREAK=Je,Ze.SKIP=Ye,Ze.REMOVE=Xe;function Qe(e,t,n,r){let i=et(e,t,n,r);if(Ke(i)||Ue(i))return tt(e,r,i),Qe(e,i,n,r);if(typeof i!=`symbol`){if(Ge(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=Qe(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===Je)return Je;else i===Xe&&(t.items.splice(e,1),--e)}}else if(Ue(t)){r=Object.freeze(r.concat(t));let e=Qe(`key`,t.key,n,r);if(e===Je)return Je;e===Xe&&(t.key=null);let i=Qe(`value`,t.value,n,r);if(i===Je)return Je;i===Xe&&(t.value=null)}}return i}function $e(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function et(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(He(t))return n.Map?.(e,t,r);if(We(t))return n.Seq?.(e,t,r);if(Ue(t))return n.Pair?.(e,t,r);if(U(t))return n.Scalar?.(e,t,r);if(Be(t))return n.Alias?.(e,t,r)}function tt(e,t,n){let r=t[t.length-1];if(Ge(r))r.items[e]=n;else if(Ue(r))e===`key`?r.key=n:r.value=n;else if(Ve(r))r.contents=n;else{let e=Be(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var nt={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},rt=e=>e.replace(/[!,[\]{}]/g,e=>nt[e]),it=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+rt(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&Ke(e.contents)){let t={};Ze(e.contents,(e,n)=>{Ke(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
1085
1095
  `)}};it.defaultYaml={explicit:!1,version:`1.2`},it.defaultTags={"!!":`tag:yaml.org,2002:`};function at(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function ot(e){let t=new Set;return Ze(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function st(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function ct(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=ot(e);let a=st(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(U(t.node)||Ge(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function lt(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=lt(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=lt(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=lt(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=lt(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function ut(e,t,n){if(Array.isArray(e))return e.map((e,t)=>ut(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!qe(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var dt=class{constructor(e){Object.defineProperty(this,ze,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!Ve(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=ut(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?lt(i,{"":o},``,o):o}},ft=class extends dt{constructor(e){super(Ne),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],Ze(e,{Node:(e,t)=>{(Be(t)||qe(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(ut(a,null,t),n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=pt(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(at(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function pt(e,t,n){if(Be(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(Ge(t)){let r=0;for(let i of t.items){let t=pt(e,i,n);t>r&&(r=t)}return r}if(Ue(t)){let r=pt(e,t.key,n),i=pt(e,t.value,n);return Math.max(r,i)}return 1}var mt=e=>!e||typeof e!=`function`&&typeof e!=`object`,W=class extends dt{constructor(e){super(Le),this.value=e}toJSON(e,t){return t?.keep?this.value:ut(this.value,e,t)}toString(){return String(this.value)}};W.BLOCK_FOLDED=`BLOCK_FOLDED`,W.BLOCK_LITERAL=`BLOCK_LITERAL`,W.PLAIN=`PLAIN`,W.QUOTE_DOUBLE=`QUOTE_DOUBLE`,W.QUOTE_SINGLE=`QUOTE_SINGLE`;var ht=`tag:yaml.org,2002:`;function gt(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function _t(e,t,n){if(Ve(e)&&(e=e.contents),Ke(e))return e;if(Ue(e)){let t=n.schema[Fe].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new ft(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=ht+t.slice(2));let l=gt(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new W(e);return c&&(c.node=t),t}l=e instanceof Map?o[Fe]:Symbol.iterator in Object(e)?o[Re]:o[Fe]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new W(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function vt(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return _t(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var yt=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,bt=class extends dt{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>Ke(t)||Ue(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(yt(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(Ge(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,vt(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(Ge(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&U(i)?i.value:i:Ge(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Ue(t))return!1;let n=t.value;return n==null||e&&U(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return Ge(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(Ge(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,vt(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},xt=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function St(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Ct=(e,t,n)=>e.endsWith(`
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <meta name="color-scheme" content="dark" />
7
7
  <title>Narraeon</title>
8
- <script type="module" crossorigin src="/assets/index-DTFZQan4.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-BH8NyuE4.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-CVN48xrw.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "narraeon",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "description": "A local-first workspace for living worlds.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",