@qilin-agent/client-test-runtime 0.0.0-stage → 3.1.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,66 @@
1
+ /** Test-owned Remote face: `$on` subscriptions with an explicit test event driver. */
2
+ import type { Context } from '@qilin-agent/kylin';
3
+ export { RemoteError } from '@qilin-agent/typert-protocol';
4
+ /**
5
+ * Remote service test double for the forwarded-event path. Feature specs need
6
+ * `ctx.remote.$on` to exist (their plugins inject `remote`) and need forwarded
7
+ * Host events to reach those subscribers, but not the wire — so this double
8
+ * implements subscription plus an explicit `emit` driver available only on the
9
+ * concrete test object. A spec that also calls one namespace scripts it through
10
+ * the constructor rather than reaching the real Client Remote service.
11
+ *
12
+ * `$mount` rejects: a spec that needs a real generated contribution installed —
13
+ * codecs, descriptors, and the wire — has outgrown this double and needs the
14
+ * real Client Remote service.
15
+ *
16
+ * One deliberate asymmetry with production: a throwing listener propagates out
17
+ * of the emit instead of being contained and logged, so a spec cannot lean on
18
+ * this double for the containment guarantee `$on` documents — assert that
19
+ * against the real service.
20
+ */
21
+ export declare class TestRemote {
22
+ private readonly ctx;
23
+ private readonly subscriptions;
24
+ /**
25
+ * Fixed Host facts mirrored from the production `ctx.remote.$host`. Plain
26
+ * mutable field: a spec assigns it to script a non-loopback or homed Host.
27
+ */
28
+ $host: {
29
+ home: string | undefined;
30
+ isLoopback: boolean;
31
+ };
32
+ /**
33
+ * Register the double as `ctx.remote`, plus one service per scripted
34
+ * namespace so a plugin injecting `remote.<name>` also unparks.
35
+ * @param ctx - the spec's root Context.
36
+ * @param namespaces - scripted namespace faces reached as `ctx.remote.<name>`.
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;
46
+ /**
47
+ * Deliver one forwarded host event to its subscribers, standing in for the
48
+ * carrier that owns the frame sink.
49
+ * @param event - forwarded host event name.
50
+ * @param args - the Host argument list, verbatim.
51
+ */
52
+ emit(event: string, args: readonly unknown[]): void;
53
+ /**
54
+ * Subscribe to one forwarded host event.
55
+ * @param event - forwarded host event name.
56
+ * @param listener - receives the Host argument list verbatim.
57
+ * @returns disposer removing this subscription.
58
+ */
59
+ $on(event: string, listener: (...args: never[]) => void): () => void;
60
+ /**
61
+ * Generated-namespace mount, unsupported by this double.
62
+ * @returns never; always rejects.
63
+ */
64
+ $mount(): Promise<() => Promise<void>>;
65
+ }
66
+ //# sourceMappingURL=remote.d.ts.map
@@ -0,0 +1,283 @@
1
+ /** Test-owned Session Controller faces over declarative fixtures. */
2
+ import type { Context } from '@qilin-agent/kylin';
3
+ import type { AttachmentIdType } from '@qilin-agent/attachment';
4
+ import { MutableSessionEventSource } from '@qilin-agent/api-session-controller/client';
5
+ import type { AgentContext, ISessions, ProjectionsFace, SessionBinding, SessionFace, SessionListState, SessionEventLikeEntry, SessionLiveEventEntry, SessionSearchResultItem, SessionReference, SessionRetainInfo, SessionRetainOptions, SessionSnapshot, SessionSummary, SessionTarget, SubmissionHandle } from '@qilin-agent/api-session-controller/client';
6
+ import type { SubagentAddress } from '@qilin-agent/subagent/client';
7
+ import type { ObservableSnapshot, SnapshotStore } from '@qilin-agent/client-store';
8
+ import type { SessionId } from '@qilin-agent/session/types';
9
+ import type { SessionFixture, SessionFixtureSnapshot, Stabilizer } from './fixtures.ts';
10
+ declare module '@qilin-agent/api-session-controller/client' {
11
+ interface SessionReferenceSourceMap {
12
+ testFixture: unknown;
13
+ testView: unknown;
14
+ testOperation: unknown;
15
+ }
16
+ }
17
+ /**
18
+ * The fixture-backed session face: lifecycle reads delegate to the fixture's
19
+ * snapshot store; Session verbs are fail-loud stubs unless the
20
+ * fixture supplies them (the runtime never fakes behavior a test did not
21
+ * declare — an unstubbed call names itself instead of half-working). Extra
22
+ * fixture methods are grafted verbatim for feature-side casts.
23
+ */
24
+ export declare class FixtureSession implements SessionFace {
25
+ readonly sessionId: SessionId;
26
+ private readonly store;
27
+ /** Mutable event source consumed only by Conversation assembly. */
28
+ readonly eventSource: MutableSessionEventSource;
29
+ /**
30
+ * Identity-stable per-key faces over fixture-controlled projection values.
31
+ */
32
+ readonly projections: ProjectionsFace & {
33
+ set(key: string, value: unknown): void;
34
+ };
35
+ /**
36
+ * @param sessionId - host identity (branded view of the fixture id).
37
+ * @param store - Session Controller snapshot store.
38
+ * @param overrides - fixture-declared behavior face, grafted over the stubs.
39
+ */
40
+ constructor(sessionId: SessionId, store: SnapshotStore<SessionFixtureSnapshot>, overrides: Record<string, unknown>);
41
+ /** @returns the fixture Session Controller snapshot (useSession read side). */
42
+ getSnapshot(): SessionSnapshot;
43
+ /**
44
+ * Subscribe to fixture snapshot changes.
45
+ * @param fn - change callback.
46
+ * @returns unsubscribe.
47
+ */
48
+ subscribe(fn: () => void): () => void;
49
+ /**
50
+ * Fail-loud stub; supply `prompt` on the fixture's session face to exercise it.
51
+ * @returns never — always throws.
52
+ */
53
+ prompt(): never;
54
+ /**
55
+ * Minimal local-echo registration: mints an identity without touching the
56
+ * fixture snapshot (submission echoes are client-only presentation state).
57
+ * Supply `beginSubmission` on the fixture's session face to observe echoes.
58
+ * @returns a handle whose abandon is a no-op.
59
+ */
60
+ beginSubmission(): SubmissionHandle;
61
+ private submissionSeq;
62
+ /**
63
+ * Fail-loud stub; supply `readAttachment` on the fixture's session face to exercise it.
64
+ * @param _attachmentId - opaque durable attachment id.
65
+ * @returns never — always throws.
66
+ */
67
+ readAttachment(_attachmentId: AttachmentIdType): never;
68
+ /**
69
+ * Fail-loud stub; supply `updateQueue` on the fixture's session face to exercise it.
70
+ * @returns never — always throws.
71
+ */
72
+ updateQueue(): never;
73
+ /**
74
+ * Fail-loud stub; supply `cancel` on the fixture's session face to exercise it.
75
+ * @returns never — always throws.
76
+ */
77
+ cancel(): never;
78
+ /**
79
+ * Fail-loud stub; supply `command` on the fixture's session face to exercise it.
80
+ * @returns never — always throws.
81
+ */
82
+ command(): never;
83
+ /**
84
+ * Fail-loud stub; supply `loadOlder` on the fixture's session face to exercise it.
85
+ * @returns never — always throws.
86
+ */
87
+ loadOlder(): never;
88
+ /**
89
+ * Fail-loud stub; supply `loadThrough` on the fixture's session face to exercise it.
90
+ * @returns never — always throws.
91
+ */
92
+ loadThrough(): never;
93
+ /**
94
+ * Fail-loud stub; supply `rename` on the fixture's session face to exercise it.
95
+ * @returns never — always throws.
96
+ */
97
+ rename(): never;
98
+ }
99
+ /**
100
+ * Sessions test double behind the renderer host and feature injects: owns the
101
+ * catalog observable, scope minting through the production `createScope`,
102
+ * stable Controller bindings, and the session behavior face supplied per
103
+ * fixture. `ui-session` owns standard-source materialization.
104
+ *
105
+ * Implements the same ISessions face features receive as `ctx.sessions`, so
106
+ * a production face change breaks this double at compile time; the extra
107
+ * members (add/updateSessionSnapshot/event-window drivers/remove/
108
+ * behavior/calls/stubs) are bench-only surface.
109
+ */
110
+ export declare class TestSessions implements ISessions {
111
+ private readonly stabilize;
112
+ private readonly rootCtx;
113
+ /** The useSessions catalog feed, independent of view ownership. */
114
+ readonly list: SnapshotStore<SessionListState>;
115
+ private readonly records;
116
+ private readonly generations;
117
+ private readonly addresses;
118
+ private readonly retentionStores;
119
+ private readonly pendingDrops;
120
+ private closed;
121
+ /** Calls observed on the service-level face, newest last. */
122
+ readonly calls: {
123
+ method: 'create' | 'refreshProjections' | 'refresh' | 'search' | 'fork';
124
+ args: unknown[];
125
+ }[];
126
+ /** The wire schema's `session.search` result bound (production parity). */
127
+ readonly searchResultLimit = 20;
128
+ /** Replaceable search behavior (see {@link TestSessions.stubSearch}). */
129
+ private searchStub;
130
+ private createStub;
131
+ /**
132
+ * @param stabilize - the owning runtime's act wrapper.
133
+ * @param rootCtx - the runtime's Cordis root; scope fibers mount under it.
134
+ */
135
+ constructor(stabilize: Stabilizer, rootCtx: Context);
136
+ /**
137
+ * Add a Session fixture to the catalog without retaining a generation.
138
+ * @param fixture - identity + snapshot/summary overrides + behavior face.
139
+ * @returns the stable session id (branded view of `fixture.id`).
140
+ */
141
+ add(fixture: SessionFixture): Promise<SessionId>;
142
+ /**
143
+ * Update Session Controller lifecycle state through an immer draft.
144
+ * @param id - session id.
145
+ * @param mutate - draft mutator.
146
+ */
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>;
155
+ /**
156
+ * Replace a Session's complete contiguous event window.
157
+ * @param id - Session identity.
158
+ * @param entries - complete event window.
159
+ * @param hasMore - whether older history remains.
160
+ */
161
+ replaceEvents(id: string, entries: readonly SessionEventLikeEntry[], hasMore?: boolean): Promise<void>;
162
+ /**
163
+ * Prepend one older contiguous event page.
164
+ * @param id - Session identity.
165
+ * @param entries - older entries.
166
+ * @param hasMore - whether another older page remains.
167
+ */
168
+ prependEvents(id: string, entries: readonly SessionEventLikeEntry[], hasMore?: boolean): Promise<void>;
169
+ /**
170
+ * Append one live event to a Session's contiguous window.
171
+ * @param id - Session identity.
172
+ * @param entry - live event entry.
173
+ */
174
+ appendEvent(id: string, entry: SessionLiveEventEntry): Promise<void>;
175
+ /**
176
+ * Update a session's list row (the wire-echo stand-in: title settles,
177
+ * running flips — components subscribed via useSessions re-render).
178
+ * @param id - session id.
179
+ * @param patch - summary fields to merge over the row.
180
+ */
181
+ updateSummary(id: string, patch: Partial<Omit<SessionSummary, 'id'>>): Promise<void>;
182
+ /**
183
+ * Remove a catalog row and mark its retained Session removed without releasing owners.
184
+ * @param id - session id.
185
+ */
186
+ remove(id: string): Promise<void>;
187
+ /**
188
+ * Borrow the already-retained session-scoped Cordis context.
189
+ * @param id - session id.
190
+ * @returns the scoped context, or undefined without a live reference.
191
+ */
192
+ scope(id: string): AgentContext | undefined;
193
+ /**
194
+ * Session assembly binding (inject factories and provide resolvers receive it).
195
+ * @param id - session id.
196
+ * @returns the live generation's binding, or undefined without a reference.
197
+ */
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;
210
+ /**
211
+ * Read the session scope tag off a context (service-method boundary mirror).
212
+ * @param ctx - any client context.
213
+ * @returns the session id, or undefined on root contexts.
214
+ */
215
+ scopeOf(ctx: Context): SessionId | undefined;
216
+ /**
217
+ * Resolve the scoped session face off a context (production `sessionOf`
218
+ * mirror).
219
+ * @param ctx - any client context.
220
+ * @returns the fixture session face, or undefined off-scope.
221
+ */
222
+ sessionOf(ctx: Context): SessionFace | undefined;
223
+ /**
224
+ * Install Session creation behavior for navigation tests.
225
+ * @param impl - implementation that must return an already-added fixture id.
226
+ */
227
+ stubCreate(impl: (opts: Parameters<ISessions['create']>[0]) => Promise<SessionId>): void;
228
+ /** Create through the installed test behavior and require a catalogued fixture. */
229
+ create(opts?: Parameters<ISessions['create']>[0]): Promise<SessionId>;
230
+ /** Resolve a retained or catalog-derived address independently of a view. */
231
+ subagentAddress(id: SessionId): SubagentAddress | undefined;
232
+ /** Record a projection refresh; fixture callers drive snapshots explicitly. */
233
+ refreshProjections(sessionId: SessionId): Promise<void>;
234
+ /** Record a list refresh; fixture callers publish list state explicitly. */
235
+ refresh(): Promise<void>;
236
+ /**
237
+ * Replace the sidebar-search result page (the call is still recorded).
238
+ * @param impl - hits for a query, as the Host would rank them.
239
+ */
240
+ stubSearch(impl: (query: string, signal: AbortSignal) => {
241
+ items: SessionSearchResultItem[];
242
+ hasMore: boolean;
243
+ }): void;
244
+ /**
245
+ * Content search over the fixture corpus (recorded). The default answers an
246
+ * empty page: content ranking is Host behavior, so a scenario that asserts
247
+ * hits declares them through {@link TestSessions.stubSearch}.
248
+ * @param query - non-blank literal phrase.
249
+ * @param signal - cancellation for a superseded search (recorded and forwarded).
250
+ * @returns the stubbed or empty result page.
251
+ */
252
+ search(query: string, signal: AbortSignal): ReturnType<ISessions['search']>;
253
+ /**
254
+ * Recorded fork stub: no child materializes (benches asserting the full
255
+ * fork flow drive the production service; this face only proves the call).
256
+ * @param opts - source session id, optional cut anchor, and client title policy.
257
+ * @returns the source id (no child record is created).
258
+ */
259
+ fork(opts: {
260
+ sessionId: SessionId;
261
+ atSeq?: number;
262
+ increaseTitle?: boolean;
263
+ }): Promise<SessionId>;
264
+ /**
265
+ * The session face of a fixture (typed view for assertions; fixture
266
+ * behavior methods are grafted onto it).
267
+ * @param id - session id.
268
+ * @returns the FixtureSession carried by the Controller binding.
269
+ */
270
+ behavior(id: string): FixtureSession;
271
+ /** Dispose minted scope fibers (runtime dispose path). */
272
+ disposeScopes(): Promise<void>;
273
+ private resolveTarget;
274
+ private retainGeneration;
275
+ private retentionSnapshot;
276
+ private publishRetention;
277
+ private materialize;
278
+ private startOpening;
279
+ private drop;
280
+ private drainDrops;
281
+ private require;
282
+ }
283
+ //# sourceMappingURL=sessions.d.ts.map
@@ -0,0 +1,83 @@
1
+ /** Test double for the `settings` Remote namespace a bench's plugins inject. */
2
+ import { vi } from 'vitest';
3
+ /** The minimum a scripted namespace view carries for the double's own bookkeeping. */
4
+ export interface ScriptedNamespace {
5
+ /** Namespace key the write addresses. */
6
+ ns: string;
7
+ }
8
+ /** One scripted `settings` namespace face plus the controls a bench drives it with. */
9
+ export interface ScriptedSettingsRemote<View extends ScriptedNamespace> {
10
+ /**
11
+ * The namespace face handed to `TestRemote` as `settings`. A plugin injecting
12
+ * `remote.settings` unparks on it, which is what most benches need; the
13
+ * describe answer is the same one the shared mirror would read.
14
+ */
15
+ settings: {
16
+ describe(): Promise<{
17
+ ok: true;
18
+ value: {
19
+ writable: boolean;
20
+ hasDocument: boolean;
21
+ namespaces: readonly View[];
22
+ };
23
+ }>;
24
+ update(ns: string, patch: unknown, expectedRevision: number | undefined): Promise<{
25
+ ok: true;
26
+ value: View;
27
+ } | {
28
+ ok: false;
29
+ error: {
30
+ code: string;
31
+ message: string;
32
+ details: object;
33
+ };
34
+ }>;
35
+ replace(ns: string, section: unknown, expectedRevision: number | undefined): Promise<{
36
+ ok: true;
37
+ value: View;
38
+ } | {
39
+ ok: false;
40
+ error: {
41
+ code: string;
42
+ message: string;
43
+ details: object;
44
+ };
45
+ }>;
46
+ mutate(ns: string, ops: unknown, expectedRevision: number | undefined): Promise<{
47
+ ok: true;
48
+ value: View;
49
+ } | {
50
+ ok: false;
51
+ error: {
52
+ code: string;
53
+ message: string;
54
+ details: object;
55
+ };
56
+ }>;
57
+ };
58
+ /** Spy behind `settings.update`, for argument assertions. */
59
+ update: ReturnType<typeof vi.fn>;
60
+ /** Spy behind `settings.replace`, for argument assertions. */
61
+ replace: ReturnType<typeof vi.fn>;
62
+ /** Spy behind `settings.mutate`, for argument assertions. */
63
+ mutate: ReturnType<typeof vi.fn>;
64
+ /**
65
+ * Replace what the next describe answers with, as a Host commit would.
66
+ * @param namespaces - the namespace views to serve from now on.
67
+ */
68
+ publish(namespaces: readonly View[]): void;
69
+ }
70
+ /**
71
+ * Build a scripted `settings` Remote namespace for a bench. Each write answers
72
+ * with the addressed namespace unchanged, so a bench that only needs its
73
+ * plugins to activate scripts nothing; one asserting a write reads the
74
+ * corresponding spy or replaces the face.
75
+ * @param namespaces - namespace views the first describe answers with.
76
+ * @param options - deployment facts the describe answer reports.
77
+ * @returns the face and its controls.
78
+ */
79
+ export declare function scriptedSettingsRemote<View extends ScriptedNamespace>(namespaces?: readonly View[], options?: {
80
+ writable?: boolean;
81
+ hasDocument?: boolean;
82
+ }): ScriptedSettingsRemote<View>;
83
+ //# sourceMappingURL=settings-remote.d.ts.map
@@ -0,0 +1,14 @@
1
+ import type { SnapshotSerializer } from 'vitest';
2
+ /**
3
+ * The serializer plugin. Matches DOM elements whose subtree carries a scoped
4
+ * class or svg internals; serializes a normalized clone, which no longer
5
+ * matches, so printing falls through to the built-in DOM element serializer.
6
+ */
7
+ export declare const domSnapshotSerializer: SnapshotSerializer;
8
+ /**
9
+ * Register {@link domSnapshotSerializer} with vitest's expect (idempotent).
10
+ * SlotTestRuntime.create() calls this; specs that snapshot DOM outside the
11
+ * runtime import and call it themselves.
12
+ */
13
+ export declare function registerDomSnapshotSerializer(): void;
14
+ //# sourceMappingURL=snapshot.d.ts.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Test double of the locale lookup chain: a translate stub over plain
3
+ * dictionaries, mirroring LocaleRuntime's resolution order (first dictionary
4
+ * that owns the key wins, then the key itself stays visible) and its
5
+ * `{name}` template interpolation. Specs stub the framework-injected `t`
6
+ * seat with `makeTranslate(zh, commonZh)` instead of re-implementing the
7
+ * chain per suite.
8
+ */
9
+ /**
10
+ * Build a translate stub resolving through `dicts` in order (namespace
11
+ * first, then the shared common vocabulary), falling back to the key.
12
+ * @param dicts - dictionaries consulted in order.
13
+ * @returns the translate function (assignable to any `XxxProps['t']` seat).
14
+ */
15
+ export declare function makeTranslate(...dicts: readonly Record<string, string>[]): (key: string, params?: Record<string, unknown>) => string;
16
+ //# sourceMappingURL=translate.d.ts.map
@@ -0,0 +1,107 @@
1
+ import type { IWorkspaces, WorkspaceId, WorkspaceSnapshot, WorkspaceView } from '@qilin-agent/api-workspace-controller/client';
2
+ import type { SessionId } from '@qilin-agent/session/types';
3
+ import type { SnapshotStore } from '@qilin-agent/client-store';
4
+ import type { FixtureSnapshot, Stabilizer } from './fixtures.ts';
5
+ /** Writable test representation of the immutable Workspace Controller snapshot. */
6
+ type WorkspaceFixtureSnapshot = FixtureSnapshot<WorkspaceSnapshot>;
7
+ /** Callable command names on the production Workspace Controller face. */
8
+ type WorkspaceAction = {
9
+ [Key in keyof IWorkspaces]: IWorkspaces[Key] extends (...args: never[]) => unknown ? Key : never;
10
+ }[keyof IWorkspaces];
11
+ /** Test replacement retaining one Controller command's parameters and result. */
12
+ type WorkspaceStub<Key extends WorkspaceAction> = (...args: Parameters<IWorkspaces[Key]>) => ReturnType<IWorkspaces[Key]>;
13
+ /**
14
+ * Workspaces test double. Implements the same IWorkspaces face features
15
+ * receive as `ctx.workspaces`, so a production face change breaks this
16
+ * double at compile time. Every action records into {@link
17
+ * TestWorkspaces.calls}; defaults are inert echoes — feature tests needing
18
+ * richer behavior replace them via {@link TestWorkspaces.stub}.
19
+ */
20
+ export declare class TestWorkspaces implements IWorkspaces {
21
+ private readonly stabilize;
22
+ /** The useWorkspaces standard feed. */
23
+ readonly list: SnapshotStore<WorkspaceFixtureSnapshot>;
24
+ /** Calls observed on the action face, newest last. */
25
+ readonly calls: {
26
+ method: string;
27
+ args: unknown[];
28
+ }[];
29
+ /** Replaceable action seat: feature tests may stub richer behavior. */
30
+ private readonly stubs;
31
+ /**
32
+ * @param stabilize - the owning runtime's act wrapper.
33
+ */
34
+ constructor(stabilize: Stabilizer);
35
+ /**
36
+ * Update the workspace list state through an immer draft.
37
+ * @param mutate - draft mutator.
38
+ */
39
+ update(mutate: (draft: WorkspaceFixtureSnapshot) => void): Promise<void>;
40
+ /**
41
+ * Replace an action's behavior (the recorded call is still appended first).
42
+ * @param method - Controller action name (e.g. 'create').
43
+ * @param impl - replacement behavior.
44
+ */
45
+ stub<Key extends WorkspaceAction>(method: Key, impl: WorkspaceStub<Key>): void;
46
+ /**
47
+ * Create a Workspace (recorded). The default echoes a view derived from
48
+ * the input; stub for failure or list-coupled flows.
49
+ * @param input - the Host create payload.
50
+ * @returns the created Workspace view.
51
+ */
52
+ create(input: {
53
+ path: string;
54
+ }): Promise<WorkspaceView>;
55
+ /**
56
+ * Rename a Workspace (recorded). The default echoes a minimal view.
57
+ * @param workspaceId - target workspace.
58
+ * @param title - new title.
59
+ * @returns the updated view.
60
+ */
61
+ rename(workspaceId: WorkspaceId, title: string): Promise<WorkspaceView>;
62
+ /**
63
+ * Delete a Workspace (recorded; default no-op).
64
+ * @param workspaceId - target workspace.
65
+ */
66
+ delete(workspaceId: WorkspaceId): Promise<void>;
67
+ /**
68
+ * Move a Workspace in display order (recorded; default no-op).
69
+ * @param workspaceId - Workspace to move.
70
+ * @param beforeWorkspaceId - Anchor; omitted appends.
71
+ */
72
+ insertBefore(workspaceId: WorkspaceId, beforeWorkspaceId?: WorkspaceId): Promise<void>;
73
+ /**
74
+ * Move an accounted session (recorded). The default echoes a minimal view.
75
+ * @param workspaceId - target workspace.
76
+ * @param sessionId - session to move.
77
+ * @param beforeSessionId - anchor; omitted appends.
78
+ * @returns the updated view.
79
+ */
80
+ insertSessionBefore(workspaceId: WorkspaceId, sessionId: SessionId, beforeSessionId?: SessionId): Promise<WorkspaceView>;
81
+ /**
82
+ * Archive a session (recorded). The default mirrors the production face's
83
+ * observable effect: the id joins the list state's archive set.
84
+ * @param sessionId - session to archive.
85
+ */
86
+ archiveSession(sessionId: SessionId): Promise<void>;
87
+ /**
88
+ * Unarchive a session (recorded). The default mirrors the production face's
89
+ * observable effect: the id leaves the list state's archive set.
90
+ * @param sessionId - session to unarchive.
91
+ */
92
+ unarchiveSession(sessionId: SessionId): Promise<void>;
93
+ /**
94
+ * Pin a session (recorded). The default mirrors the production face's
95
+ * observable effect: the id leads the list state's pin set.
96
+ * @param sessionId - session to pin.
97
+ */
98
+ pinSession(sessionId: SessionId): Promise<void>;
99
+ /**
100
+ * Unpin a session (recorded). The default mirrors the production face's
101
+ * observable effect: the id leaves the list state's pin set.
102
+ * @param sessionId - session to unpin.
103
+ */
104
+ unpinSession(sessionId: SessionId): Promise<void>;
105
+ }
106
+ export {};
107
+ //# sourceMappingURL=workspaces.d.ts.map