@deepseek-ai/dsh-cordis-client-runner 0.2.3-alpha.2 → 0.2.3-alpha.3

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.
@@ -213,9 +213,9 @@ export const SERVICE_API: readonly ServiceApiEntry[] = [
213
213
  returns: 'bounded results, or a business/transport error.',
214
214
  },
215
215
  {
216
- signature: 'fork(opts: { sessionId: SessionId atSeq?: number increaseTitle?: boolean onCreated?: (childId: SessionId) => void /** False refuses source migration; omission preserves the Host default. */ allowMigration?: boolean }): Promise<SessionId>',
216
+ signature: 'fork(opts: { sessionId: SessionId atSeq?: number increaseTitle?: boolean onCreated?: (childId: SessionId) => void /** False refuses source migration; omission preserves the Host default. */ allowMigration?: boolean /** `side` records the child as a side conversation; omission creates an ordinary Session. */ origin?: \'side\' }): Promise<SessionId>',
217
217
  description: 'Fork a session from an exact inclusive prefix of the source; on resolution the child is catalogued and can be explicitly retained.',
218
- parameters: [{ name: 'opts', description: 'source session id, the optional exact inclusive boundary seq (a real event seq the caller already knows; a cut inside an open turn is balanced Host-side with synthetic closers, and omission selects the latest completed-turn prefix), and whether to increment an inherited durable title, skipping numbers Host-listed titles already use, before resolving. `onCreated` observes the catalogued child before that optional rename.' }],
218
+ parameters: [{ name: 'opts', description: 'source session id, the optional exact inclusive boundary seq (a real event seq the caller already knows; a cut inside an open turn is balanced Host-side with synthetic closers, and omission selects the latest completed-turn prefix), and whether to increment an inherited durable title, skipping numbers Host-listed titles already use, before resolving. `onCreated` observes the catalogued child before that optional rename, including a child published before Workspace attachment failed.' }],
219
219
  returns: 'the child session id.',
220
220
  throws: ['when the fork fails, or when a requested child-title rename fails after creation.'],
221
221
  },
@@ -348,9 +348,9 @@ export const SERVICE_API: readonly ServiceApiEntry[] = [
348
348
  throws: ['on failure; a refused creation is also shown through the Workspace notice unless a later navigation or disposal superseded the request.'],
349
349
  },
350
350
  {
351
- signature: 'forkSession( sessionId: SessionId, onCreated?: (childId: SessionId) => void, options?: Pick<Parameters<ISessions[\'fork\']>[0], \'allowMigration\'>, ): Promise<SessionId>',
351
+ signature: 'forkSession( sessionId: SessionId, onCreated?: (childId: SessionId) => void, options?: Pick<Parameters<ISessions[\'fork\']>[0], \'allowMigration\' | \'atSeq\'>, ): Promise<SessionId>',
352
352
  description: 'Fork a Session without changing the current selection.',
353
- parameters: [{ name: 'sessionId', description: 'source Session.' }, { name: 'onCreated', description: 'observer before the optional child-title update.' }, { name: 'options', description: 'optional permission to start source migration; omission preserves the Host default.' }],
353
+ parameters: [{ name: 'sessionId', description: 'source Session.' }, { name: 'onCreated', description: 'observer before the optional child-title update.' }, { name: 'options', description: 'optional migration permission (omission keeps the Host default) and inclusive event cut.' }],
354
354
  returns: 'the child SessionId after creation and inherited-title increment.',
355
355
  },
