@khorsheed/dsh-local-agent 0.2.0-rc.1 → 0.2.0
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/CHANGELOG.md +31 -0
- package/README.en.md +23 -164
- package/README.i18n.yaml +2 -2
- package/README.md +23 -164
- package/lib/client.js +23707 -4768
- package/lib/index.js +827 -62
- package/lib/member-bridge.js +195 -25
- package/lib/tool-factory.js +52 -19
- package/lib/typert.host.js +1440 -353
- package/lib/typert.remote-client.d.ts +43 -3
- package/lib/typert.remote-client.js +973 -335
- package/lib/types/client/FamilyCard.d.ts +37 -0
- package/lib/types/client/FamilyCard.js +55 -0
- package/lib/types/client/HarnessModelPicker.d.ts +21 -1
- package/lib/types/client/HarnessModelPicker.js +31 -3
- package/lib/types/client/MemberLiveNode.js +38 -4
- package/lib/types/client/ModelListSection.d.ts +49 -0
- package/lib/types/client/ModelListSection.js +132 -0
- package/lib/types/client/ProviderAuthBlock.d.ts +10 -2
- package/lib/types/client/ProviderAuthBlock.js +13 -6
- package/lib/types/client/auth-status.d.ts +6 -0
- package/lib/types/client/auth-status.js +8 -0
- package/lib/types/client/harness-cards.d.ts +72 -0
- package/lib/types/client/harness-cards.js +57 -0
- package/lib/types/client/icons.d.ts +2 -1
- package/lib/types/client/icons.js +1 -0
- package/lib/types/client/index.d.ts +32 -7
- package/lib/types/client/index.js +66 -9
- package/lib/types/client/locales.d.ts +25 -1
- package/lib/types/client/locales.js +50 -2
- package/lib/types/client/model-directory-scope.d.ts +14 -0
- package/lib/types/client/model-directory-scope.js +20 -0
- package/lib/types/gateway.d.ts +49 -1
- package/lib/types/gateway.js +89 -0
- package/lib/types/index.d.ts +91 -38
- package/lib/types/index.js +190 -58
- package/lib/types/live-stream.d.ts +11 -0
- package/lib/types/live-stream.js +26 -0
- package/lib/types/member-bridge.d.ts +11 -1
- package/lib/types/member-bridge.js +81 -13
- package/lib/types/member-channel.d.ts +44 -1
- package/lib/types/member-channel.js +65 -2
- package/lib/types/member-controls.d.ts +8 -0
- package/lib/types/member-controls.js +15 -2
- package/lib/types/mode-skills.d.ts +18 -0
- package/lib/types/mode-skills.js +56 -0
- package/lib/types/model-list.d.ts +55 -0
- package/lib/types/model-list.js +101 -0
- package/lib/types/preset-tool-host.d.ts +70 -0
- package/lib/types/preset-tool-host.js +210 -0
- package/lib/types/tool-factory.d.ts +9 -3
- package/lib/types/tool-factory.js +55 -18
- package/lib/types/types.d.ts +62 -5
- package/package.json +27 -23
- package/lib/invariant.js +0 -85
- package/lib/types/invariant.d.ts +0 -16
- package/lib/types/invariant.js +0 -105
|
@@ -2,15 +2,20 @@
|
|
|
2
2
|
import type {
|
|
3
3
|
RemoteResult,
|
|
4
4
|
RemoteStreamHandle,
|
|
5
|
-
|
|
5
|
+
TypertRemoteInfo,
|
|
6
|
+
TypertRemoteMethod,
|
|
6
7
|
} from '@deepseek-ai/dsh-typert-protocol'
|
|
7
|
-
import type { LocalAgentControlReceipt, LocalAgentDelegationView, LocalAgentMemberConfiguration, LocalAgentMemberControlState, LocalAgentMemberFeedEvent, LocalAgentMemberFeedRequest, LocalAgentMemberInbox, LocalAgentModelDirectory, LocalAgentModelInfo, LocalAgentPromptResult, LocalAgentRosterRow, LocalAgentSessionRecord, LocalAgentStatus, LocalAgentStreamFrame } from '@khorsheed/dsh-local-agent/types'
|
|
8
|
+
import type { LocalAgentControlReceipt, LocalAgentDelegationView, LocalAgentEndpointAuthFields, LocalAgentEndpointAuthState, LocalAgentMemberConfiguration, LocalAgentMemberControlState, LocalAgentMemberFeedEvent, LocalAgentMemberFeedRequest, LocalAgentMemberInbox, LocalAgentModelDirectory, LocalAgentModelInfo, LocalAgentPromptResult, LocalAgentRosterRow, LocalAgentSessionRecord, LocalAgentStatus, LocalAgentStreamFrame } from '@khorsheed/dsh-local-agent/types'
|
|
8
9
|
|
|
9
10
|
declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
10
11
|
interface TypertRemoteNamespace$6c6f63616c4167656e7447617465776179 {
|
|
11
12
|
activeDelegations: () => Promise<RemoteResult<readonly string[]>>
|
|
12
13
|
cancelMemberConfiguration: (childSessionId: string, requestId: string, expectedRevision: number) => Promise<RemoteResult<LocalAgentControlReceipt>>
|
|
14
|
+
checkEndpoint: (name: string) => Promise<RemoteResult<string | null>>
|
|
15
|
+
configureEndpoint: (name: string, fields: LocalAgentEndpointAuthFields) => Promise<RemoteResult<LocalAgentEndpointAuthState | null>>
|
|
16
|
+
configureModelList: (name: string, models: readonly string[]) => Promise<RemoteResult<readonly string[] | null>>
|
|
13
17
|
controlMemberInbox: (childSessionId: string, action: 'pause' | 'resume' | 'cancel' | 'reconcile', requestId?: string, outcome?: 'done' | 'cancelled', evidence?: string) => Promise<RemoteResult<LocalAgentPromptResult>>
|
|
18
|
+
endpointAuth: (name: string) => Promise<RemoteResult<LocalAgentEndpointAuthState | null>>
|
|
14
19
|
followMemberConfiguration: (childSessionId: string, signal?: AbortSignal) => RemoteStreamHandle<LocalAgentMemberControlState, never>
|
|
15
20
|
followMemberDirectory: (childSessionId: string, signal?: AbortSignal) => RemoteStreamHandle<LocalAgentModelDirectory, never>
|
|
16
21
|
followMemberOutput: (childSessionId: string, signal?: AbortSignal) => RemoteStreamHandle<LocalAgentStreamFrame, never>
|
|
@@ -23,6 +28,7 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
|
23
28
|
memberModel: (childSessionId: string) => Promise<RemoteResult<LocalAgentModelInfo | null>>
|
|
24
29
|
memberOf: (childSessionId: string) => Promise<RemoteResult<LocalAgentDelegationView | null>>
|
|
25
30
|
modelDirectory: (name: string, childSessionId: string | undefined, refresh: boolean) => Promise<RemoteResult<LocalAgentModelDirectory | null>>
|
|
31
|
+
modelList: (name: string) => Promise<RemoteResult<readonly string[] | null>>
|
|
26
32
|
promptMember: (childSessionId: string, text: string, requestId?: string) => Promise<RemoteResult<LocalAgentPromptResult>>
|
|
27
33
|
retryMemberConfiguration: (childSessionId: string, expectedRevision: number) => Promise<RemoteResult<void>>
|
|
28
34
|
roster: () => Promise<RemoteResult<readonly LocalAgentRosterRow[]>>
|
|
@@ -35,7 +41,11 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
|
35
41
|
interface TypertRemoteMap {
|
|
36
42
|
'localAgentGateway/activeDelegations': () => Promise<RemoteResult<readonly string[]>>
|
|
37
43
|
'localAgentGateway/cancelMemberConfiguration': (childSessionId: string, requestId: string, expectedRevision: number) => Promise<RemoteResult<LocalAgentControlReceipt>>
|
|
44
|
+
'localAgentGateway/checkEndpoint': (name: string) => Promise<RemoteResult<string | null>>
|
|
45
|
+
'localAgentGateway/configureEndpoint': (name: string, fields: LocalAgentEndpointAuthFields) => Promise<RemoteResult<LocalAgentEndpointAuthState | null>>
|
|
46
|
+
'localAgentGateway/configureModelList': (name: string, models: readonly string[]) => Promise<RemoteResult<readonly string[] | null>>
|
|
38
47
|
'localAgentGateway/controlMemberInbox': (childSessionId: string, action: 'pause' | 'resume' | 'cancel' | 'reconcile', requestId?: string, outcome?: 'done' | 'cancelled', evidence?: string) => Promise<RemoteResult<LocalAgentPromptResult>>
|
|
48
|
+
'localAgentGateway/endpointAuth': (name: string) => Promise<RemoteResult<LocalAgentEndpointAuthState | null>>
|
|
39
49
|
'localAgentGateway/followMemberConfiguration': (childSessionId: string, signal?: AbortSignal) => RemoteStreamHandle<LocalAgentMemberControlState, never>
|
|
40
50
|
'localAgentGateway/followMemberDirectory': (childSessionId: string, signal?: AbortSignal) => RemoteStreamHandle<LocalAgentModelDirectory, never>
|
|
41
51
|
'localAgentGateway/followMemberOutput': (childSessionId: string, signal?: AbortSignal) => RemoteStreamHandle<LocalAgentStreamFrame, never>
|
|
@@ -48,6 +58,7 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
|
48
58
|
'localAgentGateway/memberModel': (childSessionId: string) => Promise<RemoteResult<LocalAgentModelInfo | null>>
|
|
49
59
|
'localAgentGateway/memberOf': (childSessionId: string) => Promise<RemoteResult<LocalAgentDelegationView | null>>
|
|
50
60
|
'localAgentGateway/modelDirectory': (name: string, childSessionId: string | undefined, refresh: boolean) => Promise<RemoteResult<LocalAgentModelDirectory | null>>
|
|
61
|
+
'localAgentGateway/modelList': (name: string) => Promise<RemoteResult<readonly string[] | null>>
|
|
51
62
|
'localAgentGateway/promptMember': (childSessionId: string, text: string, requestId?: string) => Promise<RemoteResult<LocalAgentPromptResult>>
|
|
52
63
|
'localAgentGateway/retryMemberConfiguration': (childSessionId: string, expectedRevision: number) => Promise<RemoteResult<void>>
|
|
53
64
|
'localAgentGateway/roster': () => Promise<RemoteResult<readonly LocalAgentRosterRow[]>>
|
|
@@ -62,6 +73,35 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
|
62
73
|
}
|
|
63
74
|
}
|
|
64
75
|
|
|
65
|
-
export declare const TYPERT_REMOTE:
|
|
76
|
+
export declare const TYPERT_REMOTE: TypertRemoteInfo<{
|
|
77
|
+
readonly 'localAgentGateway/activeDelegations': TypertRemoteMethod<{ }, readonly string[]>
|
|
78
|
+
readonly 'localAgentGateway/cancelMemberConfiguration': TypertRemoteMethod<{ readonly 'childSessionId': string; readonly 'requestId': string; readonly 'expectedRevision': number }, LocalAgentControlReceipt>
|
|
79
|
+
readonly 'localAgentGateway/checkEndpoint': TypertRemoteMethod<{ readonly 'name': string }, string | null>
|
|
80
|
+
readonly 'localAgentGateway/configureEndpoint': TypertRemoteMethod<{ readonly 'name': string; readonly 'fields': LocalAgentEndpointAuthFields }, LocalAgentEndpointAuthState | null>
|
|
81
|
+
readonly 'localAgentGateway/configureModelList': TypertRemoteMethod<{ readonly 'name': string; readonly 'models': readonly string[] }, readonly string[] | null>
|
|
82
|
+
readonly 'localAgentGateway/controlMemberInbox': TypertRemoteMethod<{ readonly 'childSessionId': string; readonly 'action': 'pause' | 'resume' | 'cancel' | 'reconcile'; readonly 'requestId'?: string; readonly 'outcome'?: 'done' | 'cancelled'; readonly 'evidence'?: string }, LocalAgentPromptResult>
|
|
83
|
+
readonly 'localAgentGateway/endpointAuth': TypertRemoteMethod<{ readonly 'name': string }, LocalAgentEndpointAuthState | null>
|
|
84
|
+
readonly 'localAgentGateway/followMemberConfiguration': TypertRemoteMethod<{ readonly 'childSessionId': string }, LocalAgentMemberControlState, 'stream'>
|
|
85
|
+
readonly 'localAgentGateway/followMemberDirectory': TypertRemoteMethod<{ readonly 'childSessionId': string }, LocalAgentModelDirectory, 'stream'>
|
|
86
|
+
readonly 'localAgentGateway/followMemberOutput': TypertRemoteMethod<{ readonly 'childSessionId': string }, LocalAgentStreamFrame, 'stream'>
|
|
87
|
+
readonly 'localAgentGateway/followMembers': TypertRemoteMethod<{ readonly 'requests': readonly LocalAgentMemberFeedRequest[] }, LocalAgentMemberFeedEvent, 'stream'>
|
|
88
|
+
readonly 'localAgentGateway/followModelDirectory': TypertRemoteMethod<{ readonly 'name': string; readonly 'childSessionId'?: string | undefined }, LocalAgentModelDirectory, 'stream'>
|
|
89
|
+
readonly 'localAgentGateway/harnessModel': TypertRemoteMethod<{ readonly 'name': string }, LocalAgentModelInfo | null>
|
|
90
|
+
readonly 'localAgentGateway/memberConfiguration': TypertRemoteMethod<{ readonly 'childSessionId': string }, LocalAgentMemberControlState>
|
|
91
|
+
readonly 'localAgentGateway/memberDirectory': TypertRemoteMethod<{ readonly 'childSessionId': string; readonly 'refresh': boolean }, LocalAgentModelDirectory | null>
|
|
92
|
+
readonly 'localAgentGateway/memberInbox': TypertRemoteMethod<{ readonly 'childSessionId': string }, LocalAgentMemberInbox>
|
|
93
|
+
readonly 'localAgentGateway/memberModel': TypertRemoteMethod<{ readonly 'childSessionId': string }, LocalAgentModelInfo | null>
|
|
94
|
+
readonly 'localAgentGateway/memberOf': TypertRemoteMethod<{ readonly 'childSessionId': string }, LocalAgentDelegationView | null>
|
|
95
|
+
readonly 'localAgentGateway/modelDirectory': TypertRemoteMethod<{ readonly 'name': string; readonly 'childSessionId'?: string | undefined; readonly 'refresh': boolean }, LocalAgentModelDirectory | null>
|
|
96
|
+
readonly 'localAgentGateway/modelList': TypertRemoteMethod<{ readonly 'name': string }, readonly string[] | null>
|
|
97
|
+
readonly 'localAgentGateway/promptMember': TypertRemoteMethod<{ readonly 'childSessionId': string; readonly 'text': string; readonly 'requestId'?: string }, LocalAgentPromptResult>
|
|
98
|
+
readonly 'localAgentGateway/retryMemberConfiguration': TypertRemoteMethod<{ readonly 'childSessionId': string; readonly 'expectedRevision': number }, void>
|
|
99
|
+
readonly 'localAgentGateway/roster': TypertRemoteMethod<{ }, readonly LocalAgentRosterRow[]>
|
|
100
|
+
readonly 'localAgentGateway/selectMemberConfiguration': TypertRemoteMethod<{ readonly 'childSessionId': string; readonly 'requestId': string; readonly 'expectedRevision': number; readonly 'selection': LocalAgentMemberConfiguration }, LocalAgentControlReceipt>
|
|
101
|
+
readonly 'localAgentGateway/sessions': TypertRemoteMethod<{ readonly 'name': string; readonly 'sessionId'?: string }, readonly LocalAgentSessionRecord[]>
|
|
102
|
+
readonly 'localAgentGateway/setMemberModel': TypertRemoteMethod<{ readonly 'childSessionId': string; readonly 'model'?: string }, LocalAgentPromptResult>
|
|
103
|
+
readonly 'localAgentGateway/status': TypertRemoteMethod<{ readonly 'name': string; readonly 'scope'?: string }, LocalAgentStatus>
|
|
104
|
+
readonly 'localAgentGateway/stopMember': TypertRemoteMethod<{ readonly 'childSessionId': string }, boolean>
|
|
105
|
+
}>
|
|
66
106
|
export default TYPERT_REMOTE
|
|
67
107
|
//# sourceMappingURL=typert.remote-client.d.ts.map
|