@deepseek-ai/dsh-session-store 0.0.0-stage → 0.2.3-alpha.4

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.
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Complete session log validation without constructing a Session.
3
+ * @module @deepseek-ai/dsh-session-store/validation
4
+ */
5
+ import { SessionLogOffset } from '@deepseek-ai/dsh-session';
6
+ import type { SessionEvent, SessionHeader, SessionMessageProjection, SessionSeedEventState } from '@deepseek-ai/dsh-session';
7
+ import { SurfaceManager } from './surface.ts';
8
+ /**
9
+ * Replay validated events through the surface in order and push each accepted event into `log`, which `surface` reads.
10
+ * Each event passes the surface transition before it enters `log`.
11
+ * @param events - events accepted by `checkSessionLog`.
12
+ * @param log - empty log that `surface` was constructed over.
13
+ * @param surface - incremental surface validator carrying the message interpreters.
14
+ * @throws on the first invalid surface transition; `log` then holds the accepted prefix.
15
+ */
16
+ export declare function replaySurfaceEvents(events: readonly SessionEvent[], log: SessionEvent[], surface: SurfaceManager): void;
17
+ /**
18
+ * Validate a header and event log without constructing a Session. It runs the
19
+ * two stages Session construction runs: first the structural checks on the
20
+ * header, event envelopes, sequences, and inherited cut, then surface replay
21
+ * in event order. Because the stages do not interleave, a log with several
22
+ * invalid points can report a different first error than an interleaved
23
+ * per-event check.
24
+ * Without `eventState` the checks use the borrowed seed mode: events and header
25
+ * are copied before validation. With it they validate and deeply freeze
26
+ * `header` in place and leave events uncopied.
27
+ * Embedded Assistant streams are not replayed.
28
+ * @param header - header whose `id` is the Session identity.
29
+ * @param events - seed events; omitted means no seed.
30
+ * @param inheritedEventCount - exact fork-inherited prefix length; required when `header.isSeeded`.
31
+ * @param eventState - aliasing state of adopted events; omitted for borrowed events.
32
+ * @param projections - message interpreters for plugin-owned events.
33
+ * @throws on the first invalid header field, event envelope, sequence, or inherited cut, then on the first invalid surface transition.
34
+ */
35
+ export declare function validateSessionLog(header: SessionHeader, events?: readonly SessionEvent[], inheritedEventCount?: SessionLogOffset, eventState?: SessionSeedEventState, projections?: readonly SessionMessageProjection[]): void;
36
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/validation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAmB,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,wBAAwB,EAAE,qBAAqB,EAA8B,MAAM,0BAA0B,CAAA;AACxJ,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAoB7C;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,YAAY,EAAE,EAC/B,GAAG,EAAE,YAAY,EAAE,EACnB,OAAO,EAAE,cAAc,GACtB,IAAI,CAKN;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,SAAS,YAAY,EAAE,EAChC,mBAAmB,CAAC,EAAE,gBAAgB,EACtC,UAAU,CAAC,EAAE,qBAAqB,EAClC,WAAW,GAAE,SAAS,wBAAwB,EAAO,GACpD,IAAI,CAIN"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/validation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAE5E,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAE7C;;;;;;GAMG;AACH,SAAS,kBAAkB,CAAC,KAAmB,EAAE,KAAa,EAAE,OAAmC;IACjG,4EAA4E;IAC5E,wEAAwE;IACxE,2DAA2D;IAC3D,IAAI,CAAC;QACH,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;IAC7B,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,+BAA+B,KAAK,KAAK,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,0BAA0B,EAAE,CAAC,CAAA;IACjI,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAA+B,EAC/B,GAAmB,EACnB,OAAuB;IAEvB,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;QAC9C,kBAAkB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAA;QACzC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACjB,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAqB,EACrB,MAAgC,EAChC,mBAAsC,EACtC,UAAkC,EAClC,cAAmD,EAAE;IAErD,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,EAAE,UAAU,IAAI,UAAU,CAAC,CAAA;IACzG,MAAM,GAAG,GAAmB,EAAE,CAAA;IAC9B,mBAAmB,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,cAAc,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAA;AACrG,CAAC"}
package/locale/de.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Sitzung",
4
+ "description": "Protokollieren Sie Nachrichten, Toolaufrufe und führen Sie Ereignisse in einer Sitzung aus."
5
+ }
6
+ }
package/locale/en.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "meta": {
3
+ "title": "session"
4
+ }
5
+ }
package/locale/es.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "sesión",
4
+ "description": "Registre mensajes, llamadas de herramientas y ejecute eventos en una sesión."
5
+ }
6
+ }
package/locale/fr.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "séance",
4
+ "description": "Enregistrez les messages, les appels d'outils et exécutez des événements dans une session."
5
+ }
6
+ }
package/locale/ja.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "セッション記録",
4
+ "description": "セッション内のメッセージ、ツール呼び出し、実行イベントを記録します。"
5
+ }
6
+ }
package/locale/pt.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "sessão",
4
+ "description": "Registrar mensagens, chamadas de ferramentas e executar eventos em uma sessão."
5
+ }
6
+ }
package/locale/ru.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "сессия",
4
+ "description": "Регистрируйте сообщения, вызовы инструментов и запускайте события в сеансе."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "会话记录",
4
+ "description": "记录会话中的消息、工具调用和运行事件。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,6 +1,53 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-session-store",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "description": "Event-sourced session store for the DeepSeek Harness: the plugin that provides ctx.sessions",
4
+ "version": "0.2.3-alpha.4",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
11
+ "directory": "packages/core/session-store"
12
+ },
13
+ "type": "module",
14
+ "main": "lib/index.js",
15
+ "types": "lib/types/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./lib/types/index.d.ts",
19
+ "default": "./lib/index.js"
20
+ },
21
+ "./src/*": "./src/*",
22
+ "./package.json": "./package.json",
23
+ "./locale/*.json": "./locale/*.json"
24
+ },
25
+ "files": [
26
+ "locale/*.json",
27
+ "lib/index.js",
28
+ "lib/types/**/*.d.ts",
29
+ "lib/types/**/*.d.ts.map",
30
+ "lib/**/*.js.map",
31
+ "src"
32
+ ],
33
+ "license": "MIT",
34
+ "peerDependencies": {
35
+ "@deepseek-ai/dsh-scope": "0.2.3-alpha.4",
36
+ "@deepseek-ai/dsh-session": "0.2.3-alpha.4",
37
+ "@deepseek-ai/dsh-session-data": "0.2.3-alpha.4",
38
+ "@deepseek-ai/cordis": "~4.2.0-alpha.3"
39
+ },
40
+ "devDependencies": {
41
+ "@deepseek-ai/dsh-agent-loop-testkit": "0.2.3-alpha.4",
42
+ "@deepseek-ai/dsh-brand": "0.2.3-alpha.4",
43
+ "@deepseek-ai/dsh-scope": "0.2.3-alpha.4",
44
+ "@deepseek-ai/dsh-session": "0.2.3-alpha.4",
45
+ "@deepseek-ai/dsh-session-data": "0.2.3-alpha.4",
46
+ "@deepseek-ai/dsh-typert-registry": "0.2.3-alpha.4",
47
+ "@deepseek-ai/cordis": "~4.2.0-alpha.3"
48
+ },
49
+ "dependencies": {
50
+ "@deepseek-ai/dsh-llm": "0.2.3-alpha.4",
51
+ "@deepseek-ai/dsh-util-values": "0.2.3-alpha.4"
52
+ }
6
53
  }