356
356
  {
@@ -681,7 +681,7 @@ export const TYPE_API: readonly TypeApiEntry[] = [
681
681
  },
682
682
  {
683
683
  name: 'ISessions',
684
- declaration: 'export interface ISessions {\n readonly list: ObservableSnapshot<SessionListState>;\n retain(target: SessionTarget, options: SessionRetainOptions): SessionReference;\n using<T>(target: SessionTarget, options: SessionRetainOptions, operation: (reference: SessionReference) => T | Promise<T>): Promise<T>;\n retainInfo(id: SessionId): ObservableSnapshot<SessionRetainInfo>;\n readonly searchResultLimit: number;\n create(opts?: {\n workspaceId?: WorkspaceId;\n cwd?: string;\n sessionId?: SessionId;\n agentPreset?: string;\n }): Promise<SessionId>;\n subagentAddress(id: SessionId): SubagentAddress | undefined;\n refreshProjections(sessionId: SessionId): Promise<void>;\n refresh(): Promise<void>;\n search(query: string, signal: AbortSignal): Promise<RemoteResult<{\n items: SessionSearchResultItem[];\n hasMore: boolean;\n }>>;\n fork(opts: {\n sessionId: SessionId;\n atSeq?: number;\n increaseTitle?: boolean;\n onCreated?: (childId: SessionId) => void;\n allowMigration?: boolean;\n }): Promise<SessionId>;\n scope(id: SessionId): AgentContext | undefined;\n scopeOf(ctx: Context): SessionId | undefined;\n sessionOf(ctx: Context): SessionFace | undefined;\n binding(id: SessionId): SessionBinding | undefined;\n}',
684
+ declaration: 'export interface ISessions {\n readonly list: ObservableSnapshot<SessionListState>;\n retain(target: SessionTarget, options: SessionRetainOptions): SessionReference;\n using<T>(target: SessionTarget, options: SessionRetainOptions, operation: (reference: SessionReference) => T | Promise<T>): Promise<T>;\n retainInfo(id: SessionId): ObservableSnapshot<SessionRetainInfo>;\n readonly searchResultLimit: number;\n create(opts?: {\n workspaceId?: WorkspaceId;\n cwd?: string;\n sessionId?: SessionId;\n agentPreset?: string;\n }): Promise<SessionId>;\n subagentAddress(id: SessionId): SubagentAddress | undefined;\n refreshProjections(sessionId: SessionId): Promise<void>;\n refresh(): Promise<void>;\n search(query: string, signal: AbortSignal): Promise<RemoteResult<{\n items: SessionSearchResultItem[];\n hasMore: boolean;\n }>>;\n fork(opts: {\n sessionId: SessionId;\n atSeq?: number;\n increaseTitle?: boolean;\n onCreated?: (childId: SessionId) => void;\n allowMigration?: boolean;\n origin?: \'side\';\n }): Promise<SessionId>;\n scope(id: SessionId): AgentContext | undefined;\n scopeOf(ctx: Context): SessionId | undefined;\n sessionOf(ctx: Context): SessionFace | undefined;\n binding(id: SessionId): SessionBinding | undefined;\n}',
685
685
  },
686
686
  {
687
687
  name: 'KeyedHooksSources',
@@ -795,10 +795,18 @@ export const TYPE_API: readonly TypeApiEntry[] = [
795
795
  name: 'PendingSubmissionRetirement',
796
796
  declaration: 'export type PendingSubmissionRetirement = {\n readonly reason: \'observed\';\n readonly attachments: readonly (ImageAttachmentRef | FileAttachmentRef)[];\n} | {\n readonly reason: \'failed\';\n};',
797
797
  },
798
+ {
799
+ name: 'ProjectionsBaseline',
800
+ declaration: 'export interface ProjectionsBaseline {\n asOfSeq: SessionSeqCursor;\n values: Readonly<Record<string, unknown>>;\n}',
801
+ },
798
802
  {
799
803
  name: 'ProjectionsFace',
800
804
  declaration: 'export interface ProjectionsFace {\n faceOf(key: string): ObservableSnapshot<unknown>;\n}',
801
805
  },
806
+ {
807
+ name: 'ProjectionValueStore',
808
+ declaration: 'export class ProjectionValueStore {\n faceOf(key: string): ObservableSnapshot<unknown>;\n get(key: string): unknown;\n seqOf(key: string): SessionSeqCursor | undefined;\n values(): Readonly<Partial<SessionProjectionMap>>;\n subscribeAny(listener: () => void): () => void;\n apply(key: string, value: unknown, seq: SessionSeqCursor): void;\n applyCached(values: Readonly<Record<string, unknown>>): void;\n seed(baseline: ProjectionsBaseline): void;\n clear(): void;\n}',
809
+ },
802
810
  {
803
811
  name: 'PromptContentPart',
804
812
  declaration: 'export type PromptContentPart = {\n readonly type: \'text\';\n readonly text: string;\n} | {\n readonly type: \'image\';\n readonly mediaType: ImageMediaType;\n readonly data: string;\n readonly name?: string;\n} | {\n readonly type: \'file\';\n readonly receiptId: Branded<\'file-upload-receipt-id\'>;\n};',
@@ -849,7 +857,7 @@ export const TYPE_API: readonly TypeApiEntry[] = [
849
857
  },
850
858
  {
851
859
  name: 'RegisterFactoryOptions',
852
- declaration: 'export type RegisterFactoryOptions<F extends keyof SlotFactoryMap & string> = {\n name: F;\n scope: FactoryDefOf<F>[\'scope\'];\n} & FactoryField<F, \'children\', FactoryChildrenOf<F>> & FactoryField<F, \'store\', FactoryStoreOf<F> | (() => FactoryStoreOf<F>)> & FactoryField<F, \'inject\', (...args: FactoryInjectParams<F>) => FactoryInjectOf<F>> & FactoryField<F, \'locale\', FactoryLocaleOf<F>> & FactoryField<F, \'slots\', RuntimeFactorySlots<F>> & FactoryCollisionCheck<F> & FactoryChildrenCheck<F>;',
860
+ declaration: 'export type RegisterFactoryOptions<F extends keyof SlotFactoryMap & string> = {\n name: F;\n} & FactoryOutletSpec<FactoryDefOf<F>[\'scope\']> & FactoryField<F, \'children\', FactoryChildrenOf<F>> & FactoryField<F, \'store\', FactoryStoreOf<F> | (() => FactoryStoreOf<F>)> & FactoryField<F, \'inject\', (...args: FactoryInjectParams<F>) => FactoryInjectOf<F>> & FactoryField<F, \'locale\', FactoryLocaleOf<F>> & FactoryField<F, \'slots\', RuntimeFactorySlots<F>> & FactoryCollisionCheck<F> & FactoryChildrenCheck<F>;',
853
861
  },
854
862
  {
855
863
  name: 'RemoteHostFacts',
@@ -883,6 +891,10 @@ export const TYPE_API: readonly TypeApiEntry[] = [
883
891
  name: 'ScopeStandardProps',
884
892
  declaration: 'export type ScopeStandardProps<S extends SlotScope> = (S extends \'session\' ? SessionStandardProps : S extends \'session-maybe\' ? SessionMaybeStandardProps : object) & GlobalStandardProps;',
885
893
  },
894
+ {
895
+ name: 'Session',
896
+ declaration: 'export class Session implements SessionFace {\n readonly projections: ProjectionValueStore;\n readonly eventSource;\n constructor(readonly sessionId: SessionId, private readonly remote: SessionRemotes, private readonly options: SessionOptions = {});\n bindScope(actx: Context): void;\n unbindScope(): void;\n beginSubmission(input: BeginSubmissionInput): SubmissionHandle;\n async prompt(content: PromptContentPart[], mode: \'queue\' | \'steer\', signal?: AbortSignal, requestId?: SessionRequestId): Promise<RemoteResult<{\n accepted: true;\n }>>;\n async readAttachment(attachment: ImageAttachmentRef): Promise<RemoteResult<{\n attachment: ImageAttachmentRef;\n data: Uint8Array;\n }>>;\n async updateQueue(itemId: MessageId, action: QueueAction): Promise<RemoteResult<{\n accepted: true;\n }>>;\n async cancel(): Promise<RemoteResult<{\n accepted: true;\n }>>;\n async rename(title: string): Promise<RemoteResult<{\n title: string;\n seq: SessionSeq;\n }>>;\n async command(line: string): Promise<RemoteResult<{\n matched: boolean;\n }>>;\n open(): Promise<void>;\n async loadOlder(options?: {\n deferConsumption?: boolean;\n }): Promise<void>;\n consumeOlder(): boolean;\n loadThrough(seq: SessionSeq): Promise<void>;\n async resync(): Promise<void>;\n subscribe(listener: () => void): () => void;\n getSnapshot(): SessionSnapshot;\n handleRunning(running: boolean): void;\n configureSubagent(address: SubagentAddress | undefined): void;\n handleBlank(blank: boolean): void;\n handleRemoved(): void;\n handleAgentError(message: string): void;\n bufferOlder(): void;\n async disconnect(): Promise<void>;\n async dispose(): Promise<void>;\n}',
897
+ },
886
898
  {
887
899
  name: 'SessionAreaProps',
888
900
  declaration: 'export interface SessionAreaProps {\n readonly session?: SlotScopeTargetMap[keyof SlotScopeTargetMap & \'session\'] | undefined;\n empty?: (() => ReactNode) | undefined;\n children: ReactNode;\n}',
@@ -895,6 +907,10 @@ export const TYPE_API: readonly TypeApiEntry[] = [
895
907
  name: 'SessionBinding',
896
908
  declaration: 'export interface SessionBinding {\n readonly sessionId: SessionId;\n readonly session: SessionFace;\n readonly eventSource: SessionEventSource;\n readonly ctx: AgentContext;\n}',
897
909
  },
910
+ {
911
+ name: 'SessionCommandsRemote',
912
+ declaration: 'export interface SessionCommandsRemote {\n execute(agentId: SessionId, line: string, attachments: readonly CommandSubmitAttachment[], signal?: AbortSignal): Promise<RemoteResult<object | undefined>>;\n}',
913
+ },
898
914
  {
899
915
  name: 'SessionEventChange',
900
916
  declaration: 'export type SessionEventChange = {\n readonly kind: \'replace\';\n readonly entries: readonly SessionEventLikeEntry[];\n} | {\n readonly kind: \'prepend\';\n readonly entries: readonly SessionEventLikeEntry[];\n} | {\n readonly kind: \'append\';\n readonly entries: readonly SessionEventLikeEntry[];\n} | {\n readonly kind: \'settle-assistant\';\n readonly attemptId: LlmAttemptId;\n readonly entry?: SessionAssistantSettlementEntry;\n};',
@@ -931,6 +947,10 @@ export const TYPE_API: readonly TypeApiEntry[] = [
931
947
  name: 'SessionMaybeStandardProps',
932
948
  declaration: 'export interface SessionMaybeStandardProps {\n}',
933
949
  },
950
+ {
951
+ name: 'SessionOptions',
952
+ declaration: 'export interface SessionOptions {\n address?: SubagentAddress;\n onEngaged?(session: Session): void;\n projections?: ProjectionValueStore;\n}',
953
+ },
934
954
  {
935
955
  name: 'SessionProjectionSnapshot',
936
956
  declaration: 'export interface SessionProjectionSnapshot {\n readonly values: Readonly<Partial<SessionProjectionViewValues>>;\n readonly state: \'idle\' | \'loading\' | \'ready\' | \'migration-required\' | \'error\';\n readonly error: RemoteFailure | null;\n}',
@@ -951,6 +971,14 @@ export const TYPE_API: readonly TypeApiEntry[] = [
951
971
  name: 'SessionReferenceSourceMap',
952
972
  declaration: 'export interface SessionReferenceSourceMap {\n controllerOperation: unknown;\n gateway: unknown;\n}',
953
973
  },
974
+ {
975
+ name: 'SessionRemote',
976
+ declaration: 'export type SessionRemote = ClientRemote[\'session\'];',
977
+ },
978
+ {
979
+ name: 'SessionRemotes',
980
+ declaration: 'export interface SessionRemotes {\n readonly $stream: ClientRemote[\'$stream\'];\n readonly commands: SessionCommandsRemote;\n readonly session: SessionRemote;\n readonly subagents: SessionSubagentsRemote;\n}',
981
+ },
954
982
  {
955
983
  name: 'SessionRequestId',
956
984
  declaration: 'export type SessionRequestId = Branded<\'session-request-id\'>;',
@@ -983,13 +1011,17 @@ export const TYPE_API: readonly TypeApiEntry[] = [
983
1011
  name: 'SessionStandardProps',
984
1012
  declaration: 'export interface SessionStandardProps {\n}',
985
1013
  },
1014
+ {
1015
+ name: 'SessionSubagentsRemote',
1016
+ declaration: 'export interface SessionSubagentsRemote {\n prompt(request: SubagentPromptRequest, signal?: AbortSignal): Promise<RemoteResult<SubagentPromptReceipt>>;\n interruptByUser(childSessionId: SessionId): Promise<RemoteResult<SubagentInterruptReceipt>>;\n}',
1017
+ },
986
1018
  {
987
1019
  name: 'SessionTarget',
988
1020
  declaration: 'export type SessionTarget = SessionId | SubagentAddress;',
989
1021
  },
990
1022
  {
991
1023
  name: 'SlotComponent',
992
- declaration: 'export type SlotComponent<P> = (props: P) => ReactNode;',
1024
+ declaration: 'export type SlotComponent<P> = (props: P) => ReturnType<FunctionComponent>;',
993
1025
  },
994
1026
  {
995
1027
  name: 'SlotCore',
@@ -1053,7 +1085,7 @@ export const TYPE_API: readonly TypeApiEntry[] = [
1053
1085
  },
1054
1086
  {
1055
1087
  name: 'StoredFactory',
1056
- declaration: 'export interface StoredFactory {\n readonly name: string;\n readonly component: unknown;\n readonly scope: SlotScope;\n readonly children?: Readonly<Record<string, SlotSpec<SlotEntryDef>>> | undefined;\n readonly store?: StoreDecl | undefined;\n readonly inject?: ((...args: never[]) => Record<string, unknown>) | undefined;\n readonly locale?: string | undefined;\n readonly slots?: Readonly<Record<string, {\n scope: SlotScope;\n }>> | undefined;\n readonly registrant?: string | undefined;\n}',
1088
+ declaration: 'export interface StoredFactory {\n readonly name: string;\n readonly component: unknown;\n readonly scope: SlotScope;\n readonly inline?: true;\n readonly children?: Readonly<Record<string, SlotSpec<SlotEntryDef>>> | undefined;\n readonly store?: StoreDecl | undefined;\n readonly inject?: ((...args: never[]) => Record<string, unknown>) | undefined;\n readonly locale?: string | undefined;\n readonly slots?: Readonly<Record<string, FactoryOutletSpec>> | undefined;\n readonly registrant?: string | undefined;\n readonly module?: string | undefined;\n}',
1057
1089
  },
1058
1090
  {
1059
1091
  name: 'StoreFactory',