@xneog/dsh-session-checkpoint-policy 0.1.0 → 0.1.3-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +2 -2
- package/README.md +92 -10
- package/README.zh.md +95 -13
- package/package.json +19 -25
- package/lib/invariant.js +0 -23
- package/lib/types/invariant.d.ts +0 -16
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/session/session-checkpoint-policy/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 00bfe13caa38165f7b290cb053d837b3c3e542ac
|
|
6
|
+
README.zh.md: f3573b01123b4d0cb652a330f26f4c6e5fc0f67f
|
package/README.md
CHANGED
|
@@ -1,12 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: "Semantic session durability checkpoints for users and maintainers deploying persisted agents that must not lose a model request or tool side effect on crash."
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @xneog/dsh-session-checkpoint-policy
|
|
2
7
|
|
|
3
8
|
English | [中文](README.zh.md)
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
## Summary
|
|
11
|
+
|
|
12
|
+
`dsh-session-checkpoint-policy` is a zero-config plugin that makes a persisted session durable at the moments that matter: before a model request reaches the adapter, before a top-level tool body can produce an external side effect, and at each step boundary so the preceding response and tool results are stored before the next request. Load it beside one persistence backend, and a crash after any checkpoint resumes with the recorded work — a request, a tool call, or a completed step — instead of losing it. The policy adds no prompt, tool schema, or configuration; checkpoint failures are fail-closed, so neither the adapter nor a top-level tool body runs when the durable write cannot be confirmed. Live Assistant frames are transient until one `assistant/message` or `assistant/attempt` settlement commits the compact stream, and a persisted call without a result records an unknown outcome rather than retrying automatically.
|
|
13
|
+
|
|
14
|
+
## Table of Contents
|
|
15
|
+
|
|
16
|
+
- [Use this package](#use-this-package)
|
|
17
|
+
- [Understand the implementation](#understand-the-implementation)
|
|
18
|
+
- [Further Exploration](#further-exploration)
|
|
19
|
+
- [Model Experience](#model-experience)
|
|
20
|
+
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
|
21
|
+
- [Dev Note](#dev-note)
|
|
22
|
+
|
|
23
|
+
-----
|
|
24
|
+
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## Use this package
|
|
27
|
+
|
|
28
|
+
Mount this plugin in any composition that persists sessions and must survive a crash without redoing or losing work. Persistence and checkpoint scheduling are separate plugins: a backend stores the event log, and this policy decides when the store must be flushed.
|
|
29
|
+
|
|
30
|
+
### When to choose it
|
|
6
31
|
|
|
7
|
-
|
|
32
|
+
Choose it for every persisted agent that can be interrupted — a crash between a recorded tool call and its result, or between a model request and its response, is exactly the failure this policy contains. Loading a backend without it is valid but weaker: events still inside the backend's batching window or an outstanding write can be lost. Skip the policy when nothing persists sessions, or when a specialized deployment deliberately replaces the checkpoint schedule.
|
|
8
33
|
|
|
9
|
-
|
|
34
|
+
### Minimal configuration
|
|
35
|
+
|
|
36
|
+
No configuration fields exist; the plugin is a single load beside one persistence backend:
|
|
10
37
|
|
|
11
38
|
```yaml
|
|
12
39
|
- id: session-persistence
|
|
@@ -16,12 +43,52 @@ This zero-config function plugin consumes `ctx.sessions`, `ctx.llm`, `ctx.tools`
|
|
|
16
43
|
name: '@xneog/dsh-session-checkpoint-policy'
|
|
17
44
|
```
|
|
18
45
|
|
|
19
|
-
|
|
46
|
+
### What becomes durable
|
|
47
|
+
|
|
48
|
+
Three barriers are checkpointed. The model request is flushed before the adapter stream is constructed, so a crash before a response cannot replay an unpersisted request. A top-level tool call is flushed before the tool body runs, so a recorded call is durable before any external side effect; nested tool dispatches reuse the outer call's checkpoint. At each `agent/pre-step` boundary, everything the preceding step committed — its response and ordered tool results — is flushed before the next request is derived.
|
|
49
|
+
|
|
50
|
+
### Observable behavior and failures
|
|
51
|
+
|
|
52
|
+
After a checkpoint, the checkpointed work is durable: resume restores it from the store like any persisted session. If cancellation lands while a tool checkpoint flush is pending, the wrapper returns the canonical `ABORTED_BEFORE_DISPATCH` result and never enters the tool body. A checkpoint rejection is fail-closed at both boundaries — the adapter or top-level tool body does not run — and a step-boundary rejection fails the turn before another request starts.
|
|
53
|
+
|
|
54
|
+
-----
|
|
55
|
+
|
|
56
|
+
<a id="understand-the-implementation"></a>
|
|
57
|
+
## Understand the implementation
|
|
58
|
+
|
|
59
|
+
<details>
|
|
60
|
+
<summary>Implementation internals — click to expand</summary>
|
|
61
|
+
|
|
62
|
+
This section explains how the policy joins the loop and the persistence seam; the observable contract is covered in [Use this package](#use-this-package).
|
|
20
63
|
|
|
21
|
-
|
|
64
|
+
### Design concept
|
|
22
65
|
|
|
23
|
-
|
|
66
|
+
The plugin is a listener-only composition over three seams, with no state of its own: it wraps `llm/stream` so the downstream stream is not constructed until the live session's buffered request events are durable, wraps `tools/execute` after pre-execute policy and guards so a top-level tool body runs only after its recorded call is durable, and listens to `agent/pre-step` to persist the preceding response/result batch before request derivation. The session store's flush is the shared durability barrier; concurrent tool checkpoints serialize through it and cannot duplicate sequence numbers.
|
|
24
67
|
|
|
68
|
+
### Source map
|
|
69
|
+
|
|
70
|
+
| File | Role |
|
|
71
|
+
|---|---|
|
|
72
|
+
| [`src/index.ts`](src/index.ts) | Plugin entry: `apply` installs the three checkpoint listeners |
|
|
73
|
+
| — | No runtime invariant companion is published; checkpoint ordering is enforced at the intercepted waterfall and persistence seams; this stateless policy owns no independent mutable relation. |
|
|
74
|
+
|
|
75
|
+
</details>
|
|
76
|
+
|
|
77
|
+
-----
|
|
78
|
+
|
|
79
|
+
<a id="further-exploration"></a>
|
|
80
|
+
## Further Exploration
|
|
81
|
+
|
|
82
|
+
Read these pages when the package-level contract is not enough. They move from the durability model to the seam it joins and the shipped backends.
|
|
83
|
+
|
|
84
|
+
- [Session persistence subsystem](../../../docs/subsystems/persistence.md) — the flush checkpoint, batching window, and crash recovery every backend shares.
|
|
85
|
+
- [Session package map](../README.md) — adjacent persistence, projection, title, and telemetry packages.
|
|
86
|
+
- [Session persistence seam](../session-persistence/README.md) — the `ctx.sessionPersistence` service this policy flushes through.
|
|
87
|
+
- [JSONL persistence backend](../session-persistence-jsonl/README.md) — the shipped backend this policy is usually loaded beside.
|
|
88
|
+
|
|
89
|
+
-----
|
|
90
|
+
|
|
91
|
+
<a id="model-experience"></a>
|
|
25
92
|
## Model Experience
|
|
26
93
|
|
|
27
94
|
### Interrupted calls
|
|
@@ -40,6 +107,21 @@ The repair result is appended after the reusable prefix, so it does not invalida
|
|
|
40
107
|
|
|
41
108
|
## Known Limitations and Deferred Work
|
|
42
109
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
110
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
These limits define where the policy's durability guarantee stops. They are current package constraints, not a task backlog.
|
|
114
|
+
|
|
115
|
+
- **Durable execution intent, not exactly-once effects** — the policy records that a call was dispatched, not that its external effect completed. Side-effecting tools should forward `exec.callId` as an idempotency key when their provider supports one.
|
|
116
|
+
- **No checkpoint inside an active model attempt** — a hard crash may lose transient Assistant frames that have not reached their durable `assistant/message` or `assistant/attempt` settlement.
|
|
117
|
+
- **Unknown outcome, not automatic retry** — a persisted call without a result cannot prove whether its external effect completed, so recovery records an unknown outcome instead of retrying.
|
|
118
|
+
|
|
119
|
+
<a id="dev-note"></a>
|
|
120
|
+
### Dev Note
|
|
121
|
+
|
|
122
|
+
<details>
|
|
123
|
+
<summary>Working context for maintainers — click to expand</summary>
|
|
124
|
+
|
|
125
|
+
None.
|
|
126
|
+
|
|
127
|
+
</details>
|
package/README.zh.md
CHANGED
|
@@ -1,12 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: "面向用户与维护者的语义会话持久性检查点说明,用于部署不会在崩溃时丢失模型请求或工具副作用的持久化 agent。"
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @xneog/dsh-session-checkpoint-policy
|
|
2
7
|
|
|
3
8
|
[English](README.md) | 中文
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
## 概述
|
|
11
|
+
|
|
12
|
+
`dsh-session-checkpoint-policy` 是一个零配置插件,让持久化会话在关键时刻变得持久:模型请求到达适配器之前、顶层工具正文可能产生外部副作用之前,以及每个步骤边界——使前一响应与工具结果在下一个请求前已存储。把它与一个持久化后端一起加载后,任何检查点之后的崩溃都能恢复已记录的工作——请求、工具调用或已完成步骤——而不会丢失。该策略不添加提示词、工具 schema 或配置;检查点失败按失败即阻止原则处理,因此在无法确认持久写入时,适配器与顶层工具正文都不会运行。实时 Assistant frame 在一个 `assistant/message` 或 `assistant/attempt` settlement 提交紧凑 stream 前保持瞬态,而没有结果的持久调用会记录为未知结果,而不是自动重试。
|
|
13
|
+
|
|
14
|
+
## 目录
|
|
15
|
+
|
|
16
|
+
- [使用本包](#use-this-package)
|
|
17
|
+
- [理解实现](#understand-the-implementation)
|
|
18
|
+
- [进一步探索](#further-exploration)
|
|
19
|
+
- [模型体验](#model-experience)
|
|
20
|
+
- [已知限制与延期工作](#known-limitations-and-deferred-work)
|
|
21
|
+
- [开发备注](#dev-note)
|
|
22
|
+
|
|
23
|
+
-----
|
|
24
|
+
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## 使用本包
|
|
27
|
+
|
|
28
|
+
在持久化会话、且必须在崩溃时不重做或丢失工作的任何组合中挂载本插件。持久化与检查点调度是独立插件:后端存储事件日志,本策略决定何时必须刷新存储。
|
|
29
|
+
|
|
30
|
+
### 何时选择
|
|
6
31
|
|
|
7
|
-
|
|
32
|
+
为每个可能被中断的持久化 agent(智能体)选择它——已记录工具调用与其结果之间、或模型请求与其响应之间的崩溃,正是本策略遏制的那类故障。不带它加载后端是有效的但更弱:仍位于后端批处理窗口内或尚未完成的写入可能丢失。当没有持久化会话、或专用部署刻意替换检查点调度时,跳过本策略。
|
|
8
33
|
|
|
9
|
-
|
|
34
|
+
### 最小配置
|
|
35
|
+
|
|
36
|
+
不存在配置字段;插件只需与一个持久化后端一起加载:
|
|
10
37
|
|
|
11
38
|
```yaml
|
|
12
39
|
- id: session-persistence
|
|
@@ -16,19 +43,59 @@
|
|
|
16
43
|
name: '@xneog/dsh-session-checkpoint-policy'
|
|
17
44
|
```
|
|
18
45
|
|
|
19
|
-
|
|
46
|
+
### 什么会变得持久
|
|
47
|
+
|
|
48
|
+
三个屏障会被检查点化。模型请求在适配器流构造前被刷新,因此响应前的崩溃不会重放未持久化的请求。顶层工具调用在工具正文运行前被刷新,因此已记录调用在任何外部副作用前已持久;嵌套工具分派复用外层调用的检查点。在每个 `agent/pre-step` 边界,前一步骤提交的一切——其响应与有序工具结果——在派生下一个请求前被刷新。
|
|
49
|
+
|
|
50
|
+
### 可观察行为与失败
|
|
51
|
+
|
|
52
|
+
检查点之后,被检查点化的工作即已持久:恢复像任何持久化会话一样从存储还原它。如果取消在工具检查点 flush 等待期间到达,包装层会返回规范的 `ABORTED_BEFORE_DISPATCH` 结果,绝不进入工具正文。检查点拒绝在两个边界都按失败即阻止处理——适配器或顶层工具正文不运行——步骤边界的拒绝会在另一个请求开始前使轮次失败。
|
|
53
|
+
|
|
54
|
+
-----
|
|
55
|
+
|
|
56
|
+
<a id="understand-the-implementation"></a>
|
|
57
|
+
## 理解实现
|
|
58
|
+
|
|
59
|
+
<details>
|
|
60
|
+
<summary>实现细节——点击展开</summary>
|
|
61
|
+
|
|
62
|
+
本节说明该策略如何接入 loop 与持久化 seam;可观察约定已在[使用本包](#use-this-package)中说明。
|
|
20
63
|
|
|
21
|
-
|
|
64
|
+
### 设计理念
|
|
22
65
|
|
|
23
|
-
|
|
66
|
+
该插件只是对三个 seam 的纯监听组合,自身没有状态:它包装 `llm/stream`,使下游流只在活动会话中缓冲的请求事件已持久后构造;在预执行策略与防护之后包装 `tools/execute`,使顶层工具正文只在已记录调用已持久后运行;并监听 `agent/pre-step`,在派生请求前持久化前一响应/结果批次。会话存储的 flush 是共享持久性屏障;并发工具检查点经它串行化,不会产生重复序列号。
|
|
24
67
|
|
|
68
|
+
### 源码地图
|
|
69
|
+
|
|
70
|
+
| 文件 | 职责 |
|
|
71
|
+
|---|---|
|
|
72
|
+
| [`src/index.ts`](src/index.ts) | 插件入口:`apply` 安装三个检查点监听器 |
|
|
73
|
+
| — | 不发布运行时不变式伴生入口;顺序由被拦截的 seam 强制。 |
|
|
74
|
+
|
|
75
|
+
</details>
|
|
76
|
+
|
|
77
|
+
-----
|
|
78
|
+
|
|
79
|
+
<a id="further-exploration"></a>
|
|
80
|
+
## 进一步探索
|
|
81
|
+
|
|
82
|
+
当包级约定不够用时阅读以下页面。它们从持久性模型逐步进入它所加入的 seam 与随产品交付的后端。
|
|
83
|
+
|
|
84
|
+
- [会话持久化子系统](../../../docs/subsystems/persistence.zh.md)——每个后端共享的 flush 检查点、批处理窗口与崩溃恢复。
|
|
85
|
+
- [会话包映射](../README.zh.md)——相邻的持久化、投影、标题与遥测包。
|
|
86
|
+
- [会话持久化 seam](../session-persistence/README.zh.md)——本策略经由其刷新的 `ctx.sessionPersistence` 服务。
|
|
87
|
+
- [JSONL 持久化后端](../session-persistence-jsonl/README.zh.md)——本策略通常与之一起加载的随产品交付后端。
|
|
88
|
+
|
|
89
|
+
-----
|
|
90
|
+
|
|
91
|
+
<a id="model-experience"></a>
|
|
25
92
|
## 模型体验
|
|
26
93
|
|
|
27
94
|
### 中断调用
|
|
28
95
|
|
|
29
|
-
####
|
|
96
|
+
#### 模型看到什么
|
|
30
97
|
|
|
31
|
-
插件不添加提示词或工具 schema
|
|
98
|
+
插件不添加提示词或工具 schema。工具检查点后、结果前的硬崩溃会留下持久的未匹配调用;会话恢复提供由 `dsh-session` 负责的模型可见 `TOOL_OUTCOME_UNKNOWN` 结果。该消息允许重试只读或幂等工作,并要求对可能有副作用的调用验证状态或请求用户确认。
|
|
32
99
|
|
|
33
100
|
#### Token 影响
|
|
34
101
|
|
|
@@ -38,8 +105,23 @@
|
|
|
38
105
|
|
|
39
106
|
修复结果追加在可重用前缀之后,因此不会使较早的缓存条目失效。
|
|
40
107
|
|
|
41
|
-
##
|
|
108
|
+
## 已知限制与延期工作
|
|
109
|
+
|
|
110
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
这些限制界定本策略持久性保证的终点。它们是当前包约束,不是任务积压。
|
|
114
|
+
|
|
115
|
+
- **持久记录执行意图,而非恰好一次副作用**——策略记录的是调用已分派,而非其外部副作用已完成。当提供方支持时,有副作用的工具应将 `exec.callId` 作为幂等键转发。
|
|
116
|
+
- **活跃模型 attempt 内没有检查点**——硬崩溃可能丢失尚未进入持久 `assistant/message` 或 `assistant/attempt` settlement 的瞬态 Assistant frame。
|
|
117
|
+
- **记录未知结果,而非自动重试**——没有结果的持久调用无法证明其外部副作用是否完成,因此恢复记录未知结果,而不是自动重试。
|
|
118
|
+
|
|
119
|
+
<a id="dev-note"></a>
|
|
120
|
+
### 开发备注
|
|
121
|
+
|
|
122
|
+
<details>
|
|
123
|
+
<summary>维护者的工作上下文——点击展开</summary>
|
|
124
|
+
|
|
125
|
+
无。
|
|
42
126
|
|
|
43
|
-
|
|
44
|
-
- 流式 `assistant/chunk` 事件没有逐分片检查点。有界后台批次通常会在下一个语义检查点之前将其持久化,但硬崩溃可能丢失当前内存批次或尚未完成的写入。
|
|
45
|
-
- 已持久化的调用没有结果时,无法证明其外部副作用是否完成。因此,恢复会记录未知结果,而不是自动重试。
|
|
127
|
+
</details>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xneog/dsh-session-checkpoint-policy",
|
|
3
3
|
"description": "Semantic session durability checkpoints before model requests and tool side effects",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.3-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -18,40 +18,34 @@
|
|
|
18
18
|
"types": "./lib/types/index.d.ts",
|
|
19
19
|
"default": "./lib/index.js"
|
|
20
20
|
},
|
|
21
|
-
"./invariant": {
|
|
22
|
-
"types": "./lib/types/invariant.d.ts",
|
|
23
|
-
"default": "./lib/invariant.js"
|
|
24
|
-
},
|
|
25
21
|
"./src/*": "./src/*",
|
|
26
22
|
"./package.json": "./package.json"
|
|
27
23
|
},
|
|
28
24
|
"files": [
|
|
29
25
|
"lib/index.js",
|
|
30
|
-
"lib/invariant.js",
|
|
31
26
|
"lib/types/**/*.d.ts"
|
|
32
27
|
],
|
|
33
28
|
"license": "MIT",
|
|
34
29
|
"peerDependencies": {
|
|
35
|
-
"@xneog/
|
|
36
|
-
"@xneog/dsh-
|
|
37
|
-
"@xneog/dsh-llm": "0.1.
|
|
38
|
-
"@xneog/dsh-session": "0.1.
|
|
39
|
-
"@xneog/dsh-
|
|
40
|
-
"@xneog/dsh-
|
|
41
|
-
"@xneog/cordis": "0.1.0"
|
|
30
|
+
"@xneog/cordis": "^4.0.2",
|
|
31
|
+
"@xneog/dsh-agent": "^0.1.3-alpha.1",
|
|
32
|
+
"@xneog/dsh-llm": "^0.1.3-alpha.1",
|
|
33
|
+
"@xneog/dsh-session-persistence": "^0.1.3-alpha.1",
|
|
34
|
+
"@xneog/dsh-tools": "^0.1.3-alpha.1",
|
|
35
|
+
"@xneog/dsh-session": "^0.1.3-alpha.1"
|
|
42
36
|
},
|
|
43
37
|
"devDependencies": {
|
|
44
|
-
"@xneog/cordis
|
|
45
|
-
"@xneog/dsh-agent": "0.1.
|
|
46
|
-
"@xneog/
|
|
47
|
-
"@xneog/dsh-agent-loop-testkit": "0.1.
|
|
48
|
-
"@xneog/dsh-
|
|
49
|
-
"@xneog/dsh-
|
|
50
|
-
"@xneog/dsh-session": "0.1.
|
|
51
|
-
"@xneog/dsh-
|
|
52
|
-
"@xneog/dsh-session-
|
|
53
|
-
"@xneog/dsh-
|
|
54
|
-
"@xneog/dsh-tools": "0.1.
|
|
55
|
-
"@xneog/
|
|
38
|
+
"@xneog/cordis": "^4.0.2",
|
|
39
|
+
"@xneog/dsh-agent-loop": "^0.1.3-alpha.1",
|
|
40
|
+
"@xneog/cordis-plugin-loader": "^1.0.3",
|
|
41
|
+
"@xneog/dsh-agent-loop-testkit": "^0.1.3-alpha.1",
|
|
42
|
+
"@xneog/dsh-agent": "^0.1.3-alpha.1",
|
|
43
|
+
"@xneog/dsh-session": "^0.1.3-alpha.1",
|
|
44
|
+
"@xneog/dsh-session-persistence": "^0.1.3-alpha.1",
|
|
45
|
+
"@xneog/dsh-system-prompt": "^0.1.3-alpha.1",
|
|
46
|
+
"@xneog/dsh-session-projection": "^0.1.3-alpha.1",
|
|
47
|
+
"@xneog/dsh-llm": "^0.1.3-alpha.1",
|
|
48
|
+
"@xneog/dsh-tools": "^0.1.3-alpha.1",
|
|
49
|
+
"@xneog/dsh-session-persistence-jsonl": "^0.1.3-alpha.1"
|
|
56
50
|
}
|
|
57
51
|
}
|
package/lib/invariant.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//#region lib/types/invariant.js
|
|
2
|
-
/**
|
|
3
|
-
* Package-owned invariant companion for `@xneog/dsh-session-checkpoint-policy`.
|
|
4
|
-
* @module @xneog/dsh-session-checkpoint-policy/invariant
|
|
5
|
-
*/
|
|
6
|
-
const PACKAGE_NAME = "@xneog/dsh-session-checkpoint-policy";
|
|
7
|
-
/** Cordis companion plugin name. */
|
|
8
|
-
const name = "session-checkpoint-policy-invariant";
|
|
9
|
-
/** Service required before the companion can reserve package ownership. */
|
|
10
|
-
const inject = ["invariants"];
|
|
11
|
-
/**
|
|
12
|
-
* No runtime invariant: checkpoint ordering is enforced at the intercepted waterfall and
|
|
13
|
-
* persistence seams; this stateless policy owns no independent mutable relation.
|
|
14
|
-
*/
|
|
15
|
-
const install = () => {};
|
|
16
|
-
/**
|
|
17
|
-
* Register this package's invariant companion.
|
|
18
|
-
* @param ctx - Cordis context carrying the invariant service.
|
|
19
|
-
* @returns the installed registration's disposer after setup succeeds.
|
|
20
|
-
*/
|
|
21
|
-
const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
|
|
22
|
-
//#endregion
|
|
23
|
-
export { apply, inject, name };
|
package/lib/types/invariant.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Package-owned invariant companion for `@xneog/dsh-session-checkpoint-policy`.
|
|
3
|
-
* @module @xneog/dsh-session-checkpoint-policy/invariant
|
|
4
|
-
*/
|
|
5
|
-
import type { Context } from '@xneog/cordis';
|
|
6
|
-
/** Cordis companion plugin name. */
|
|
7
|
-
export declare const name = "session-checkpoint-policy-invariant";
|
|
8
|
-
/** Service required before the companion can reserve package ownership. */
|
|
9
|
-
export declare const inject: string[];
|
|
10
|
-
/**
|
|
11
|
-
* Register this package's invariant companion.
|
|
12
|
-
* @param ctx - Cordis context carrying the invariant service.
|
|
13
|
-
* @returns the installed registration's disposer after setup succeeds.
|
|
14
|
-
*/
|
|
15
|
-
export declare const apply: (ctx: Context) => Promise<() => void>;
|
|
16
|
-
//# sourceMappingURL=invariant.d.ts.map
|