dominds-kernel 1.8.5
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/LICENSE +1 -0
- package/README.md +3 -0
- package/dist/app-host-contract.d.ts +87 -0
- package/dist/app-host-contract.js +2 -0
- package/dist/app-json.d.ts +139 -0
- package/dist/app-json.js +234 -0
- package/dist/diligence.d.ts +3 -0
- package/dist/diligence.js +64 -0
- package/dist/evt.d.ts +40 -0
- package/dist/evt.js +142 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +25 -0
- package/dist/team-mgmt-manual.d.ts +20 -0
- package/dist/team-mgmt-manual.js +121 -0
- package/dist/types/context-health.d.ts +33 -0
- package/dist/types/context-health.js +2 -0
- package/dist/types/dialog.d.ts +398 -0
- package/dist/types/dialog.js +8 -0
- package/dist/types/display-state.d.ts +43 -0
- package/dist/types/display-state.js +2 -0
- package/dist/types/i18n.d.ts +2 -0
- package/dist/types/i18n.js +2 -0
- package/dist/types/language.d.ts +5 -0
- package/dist/types/language.js +35 -0
- package/dist/types/priming.d.ts +55 -0
- package/dist/types/priming.js +2 -0
- package/dist/types/problems.d.ts +128 -0
- package/dist/types/problems.js +2 -0
- package/dist/types/q4h.d.ts +9 -0
- package/dist/types/q4h.js +2 -0
- package/dist/types/setup.d.ts +170 -0
- package/dist/types/setup.js +2 -0
- package/dist/types/snippets.d.ts +68 -0
- package/dist/types/snippets.js +2 -0
- package/dist/types/storage.d.ts +561 -0
- package/dist/types/storage.js +85 -0
- package/dist/types/tools-registry.d.ts +19 -0
- package/dist/types/tools-registry.js +2 -0
- package/dist/types/wire.d.ts +227 -0
- package/dist/types/wire.js +18 -0
- package/dist/types.d.ts +112 -0
- package/dist/types.js +28 -0
- package/dist/utils/html.d.ts +2 -0
- package/dist/utils/html.js +20 -0
- package/dist/utils/id.d.ts +1 -0
- package/dist/utils/id.js +6 -0
- package/dist/utils/time.d.ts +1 -0
- package/dist/utils/time.js +13 -0
- package/package.json +84 -0
- package/src/app-host-contract.ts +105 -0
- package/src/app-json.ts +401 -0
- package/src/diligence.ts +64 -0
- package/src/evt.ts +156 -0
- package/src/index.ts +48 -0
- package/src/team-mgmt-manual.ts +151 -0
- package/src/types/context-health.ts +39 -0
- package/src/types/dialog.ts +487 -0
- package/src/types/display-state.ts +21 -0
- package/src/types/i18n.ts +3 -0
- package/src/types/language.ts +33 -0
- package/src/types/priming.ts +69 -0
- package/src/types/problems.ts +144 -0
- package/src/types/q4h.ts +11 -0
- package/src/types/setup.ts +140 -0
- package/src/types/snippets.ts +55 -0
- package/src/types/storage.ts +682 -0
- package/src/types/tools-registry.ts +24 -0
- package/src/types/wire.ts +335 -0
- package/src/types.ts +133 -0
- package/src/utils/html.ts +17 -0
- package/src/utils/id.ts +3 -0
- package/src/utils/time.ts +10 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HumanQuestion } from './storage';
|
|
2
|
+
export type { HumanQuestion } from './storage';
|
|
3
|
+
export interface Q4HDialogContext {
|
|
4
|
+
readonly selfId: string;
|
|
5
|
+
readonly rootId: string;
|
|
6
|
+
readonly agentId: string;
|
|
7
|
+
readonly taskDocPath: string;
|
|
8
|
+
readonly questions: HumanQuestion[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
export type SetupRequirement = {
|
|
2
|
+
kind: 'ok';
|
|
3
|
+
} | {
|
|
4
|
+
kind: 'missing_team_yaml';
|
|
5
|
+
teamYamlPath: string;
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'invalid_team_yaml';
|
|
8
|
+
teamYamlPath: string;
|
|
9
|
+
errorText: string;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'missing_member_defaults_fields';
|
|
12
|
+
teamYamlPath: string;
|
|
13
|
+
missing: Array<'provider' | 'model'>;
|
|
14
|
+
} | {
|
|
15
|
+
kind: 'unknown_provider';
|
|
16
|
+
provider: string;
|
|
17
|
+
} | {
|
|
18
|
+
kind: 'unknown_model';
|
|
19
|
+
provider: string;
|
|
20
|
+
model: string;
|
|
21
|
+
} | {
|
|
22
|
+
kind: 'missing_provider_env';
|
|
23
|
+
provider: string;
|
|
24
|
+
envVar: string;
|
|
25
|
+
};
|
|
26
|
+
export type SetupShellInfo = {
|
|
27
|
+
platform: 'windows' | 'macos' | 'linux' | 'other';
|
|
28
|
+
env: string | null;
|
|
29
|
+
kind: 'bash' | 'zsh' | 'other';
|
|
30
|
+
defaultRc: 'bashrc' | 'zshrc' | 'unknown';
|
|
31
|
+
};
|
|
32
|
+
export type SetupRcFileInfo = {
|
|
33
|
+
path: string;
|
|
34
|
+
exists: boolean;
|
|
35
|
+
writable: boolean;
|
|
36
|
+
};
|
|
37
|
+
export type SetupTeamYamlInfo = {
|
|
38
|
+
path: string;
|
|
39
|
+
exists: boolean;
|
|
40
|
+
parseError?: string;
|
|
41
|
+
memberDefaults?: {
|
|
42
|
+
provider?: string;
|
|
43
|
+
model?: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export type SetupRtwsLlmYamlInfo = {
|
|
47
|
+
path: string;
|
|
48
|
+
exists: boolean;
|
|
49
|
+
parseError?: string;
|
|
50
|
+
providerKeys?: string[];
|
|
51
|
+
};
|
|
52
|
+
export type SetupProviderModelSummary = {
|
|
53
|
+
key: string;
|
|
54
|
+
name?: string;
|
|
55
|
+
contextWindow?: string;
|
|
56
|
+
contextLength?: number;
|
|
57
|
+
inputLength?: number;
|
|
58
|
+
outputLength?: number;
|
|
59
|
+
verified: boolean;
|
|
60
|
+
};
|
|
61
|
+
export type SetupProminentModelParamNamespace = 'general' | 'codex' | 'openai' | 'anthropic';
|
|
62
|
+
export type SetupProminentEnumModelParam = {
|
|
63
|
+
namespace: SetupProminentModelParamNamespace;
|
|
64
|
+
key: string;
|
|
65
|
+
description: string;
|
|
66
|
+
values: string[];
|
|
67
|
+
valueLabels?: Record<string, string>;
|
|
68
|
+
defaultValue?: string;
|
|
69
|
+
};
|
|
70
|
+
export type SetupProviderSummary = {
|
|
71
|
+
providerKey: string;
|
|
72
|
+
name: string;
|
|
73
|
+
apiType: 'codex' | 'anthropic' | 'mock' | 'openai' | 'openai-compatible';
|
|
74
|
+
baseUrl: string;
|
|
75
|
+
apiKeyEnvVar: string;
|
|
76
|
+
techSpecUrl?: string;
|
|
77
|
+
apiMgmtUrl?: string;
|
|
78
|
+
envVar: {
|
|
79
|
+
isSet: boolean;
|
|
80
|
+
envLocalHas: boolean;
|
|
81
|
+
bashrcHas: boolean;
|
|
82
|
+
zshrcHas: boolean;
|
|
83
|
+
};
|
|
84
|
+
models: SetupProviderModelSummary[];
|
|
85
|
+
prominentModelParams?: SetupProminentEnumModelParam[];
|
|
86
|
+
};
|
|
87
|
+
export type SetupStatusResponse = {
|
|
88
|
+
success: true;
|
|
89
|
+
requirement: SetupRequirement;
|
|
90
|
+
shell: SetupShellInfo;
|
|
91
|
+
envLocal: SetupRcFileInfo;
|
|
92
|
+
rc: {
|
|
93
|
+
bashrc: SetupRcFileInfo;
|
|
94
|
+
zshrc: SetupRcFileInfo;
|
|
95
|
+
};
|
|
96
|
+
teamYaml: SetupTeamYamlInfo;
|
|
97
|
+
rtwsLlmYaml: SetupRtwsLlmYamlInfo;
|
|
98
|
+
providers: SetupProviderSummary[];
|
|
99
|
+
} | {
|
|
100
|
+
success: false;
|
|
101
|
+
requirement: SetupRequirement;
|
|
102
|
+
shell: SetupShellInfo;
|
|
103
|
+
envLocal: SetupRcFileInfo;
|
|
104
|
+
rc: {
|
|
105
|
+
bashrc: SetupRcFileInfo;
|
|
106
|
+
zshrc: SetupRcFileInfo;
|
|
107
|
+
};
|
|
108
|
+
teamYaml: SetupTeamYamlInfo;
|
|
109
|
+
rtwsLlmYaml: SetupRtwsLlmYamlInfo;
|
|
110
|
+
providers: SetupProviderSummary[];
|
|
111
|
+
error: string;
|
|
112
|
+
};
|
|
113
|
+
export type SetupWriteShellEnvTarget = 'env_local' | 'bashrc' | 'zshrc';
|
|
114
|
+
export type SetupWriteShellEnvRequest = {
|
|
115
|
+
envVar: string;
|
|
116
|
+
value: string;
|
|
117
|
+
target: SetupWriteShellEnvTarget;
|
|
118
|
+
};
|
|
119
|
+
export type SetupWriteShellEnvOutcome = {
|
|
120
|
+
target: SetupWriteShellEnvTarget;
|
|
121
|
+
path: string;
|
|
122
|
+
result: 'created' | 'updated';
|
|
123
|
+
};
|
|
124
|
+
export type SetupWriteShellEnvResponse = {
|
|
125
|
+
success: true;
|
|
126
|
+
outcome: SetupWriteShellEnvOutcome;
|
|
127
|
+
} | {
|
|
128
|
+
success: false;
|
|
129
|
+
error: string;
|
|
130
|
+
};
|
|
131
|
+
export type SetupFileKind = 'defaults_yaml' | 'rtws_llm_yaml';
|
|
132
|
+
export type SetupFileResponse = {
|
|
133
|
+
success: true;
|
|
134
|
+
kind: SetupFileKind;
|
|
135
|
+
path: string;
|
|
136
|
+
raw: string;
|
|
137
|
+
} | {
|
|
138
|
+
success: false;
|
|
139
|
+
kind: SetupFileKind;
|
|
140
|
+
path: string;
|
|
141
|
+
error: string;
|
|
142
|
+
};
|
|
143
|
+
export type SetupWriteTeamYamlRequest = {
|
|
144
|
+
provider: string;
|
|
145
|
+
model: string;
|
|
146
|
+
overwrite: boolean;
|
|
147
|
+
modelParams?: Partial<Record<SetupProminentModelParamNamespace, Record<string, string>>>;
|
|
148
|
+
};
|
|
149
|
+
export type SetupWriteTeamYamlResponse = {
|
|
150
|
+
success: true;
|
|
151
|
+
path: string;
|
|
152
|
+
action: 'created' | 'overwritten';
|
|
153
|
+
} | {
|
|
154
|
+
success: false;
|
|
155
|
+
path: string;
|
|
156
|
+
error: string;
|
|
157
|
+
};
|
|
158
|
+
export type SetupWriteRtwsLlmYamlRequest = {
|
|
159
|
+
raw: string;
|
|
160
|
+
overwrite: boolean;
|
|
161
|
+
};
|
|
162
|
+
export type SetupWriteRtwsLlmYamlResponse = {
|
|
163
|
+
success: true;
|
|
164
|
+
path: string;
|
|
165
|
+
action: 'created' | 'overwritten';
|
|
166
|
+
} | {
|
|
167
|
+
success: false;
|
|
168
|
+
path: string;
|
|
169
|
+
error: string;
|
|
170
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export type SnippetTemplateSource = 'builtin' | 'rtws';
|
|
2
|
+
export type SnippetTemplate = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
content: string;
|
|
7
|
+
source: SnippetTemplateSource;
|
|
8
|
+
path?: string;
|
|
9
|
+
};
|
|
10
|
+
export type SnippetTemplateGroup = {
|
|
11
|
+
key: string;
|
|
12
|
+
titleI18n: {
|
|
13
|
+
en: string;
|
|
14
|
+
zh: string;
|
|
15
|
+
};
|
|
16
|
+
templates: SnippetTemplate[];
|
|
17
|
+
};
|
|
18
|
+
export type SnippetCatalogResponse = {
|
|
19
|
+
success: true;
|
|
20
|
+
groups: SnippetTemplateGroup[];
|
|
21
|
+
} | {
|
|
22
|
+
success: false;
|
|
23
|
+
error: string;
|
|
24
|
+
};
|
|
25
|
+
export type SnippetTemplatesResponse = {
|
|
26
|
+
success: true;
|
|
27
|
+
templates: SnippetTemplate[];
|
|
28
|
+
} | {
|
|
29
|
+
success: false;
|
|
30
|
+
error: string;
|
|
31
|
+
};
|
|
32
|
+
export type SaveRtwsSnippetTemplateRequest = {
|
|
33
|
+
groupKey: string;
|
|
34
|
+
fileName?: string;
|
|
35
|
+
uiLanguage: 'en' | 'zh';
|
|
36
|
+
name: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
content: string;
|
|
39
|
+
};
|
|
40
|
+
export type SaveRtwsSnippetTemplateResponse = {
|
|
41
|
+
success: true;
|
|
42
|
+
template: SnippetTemplate;
|
|
43
|
+
} | {
|
|
44
|
+
success: false;
|
|
45
|
+
error: string;
|
|
46
|
+
};
|
|
47
|
+
export type CreateRtwsSnippetGroupRequest = {
|
|
48
|
+
title: string;
|
|
49
|
+
uiLanguage: 'en' | 'zh';
|
|
50
|
+
};
|
|
51
|
+
export type CreateRtwsSnippetGroupResponse = {
|
|
52
|
+
success: true;
|
|
53
|
+
groupKey: string;
|
|
54
|
+
} | {
|
|
55
|
+
success: false;
|
|
56
|
+
error: string;
|
|
57
|
+
};
|
|
58
|
+
export type TeamMgmtManualRequest = {
|
|
59
|
+
topics?: ReadonlyArray<string>;
|
|
60
|
+
uiLanguage: 'en' | 'zh';
|
|
61
|
+
};
|
|
62
|
+
export type TeamMgmtManualResponse = {
|
|
63
|
+
success: true;
|
|
64
|
+
markdown: string;
|
|
65
|
+
} | {
|
|
66
|
+
success: false;
|
|
67
|
+
error: string;
|
|
68
|
+
};
|