@deepseek-ai/dsh-client-test-runtime 0.1.6-alpha.1 → 0.1.7-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 +7 -3
- package/README.zh.md +7 -3
- package/lib/index.js +509 -217
- package/lib/types/assembly/bundle-roster.d.ts +4 -3
- package/lib/types/assembly/roster.d.ts +4 -4
- package/lib/types/assembly/test-client.d.ts +1 -1
- package/lib/types/{settings-scope.d.ts → config-form.d.ts} +8 -8
- package/lib/types/fixtures.d.ts +2 -0
- package/lib/types/index.d.ts +24 -9
- package/lib/types/remote.d.ts +8 -0
- package/lib/types/sessions.d.ts +54 -42
- package/lib/types/workspaces.d.ts +20 -1
- package/package.json +51 -51
|
@@ -5,11 +5,12 @@ export declare const WEB_PROFILE_BUNDLES: readonly string[];
|
|
|
5
5
|
* Compose the browser roster of `bundles`, applied in order.
|
|
6
6
|
* @param bundles - bundle package names in application order.
|
|
7
7
|
* @param anchor - file whose package resolution locates the bundles; default this package.
|
|
8
|
+
* @param disabledContext - optional Loader evaluation scope for trusted `disabled` expressions.
|
|
8
9
|
* @returns the roster in composition order, one row per package.
|
|
9
10
|
* @throws {Error} when a bundle, its patch file, or an enabled row's package does not resolve, when the patch list
|
|
10
|
-
* is not a list or does not apply as written, or when a browser row
|
|
11
|
+
* is not a list or does not apply as written, or when a browser row has an unevaluated `disabled` expression.
|
|
11
12
|
*/
|
|
12
|
-
export declare function bundleRoster(bundles: readonly string[], anchor?: string): ClientRoster;
|
|
13
|
-
/** The `web` profile's browser roster, composed
|
|
13
|
+
export declare function bundleRoster(bundles: readonly string[], anchor?: string, disabledContext?: object): ClientRoster;
|
|
14
|
+
/** The `web` profile's browser roster, composed with its profile name and no business Host services. */
|
|
14
15
|
export declare const webApp: ClientRoster;
|
|
15
16
|
//# sourceMappingURL=bundle-roster.d.ts.map
|
|
@@ -18,10 +18,10 @@ export interface ClientRosterRow {
|
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Synthesize the raw `WebBootGraph` for `rows`: one `application` batch
|
|
21
|
-
* holding every row, `rev: 'local'`, placeholder
|
|
22
|
-
*
|
|
23
|
-
* stays with the production `parseBootManifest` inside the module
|
|
24
|
-
* duplicate names and an empty roster are rejected there, not here.
|
|
21
|
+
* holding every row, `rev: 'local'`, placeholder `plugins/<name>/client.js`
|
|
22
|
+
* references, since every module is seeded in process and never fetched.
|
|
23
|
+
* Validation stays with the production `parseBootManifest` inside the module
|
|
24
|
+
* system: duplicate names and an empty roster are rejected there, not here.
|
|
25
25
|
* @param rows - roster rows in composition order.
|
|
26
26
|
* @returns the unparsed graph, as `createClientModuleSystem` consumes it.
|
|
27
27
|
*/
|
|
@@ -55,7 +55,7 @@ export declare class TestClient {
|
|
|
55
55
|
/** Flush pending React work and microtasks inside `act` (plain microtask flush without a DOM). */
|
|
56
56
|
flush(): Promise<void>;
|
|
57
57
|
/**
|
|
58
|
-
* Rebuild one Loader entry:
|
|
58
|
+
* Rebuild one Loader entry: Client Modules' registry-first fiber teardown, then
|
|
59
59
|
* `entry.refresh()`. Each client's module table retains its own instance-bound
|
|
60
60
|
* Connection plugin, so reloads do not coordinate through process globals.
|
|
61
61
|
* Requires a live client: after `dispose()` the Loader holds no entries and
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/** Test
|
|
1
|
+
/** Test doubles for settings transport. */
|
|
2
2
|
import { vi } from 'vitest';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ConfigForm, ConfigFormSnapshot } from '@deepseek-ai/dsh-client-ui-settings/client';
|
|
4
4
|
/** Handle over one stubbed scope: the scope, its write spy, and publication controls. */
|
|
5
|
-
export interface
|
|
5
|
+
export interface StubConfigForm<T> {
|
|
6
6
|
/** The scope face handed to the service under test. */
|
|
7
|
-
scope:
|
|
7
|
+
scope: ConfigForm<T>;
|
|
8
8
|
/** Spy behind `scope.set`; resolves immediately. */
|
|
9
9
|
set: ReturnType<typeof vi.fn>;
|
|
10
10
|
/** Spy behind `scope.mutate`; resolves immediately. */
|
|
11
|
-
mutate: ReturnType<typeof vi.fn
|
|
11
|
+
mutate: ReturnType<typeof vi.fn<ConfigForm<T>['mutate']>>;
|
|
12
12
|
/** Spy behind `scope.unset`; resolves immediately. */
|
|
13
13
|
unset: ReturnType<typeof vi.fn>;
|
|
14
14
|
/** @returns how many listeners are currently subscribed (disposal assertions). */
|
|
@@ -18,12 +18,12 @@ export interface StubSettingsScope<T> {
|
|
|
18
18
|
* acceptance would.
|
|
19
19
|
* @param next - snapshot fields to replace.
|
|
20
20
|
*/
|
|
21
|
-
publish(next: Partial<
|
|
21
|
+
publish(next: Partial<ConfigFormSnapshot<T>>): void;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Build an in-memory settings scope for service specs: starts in the host
|
|
25
25
|
* loading state, records writes, and lets the test publish Host acceptances.
|
|
26
26
|
* @returns the stub handle.
|
|
27
27
|
*/
|
|
28
|
-
export declare function
|
|
29
|
-
//# sourceMappingURL=
|
|
28
|
+
export declare function stubConfigForm<T>(): StubConfigForm<T>;
|
|
29
|
+
//# sourceMappingURL=config-form.d.ts.map
|
package/lib/types/fixtures.d.ts
CHANGED
|
@@ -44,6 +44,8 @@ export interface SessionFixture {
|
|
|
44
44
|
events?: readonly SessionEventLikeEntry[];
|
|
45
45
|
/** Whether the initial event window has an older page. */
|
|
46
46
|
hasMore?: boolean;
|
|
47
|
+
/** Optional shared initial-opening barrier for the fixture's Client generation. */
|
|
48
|
+
initialOpen?: (signal: AbortSignal) => void | Promise<void>;
|
|
47
49
|
}
|
|
48
50
|
/**
|
|
49
51
|
* A complete quiescent Session Controller snapshot.
|
package/lib/types/index.d.ts
CHANGED
|
@@ -16,17 +16,19 @@ import type { RenderResult } from '@testing-library/react';
|
|
|
16
16
|
import type { queries } from '@testing-library/dom';
|
|
17
17
|
import type { BoundFunctions } from '@testing-library/dom';
|
|
18
18
|
import { SlotRegistry } from '@deepseek-ai/dsh-client-ui-renderer/client';
|
|
19
|
+
import type { SessionReference } from '@deepseek-ai/dsh-api-session-controller/client';
|
|
19
20
|
import type { SessionId } from '@deepseek-ai/dsh-session/types';
|
|
20
21
|
import type { PanelInfo } from '@deepseek-ai/dsh-client-ui-layout/client';
|
|
21
|
-
import type { ChildrenDecl, ComposedProps, HostObservable, OwnerOf, RenderOpts, SlotComponent, SlotMap, SlotRenderer, SnapshotSelectorHook, StoreInstanceLike } from '@deepseek-ai/dsh-client-ui-slots';
|
|
22
|
+
import type { ChildrenDecl, ComposedProps, HostObservable, OwnerOf, RenderOpts, SlotComponent, SlotMap, SlotRenderer, SlotFactoryMap, SnapshotSelectorHook, StoredFactory, StoreInstanceLike } from '@deepseek-ai/dsh-client-ui-slots';
|
|
23
|
+
import { TestRemote } from './remote.ts';
|
|
22
24
|
import { TestSessions } from './sessions.ts';
|
|
23
25
|
import { TestWorkspaces } from './workspaces.ts';
|
|
24
26
|
import type { Stabilizer } from './fixtures.ts';
|
|
25
27
|
export type { UseSession } from '@deepseek-ai/dsh-client-ui-session/client';
|
|
26
28
|
export { domSnapshotSerializer, registerDomSnapshotSerializer } from './snapshot.ts';
|
|
27
29
|
export { FixtureSession, TestSessions } from './sessions.ts';
|
|
28
|
-
export {
|
|
29
|
-
export type {
|
|
30
|
+
export { stubConfigForm } from './config-form.ts';
|
|
31
|
+
export type { StubConfigForm } from './config-form.ts';
|
|
30
32
|
export { TestWorkspaces } from './workspaces.ts';
|
|
31
33
|
export { RemoteError, TestRemote } from './remote.ts';
|
|
32
34
|
export { chatSnapshot, conversationSnapshot, sessionSnapshot, workspaceSnapshot, } from './fixtures.ts';
|
|
@@ -44,6 +46,10 @@ export declare function bindSnapshotSelector<T>(source: HostObservable<T>): Snap
|
|
|
44
46
|
* @returns Slot renderer instance.
|
|
45
47
|
*/
|
|
46
48
|
export declare function createSlotRenderer(): SlotRenderer;
|
|
49
|
+
/** Per-view render options; the caller owns the explicitly supplied Session reference. */
|
|
50
|
+
export interface SlotTestRenderOptions extends RenderOpts {
|
|
51
|
+
readonly session?: SessionReference | undefined;
|
|
52
|
+
}
|
|
47
53
|
/**
|
|
48
54
|
* One rendered slot's local view, from {@link SlotTestRuntime.renderSlot}:
|
|
49
55
|
* the renderer's own `[data-slot]` outlet anchor is the snapshot root
|
|
@@ -60,8 +66,9 @@ export interface SlotView<K extends keyof SlotMap & string> {
|
|
|
60
66
|
* Replace the owner props and flush the re-render (the render-site update:
|
|
61
67
|
* in production the owner recomputes the share and React re-renders).
|
|
62
68
|
* @param owner - the next owner props share.
|
|
69
|
+
* @param opts - replacement render options and borrowed reference; omission keeps this view's options.
|
|
63
70
|
*/
|
|
64
|
-
update(owner: OwnerOf<K
|
|
71
|
+
update(owner: OwnerOf<K>, opts?: SlotTestRenderOptions): void;
|
|
65
72
|
}
|
|
66
73
|
/**
|
|
67
74
|
* Mounted feature plugin handle: the live fiber plus an act-wrapped,
|
|
@@ -121,8 +128,10 @@ export declare class SlotTestRuntime {
|
|
|
121
128
|
readonly slots: SlotRegistry;
|
|
122
129
|
/** The test-owned 'root' occupant. */
|
|
123
130
|
readonly root: TestRoot;
|
|
124
|
-
/**
|
|
131
|
+
/** Fixture catalog, explicit references, scoped contexts, and behavior faces. */
|
|
125
132
|
readonly sessions: TestSessions;
|
|
133
|
+
/** One Remote double shared by every feature mounted in this runtime. */
|
|
134
|
+
readonly remote: TestRemote;
|
|
126
135
|
/** Workspaces double (list observable, recorded intent actions). */
|
|
127
136
|
readonly workspaces: TestWorkspaces;
|
|
128
137
|
/** Test-owned panel selection used by the framework's usePanelInfo hook. */
|
|
@@ -184,20 +193,26 @@ export declare class SlotTestRuntime {
|
|
|
184
193
|
* slot of the same tree.
|
|
185
194
|
* @param key - a key declared through {@link SlotTestRuntime.declare}.
|
|
186
195
|
* @param owner - owner props share for the render site.
|
|
187
|
-
* @param opts - explicit
|
|
196
|
+
* @param opts - explicit entry selection and borrowed Session reference; retained by view updates.
|
|
188
197
|
* @returns the slot-local view (snapshot container, scoped queries, owner updates).
|
|
189
198
|
*/
|
|
190
|
-
renderSlot<K extends keyof SlotMap & string>(key: K, owner: OwnerOf<K>, opts?:
|
|
199
|
+
renderSlot<K extends keyof SlotMap & string>(key: K, owner: OwnerOf<K>, opts?: SlotTestRenderOptions): SlotView<K>;
|
|
191
200
|
/**
|
|
192
201
|
* Resolve the store instance the renderer would hand a slot's component
|
|
193
202
|
* (identity assertions, action-driven writes). Requires a prior
|
|
194
203
|
* {@link SlotTestRuntime.renderRoot} — the host face exists only inside the
|
|
195
204
|
* installed renderer, exactly as in production.
|
|
196
205
|
* @param key - slot key whose first entry declares the store.
|
|
197
|
-
* @param
|
|
206
|
+
* @param session - retained Session reference for session-scope slots; omit for root scope.
|
|
198
207
|
* @returns the live store instance.
|
|
199
208
|
*/
|
|
200
|
-
storeOf(key: keyof SlotMap & string,
|
|
209
|
+
storeOf(key: keyof SlotMap & string, session?: SessionReference): StoreInstanceLike;
|
|
210
|
+
/**
|
|
211
|
+
* Read one registered Factory definition for direct contract assertions.
|
|
212
|
+
* @param name - registered Factory name.
|
|
213
|
+
* @returns the live Factory definition.
|
|
214
|
+
*/
|
|
215
|
+
factoryOf(name: keyof SlotFactoryMap & string): StoredFactory;
|
|
201
216
|
/**
|
|
202
217
|
* Flush pending ledger/store notifications inside act — for mutations made
|
|
203
218
|
* outside the runtime's own methods (e.g. a direct `slots.register`).
|
package/lib/types/remote.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export { RemoteError } from '@deepseek-ai/dsh-typert-protocol';
|
|
|
19
19
|
* against the real service.
|
|
20
20
|
*/
|
|
21
21
|
export declare class TestRemote {
|
|
22
|
+
private readonly ctx;
|
|
22
23
|
private readonly subscriptions;
|
|
23
24
|
/**
|
|
24
25
|
* Fixed Host facts mirrored from the production `ctx.remote.$host`. Plain
|
|
@@ -35,6 +36,13 @@ export declare class TestRemote {
|
|
|
35
36
|
* @param namespaces - scripted namespace faces reached as `ctx.remote.<name>`.
|
|
36
37
|
*/
|
|
37
38
|
constructor(ctx: Context, namespaces?: Readonly<Record<string, object>>);
|
|
39
|
+
/**
|
|
40
|
+
* Add scripted namespace faces to this Remote service.
|
|
41
|
+
* @param namespaces - scripted namespace faces reached as `ctx.remote.<name>`.
|
|
42
|
+
*/
|
|
43
|
+
provideNamespaces(namespaces: Readonly<Record<string, object>>): void;
|
|
44
|
+
private validateNamespaces;
|
|
45
|
+
private installNamespaces;
|
|
38
46
|
/**
|
|
39
47
|
* Deliver one forwarded host event to its subscribers, standing in for the
|
|
40
48
|
* carrier that owns the frame sink.
|
package/lib/types/sessions.d.ts
CHANGED
|
@@ -2,11 +2,18 @@
|
|
|
2
2
|
import type { Context } from '@deepseek-ai/cordis';
|
|
3
3
|
import type { AttachmentIdType } from '@deepseek-ai/dsh-attachment';
|
|
4
4
|
import { MutableSessionEventSource } from '@deepseek-ai/dsh-api-session-controller/client';
|
|
5
|
-
import type { AgentContext, ISessions, ProjectionsFace, SessionBinding, SessionFace, SessionListState, SessionEventLikeEntry, SessionLiveEventEntry, SessionSearchResultItem, SessionSnapshot, SessionSummary, SubmissionHandle } from '@deepseek-ai/dsh-api-session-controller/client';
|
|
5
|
+
import type { AgentContext, ISessions, ProjectionsFace, SessionBinding, SessionFace, SessionListState, SessionEventLikeEntry, SessionLiveEventEntry, SessionSearchResultItem, SessionReference, SessionRetainInfo, SessionRetainOptions, SessionSnapshot, SessionSummary, SessionTarget, SubmissionHandle } from '@deepseek-ai/dsh-api-session-controller/client';
|
|
6
6
|
import type { SubagentAddress } from '@deepseek-ai/dsh-subagent/client';
|
|
7
|
-
import type { SnapshotStore } from '@deepseek-ai/dsh-client-store';
|
|
7
|
+
import type { ObservableSnapshot, SnapshotStore } from '@deepseek-ai/dsh-client-store';
|
|
8
8
|
import type { SessionId } from '@deepseek-ai/dsh-session/types';
|
|
9
9
|
import type { SessionFixture, SessionFixtureSnapshot, Stabilizer } from './fixtures.ts';
|
|
10
|
+
declare module '@deepseek-ai/dsh-api-session-controller/client' {
|
|
11
|
+
interface SessionReferenceSourceMap {
|
|
12
|
+
testFixture: unknown;
|
|
13
|
+
testView: unknown;
|
|
14
|
+
testOperation: unknown;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
10
17
|
/**
|
|
11
18
|
* The fixture-backed session face: lifecycle reads delegate to the fixture's
|
|
12
19
|
* snapshot store; Session verbs are fail-loud stubs unless the
|
|
@@ -91,24 +98,29 @@ export declare class FixtureSession implements SessionFace {
|
|
|
91
98
|
}
|
|
92
99
|
/**
|
|
93
100
|
* Sessions test double behind the renderer host and feature injects: owns the
|
|
94
|
-
*
|
|
101
|
+
* catalog observable, scope minting through the production `createScope`,
|
|
95
102
|
* stable Controller bindings, and the session behavior face supplied per
|
|
96
103
|
* fixture. `ui-session` owns standard-source materialization.
|
|
97
104
|
*
|
|
98
105
|
* Implements the same ISessions face features receive as `ctx.sessions`, so
|
|
99
106
|
* a production face change breaks this double at compile time; the extra
|
|
100
|
-
* members (add/updateSessionSnapshot/event-window drivers/
|
|
107
|
+
* members (add/updateSessionSnapshot/event-window drivers/remove/
|
|
101
108
|
* behavior/calls/stubs) are bench-only surface.
|
|
102
109
|
*/
|
|
103
110
|
export declare class TestSessions implements ISessions {
|
|
104
111
|
private readonly stabilize;
|
|
105
112
|
private readonly rootCtx;
|
|
106
|
-
/** The useSessions
|
|
113
|
+
/** The useSessions catalog feed, independent of view ownership. */
|
|
107
114
|
readonly list: SnapshotStore<SessionListState>;
|
|
108
115
|
private readonly records;
|
|
116
|
+
private readonly generations;
|
|
117
|
+
private readonly addresses;
|
|
118
|
+
private readonly retentionStores;
|
|
119
|
+
private readonly pendingDrops;
|
|
120
|
+
private closed;
|
|
109
121
|
/** Calls observed on the service-level face, newest last. */
|
|
110
122
|
readonly calls: {
|
|
111
|
-
method: 'create' | '
|
|
123
|
+
method: 'create' | 'refreshProjections' | 'refresh' | 'search' | 'fork';
|
|
112
124
|
args: unknown[];
|
|
113
125
|
}[];
|
|
114
126
|
/** The wire schema's `session.search` result bound (production parity). */
|
|
@@ -122,20 +134,24 @@ export declare class TestSessions implements ISessions {
|
|
|
122
134
|
*/
|
|
123
135
|
constructor(stabilize: Stabilizer, rootCtx: Context);
|
|
124
136
|
/**
|
|
125
|
-
* Add a
|
|
137
|
+
* Add a Session fixture to the catalog without retaining a generation.
|
|
126
138
|
* @param fixture - identity + snapshot/summary overrides + behavior face.
|
|
127
|
-
* @param opts - pass `current: false` to add without selecting.
|
|
128
139
|
* @returns the stable session id (branded view of `fixture.id`).
|
|
129
140
|
*/
|
|
130
|
-
add(fixture: SessionFixture
|
|
131
|
-
current?: boolean;
|
|
132
|
-
}): Promise<SessionId>;
|
|
141
|
+
add(fixture: SessionFixture): Promise<SessionId>;
|
|
133
142
|
/**
|
|
134
143
|
* Update Session Controller lifecycle state through an immer draft.
|
|
135
144
|
* @param id - session id.
|
|
136
145
|
* @param mutate - draft mutator.
|
|
137
146
|
*/
|
|
138
147
|
updateSessionSnapshot(id: string, mutate: (draft: SessionFixtureSnapshot) => void): Promise<void>;
|
|
148
|
+
/**
|
|
149
|
+
* Publish one complete projection value through the fixture Session face.
|
|
150
|
+
* @param id - session id.
|
|
151
|
+
* @param key - registered projection key.
|
|
152
|
+
* @param value - complete value for that key.
|
|
153
|
+
*/
|
|
154
|
+
setProjection(id: string, key: string, value: unknown): Promise<void>;
|
|
139
155
|
/**
|
|
140
156
|
* Replace a Session's complete contiguous event window.
|
|
141
157
|
* @param id - Session identity.
|
|
@@ -164,31 +180,33 @@ export declare class TestSessions implements ISessions {
|
|
|
164
180
|
*/
|
|
165
181
|
updateSummary(id: string, patch: Partial<Omit<SessionSummary, 'id'>>): Promise<void>;
|
|
166
182
|
/**
|
|
167
|
-
*
|
|
168
|
-
* @param id - session id to select, or undefined to clear.
|
|
169
|
-
*/
|
|
170
|
-
setCurrent(id: string | undefined): Promise<void>;
|
|
171
|
-
/**
|
|
172
|
-
* Remove a session: list row, scope fiber, and per-session store instances
|
|
173
|
-
* (with persisted state) die together — the same single lifecycle axis the
|
|
174
|
-
* production Client Sessions service drives on session death, minus staging.
|
|
183
|
+
* Remove a catalog row and mark its retained Session removed without releasing owners.
|
|
175
184
|
* @param id - session id.
|
|
176
185
|
*/
|
|
177
186
|
remove(id: string): Promise<void>;
|
|
178
187
|
/**
|
|
179
|
-
*
|
|
180
|
-
* the production `createScope`, so real `scopeOf`/scope-addressed services
|
|
181
|
-
* resolve it.
|
|
188
|
+
* Borrow the already-retained session-scoped Cordis context.
|
|
182
189
|
* @param id - session id.
|
|
183
|
-
* @returns the scoped context, or undefined
|
|
190
|
+
* @returns the scoped context, or undefined without a live reference.
|
|
184
191
|
*/
|
|
185
192
|
scope(id: string): AgentContext | undefined;
|
|
186
193
|
/**
|
|
187
194
|
* Session assembly binding (inject factories and provide resolvers receive it).
|
|
188
195
|
* @param id - session id.
|
|
189
|
-
* @returns
|
|
196
|
+
* @returns the live generation's binding, or undefined without a reference.
|
|
190
197
|
*/
|
|
191
198
|
binding(id: string): SessionBinding | undefined;
|
|
199
|
+
retain(target: SessionTarget, options?: SessionRetainOptions): SessionReference;
|
|
200
|
+
using<T>(target: SessionTarget, options: SessionRetainOptions, operation: (reference: SessionReference) => T | Promise<T>): Promise<T>;
|
|
201
|
+
retainInfo(id: SessionId): ObservableSnapshot<SessionRetainInfo>;
|
|
202
|
+
/**
|
|
203
|
+
* Retain one fixture Session until the supplied Cordis owner stops.
|
|
204
|
+
* @param ownerCtx - context whose disposal releases the reference.
|
|
205
|
+
* @param target - fixture Session identity or subagent address.
|
|
206
|
+
* @param options - reference source and optional readiness cancellation.
|
|
207
|
+
* @returns the owned reference immediately.
|
|
208
|
+
*/
|
|
209
|
+
retainFor(ownerCtx: Context, target: SessionTarget, options?: SessionRetainOptions): SessionReference;
|
|
192
210
|
/**
|
|
193
211
|
* Read the session scope tag off a context (service-method boundary mirror).
|
|
194
212
|
* @param ctx - any client context.
|
|
@@ -207,25 +225,12 @@ export declare class TestSessions implements ISessions {
|
|
|
207
225
|
* @param impl - implementation that must return an already-added fixture id.
|
|
208
226
|
*/
|
|
209
227
|
stubCreate(impl: (opts: Parameters<ISessions['create']>[0]) => Promise<SessionId>): void;
|
|
210
|
-
/** Create through the installed test behavior and require
|
|
228
|
+
/** Create through the installed test behavior and require a catalogued fixture. */
|
|
211
229
|
create(opts?: Parameters<ISessions['create']>[0]): Promise<SessionId>;
|
|
212
|
-
/**
|
|
213
|
-
* Service-level selection call (recorded, then applied to the list store
|
|
214
|
-
* synchronously — inject callbacks call this outside any act window; the
|
|
215
|
-
* store notify is microtask-batched so the next stabilized step observes it).
|
|
216
|
-
* @param id - session id.
|
|
217
|
-
*/
|
|
218
|
-
open(id: SessionId): void;
|
|
219
|
-
/** Open an existing fixture through its catalog address. */
|
|
220
|
-
openSubagent(address: SubagentAddress): void;
|
|
221
|
-
/** Resolve the current fixture's retained catalog address. */
|
|
230
|
+
/** Resolve a retained or catalog-derived address independently of a view. */
|
|
222
231
|
subagentAddress(id: SessionId): SubagentAddress | undefined;
|
|
223
|
-
/** Record
|
|
224
|
-
|
|
225
|
-
/** Record a catalog refresh; fixture callers drive snapshots explicitly. */
|
|
226
|
-
refreshSubagents(parentSessionId: SessionId): Promise<void>;
|
|
227
|
-
/** Clear the current selection (recorded; the production no-session flow). */
|
|
228
|
-
clear(): void;
|
|
232
|
+
/** Record a projection refresh; fixture callers drive snapshots explicitly. */
|
|
233
|
+
refreshProjections(sessionId: SessionId): Promise<void>;
|
|
229
234
|
/** Record a list refresh; fixture callers publish list state explicitly. */
|
|
230
235
|
refresh(): Promise<void>;
|
|
231
236
|
/**
|
|
@@ -265,7 +270,14 @@ export declare class TestSessions implements ISessions {
|
|
|
265
270
|
behavior(id: string): FixtureSession;
|
|
266
271
|
/** Dispose minted scope fibers (runtime dispose path). */
|
|
267
272
|
disposeScopes(): Promise<void>;
|
|
268
|
-
private
|
|
273
|
+
private resolveTarget;
|
|
274
|
+
private retainGeneration;
|
|
275
|
+
private retentionSnapshot;
|
|
276
|
+
private publishRetention;
|
|
277
|
+
private materialize;
|
|
278
|
+
private startOpening;
|
|
279
|
+
private drop;
|
|
280
|
+
private drainDrops;
|
|
269
281
|
private require;
|
|
270
282
|
}
|
|
271
283
|
//# sourceMappingURL=sessions.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IWorkspaces, WorkspaceId, WorkspaceSnapshot, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client';
|
|
1
|
+
import type { IWorkspaces, WorkspaceId, WorkspaceInitializeDefaultRequest, WorkspaceSnapshot, WorkspaceView } from '@deepseek-ai/dsh-api-workspace-controller/client';
|
|
2
2
|
import type { SessionId } from '@deepseek-ai/dsh-session/types';
|
|
3
3
|
import type { SnapshotStore } from '@deepseek-ai/dsh-client-store';
|
|
4
4
|
import type { FixtureSnapshot, Stabilizer } from './fixtures.ts';
|
|
@@ -52,6 +52,13 @@ export declare class TestWorkspaces implements IWorkspaces {
|
|
|
52
52
|
create(input: {
|
|
53
53
|
path: string;
|
|
54
54
|
}): Promise<WorkspaceView>;
|
|
55
|
+
/**
|
|
56
|
+
* Initialize the default Workspace through a test stub; defaults to an ineligible first use.
|
|
57
|
+
* @param request - initial directory name and title.
|
|
58
|
+
* @param signal - caller lifetime.
|
|
59
|
+
* @returns the stubbed Workspace, or undefined when initialization is ineligible.
|
|
60
|
+
*/
|
|
61
|
+
initializeDefault(request: WorkspaceInitializeDefaultRequest, signal?: AbortSignal): Promise<WorkspaceView | undefined>;
|
|
55
62
|
/**
|
|
56
63
|
* Rename a Workspace (recorded). The default echoes a minimal view.
|
|
57
64
|
* @param workspaceId - target workspace.
|
|
@@ -90,6 +97,18 @@ export declare class TestWorkspaces implements IWorkspaces {
|
|
|
90
97
|
* @param sessionId - session to unarchive.
|
|
91
98
|
*/
|
|
92
99
|
unarchiveSession(sessionId: SessionId): Promise<void>;
|
|
100
|
+
/**
|
|
101
|
+
* Pin a session (recorded). The default mirrors the production face's
|
|
102
|
+
* observable effect: the id leads the list state's pin set.
|
|
103
|
+
* @param sessionId - session to pin.
|
|
104
|
+
*/
|
|
105
|
+
pinSession(sessionId: SessionId): Promise<void>;
|
|
106
|
+
/**
|
|
107
|
+
* Unpin a session (recorded). The default mirrors the production face's
|
|
108
|
+
* observable effect: the id leaves the list state's pin set.
|
|
109
|
+
* @param sessionId - session to unpin.
|
|
110
|
+
*/
|
|
111
|
+
unpinSession(sessionId: SessionId): Promise<void>;
|
|
93
112
|
}
|
|
94
113
|
export {};
|
|
95
114
|
//# sourceMappingURL=workspaces.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-client-test-runtime",
|
|
3
3
|
"description": "Browser test runtimes: a jsdom slot bench with test-owned Session and Workspace doubles, and a whole-client tier that boots the web roster through the production bootClient over an endpoint-named Remote mock",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.7-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -31,28 +31,28 @@
|
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": "^18.2.0",
|
|
33
33
|
"react-dom": "^18.2.0",
|
|
34
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
35
|
-
"@deepseek-ai/cordis-plugin-
|
|
36
|
-
"@deepseek-ai/
|
|
37
|
-
"@deepseek-ai/dsh-api-
|
|
38
|
-
"@deepseek-ai/dsh-
|
|
39
|
-
"@deepseek-ai/dsh-
|
|
40
|
-
"@deepseek-ai/dsh-client-
|
|
41
|
-
"@deepseek-ai/dsh-client-
|
|
42
|
-
"@deepseek-ai/dsh-client-
|
|
43
|
-
"@deepseek-ai/dsh-client-ui-chat": "^0.1.
|
|
44
|
-
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.
|
|
45
|
-
"@deepseek-ai/dsh-
|
|
46
|
-
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.
|
|
47
|
-
"@deepseek-ai/
|
|
48
|
-
"@deepseek-ai/dsh-client-ui-
|
|
49
|
-
"@deepseek-ai/dsh-client-ui-
|
|
50
|
-
"@deepseek-ai/dsh-
|
|
51
|
-
"@deepseek-ai/dsh-client-web": "^0.1.
|
|
52
|
-
"@deepseek-ai/dsh-remote-mock": "^0.1.
|
|
53
|
-
"@deepseek-ai/dsh-
|
|
54
|
-
"@deepseek-ai/dsh-
|
|
55
|
-
"@deepseek-ai/dsh-
|
|
34
|
+
"@deepseek-ai/cordis": "^4.0.3",
|
|
35
|
+
"@deepseek-ai/cordis-plugin-loader": "^1.0.4",
|
|
36
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.1.7-alpha.1",
|
|
37
|
+
"@deepseek-ai/dsh-api-workspace-controller": "^0.1.7-alpha.1",
|
|
38
|
+
"@deepseek-ai/dsh-attachment": "^0.1.7-alpha.1",
|
|
39
|
+
"@deepseek-ai/dsh-api-gateway": "^0.1.7-alpha.1",
|
|
40
|
+
"@deepseek-ai/dsh-client-connection": "^0.1.7-alpha.1",
|
|
41
|
+
"@deepseek-ai/dsh-client-hmr": "^0.1.7-alpha.1",
|
|
42
|
+
"@deepseek-ai/dsh-client-modules": "^0.1.7-alpha.1",
|
|
43
|
+
"@deepseek-ai/dsh-client-ui-chat": "^0.1.7-alpha.1",
|
|
44
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.7-alpha.1",
|
|
45
|
+
"@deepseek-ai/dsh-client-ui-session": "^0.1.7-alpha.1",
|
|
46
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.7-alpha.1",
|
|
47
|
+
"@deepseek-ai/cordis-plugin-include": "^1.0.8",
|
|
48
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.7-alpha.1",
|
|
49
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.7-alpha.1",
|
|
50
|
+
"@deepseek-ai/dsh-session": "^0.1.7-alpha.1",
|
|
51
|
+
"@deepseek-ai/dsh-client-web": "^0.1.7-alpha.1",
|
|
52
|
+
"@deepseek-ai/dsh-remote-mock": "^0.1.7-alpha.1",
|
|
53
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.7-alpha.1",
|
|
54
|
+
"@deepseek-ai/dsh-subagent": "^0.1.7-alpha.1",
|
|
55
|
+
"@deepseek-ai/dsh-client-store": "^0.1.7-alpha.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/js-yaml": "^4.0.9",
|
|
@@ -60,34 +60,34 @@
|
|
|
60
60
|
"@types/react-dom": "~18.3.0",
|
|
61
61
|
"react": "^18.2.0",
|
|
62
62
|
"react-dom": "^18.2.0",
|
|
63
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
64
|
-
"@deepseek-ai/cordis-plugin-include": "^1.0.
|
|
65
|
-
"@deepseek-ai/cordis-plugin-loader": "^1.0.
|
|
66
|
-
"@deepseek-ai/dsh-api-gateway": "^0.1.
|
|
67
|
-
"@deepseek-ai/dsh-api-remotes": "^0.1.
|
|
68
|
-
"@deepseek-ai/dsh-api-session-controller": "^0.1.
|
|
69
|
-
"@deepseek-ai/dsh-
|
|
70
|
-
"@deepseek-ai/dsh-
|
|
71
|
-
"@deepseek-ai/dsh-base": "^0.1.
|
|
72
|
-
"@deepseek-ai/dsh-client-
|
|
73
|
-
"@deepseek-ai/dsh-client-
|
|
74
|
-
"@deepseek-ai/dsh-client-locale": "^0.1.
|
|
75
|
-
"@deepseek-ai/dsh-client-modules": "^0.1.
|
|
76
|
-
"@deepseek-ai/dsh-client-
|
|
77
|
-
"@deepseek-ai/dsh-client-
|
|
78
|
-
"@deepseek-ai/dsh-client-ui-
|
|
79
|
-
"@deepseek-ai/dsh-client-ui-
|
|
80
|
-
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.
|
|
81
|
-
"@deepseek-ai/dsh-client-ui-session": "^0.1.
|
|
82
|
-
"@deepseek-ai/dsh-client-ui-settings": "^0.1.
|
|
83
|
-
"@deepseek-ai/dsh-client-ui-slots": "^0.1.
|
|
84
|
-
"@deepseek-ai/dsh-client-web": "^0.1.
|
|
85
|
-
"@deepseek-ai/dsh-remote-mock": "^0.1.
|
|
86
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
87
|
-
"@deepseek-ai/dsh-
|
|
88
|
-
"@deepseek-ai/dsh-
|
|
89
|
-
"@deepseek-ai/dsh-
|
|
90
|
-
"@deepseek-ai/dsh-
|
|
63
|
+
"@deepseek-ai/cordis": "^4.0.3",
|
|
64
|
+
"@deepseek-ai/cordis-plugin-include": "^1.0.8",
|
|
65
|
+
"@deepseek-ai/cordis-plugin-loader": "^1.0.4",
|
|
66
|
+
"@deepseek-ai/dsh-api-gateway": "^0.1.7-alpha.1",
|
|
67
|
+
"@deepseek-ai/dsh-api-remotes": "^0.1.7-alpha.1",
|
|
68
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.1.7-alpha.1",
|
|
69
|
+
"@deepseek-ai/dsh-attachment": "^0.1.7-alpha.1",
|
|
70
|
+
"@deepseek-ai/dsh-api-workspace-controller": "^0.1.7-alpha.1",
|
|
71
|
+
"@deepseek-ai/dsh-base": "^0.1.7-alpha.1",
|
|
72
|
+
"@deepseek-ai/dsh-client-hmr": "^0.1.7-alpha.1",
|
|
73
|
+
"@deepseek-ai/dsh-client-connection": "^0.1.7-alpha.1",
|
|
74
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.7-alpha.1",
|
|
75
|
+
"@deepseek-ai/dsh-client-modules": "^0.1.7-alpha.1",
|
|
76
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.7-alpha.1",
|
|
77
|
+
"@deepseek-ai/dsh-client-store": "^0.1.7-alpha.1",
|
|
78
|
+
"@deepseek-ai/dsh-client-ui-layout": "^0.1.7-alpha.1",
|
|
79
|
+
"@deepseek-ai/dsh-client-ui-chat": "^0.1.7-alpha.1",
|
|
80
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.7-alpha.1",
|
|
81
|
+
"@deepseek-ai/dsh-client-ui-session": "^0.1.7-alpha.1",
|
|
82
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.7-alpha.1",
|
|
83
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.7-alpha.1",
|
|
84
|
+
"@deepseek-ai/dsh-client-web": "^0.1.7-alpha.1",
|
|
85
|
+
"@deepseek-ai/dsh-remote-mock": "^0.1.7-alpha.1",
|
|
86
|
+
"@deepseek-ai/dsh-session": "^0.1.7-alpha.1",
|
|
87
|
+
"@deepseek-ai/dsh-settings": "^0.1.7-alpha.1",
|
|
88
|
+
"@deepseek-ai/dsh-subagent": "^0.1.7-alpha.1",
|
|
89
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.7-alpha.1",
|
|
90
|
+
"@deepseek-ai/dsh-web-app": "^0.1.7-alpha.1"
|
|
91
91
|
},
|
|
92
92
|
"files": [
|
|
93
93
|
"lib/index.js",
|