@qloo/qloo-harness 0.1.18
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 +21 -0
- package/README.md +394 -0
- package/THIRD_PARTY_NOTICES.md +40 -0
- package/dist/app.js +48 -0
- package/dist/bin.js +14 -0
- package/dist/build.js +117 -0
- package/dist/cli.js +95 -0
- package/dist/doctor.js +1019 -0
- package/dist/exec.js +782 -0
- package/dist/guided-journey.js +223 -0
- package/dist/index.d.ts +1321 -0
- package/dist/index.js +156 -0
- package/dist/integration-plan.js +1097 -0
- package/dist/mcp.js +909 -0
- package/dist/observability.js +115 -0
- package/dist/paths.js +77 -0
- package/dist/plan.js +163 -0
- package/dist/profiles.js +63 -0
- package/dist/project-context.js +364 -0
- package/dist/qloo-presentation.js +358 -0
- package/dist/qloo-tools.js +2195 -0
- package/dist/resolution-provider.js +1380 -0
- package/dist/router.js +6061 -0
- package/dist/runtime/explore-policy.js +666 -0
- package/dist/runtime/pi-adapter.js +259 -0
- package/dist/runtime/pi-command-policy.js +74 -0
- package/dist/runtime/qloo-header.js +173 -0
- package/dist/runtime/resources.js +37 -0
- package/dist/setup.js +1138 -0
- package/dist/update-manager.js +906 -0
- package/dist/workflow-executor.js +976 -0
- package/package.json +72 -0
- package/resources/BUILD.md +24 -0
- package/resources/EXPLORE.md +34 -0
- package/resources/INTEGRATE.md +28 -0
- package/resources/PLAN.md +23 -0
- package/resources/SYSTEM.md +49 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1321 @@
|
|
|
1
|
+
import { ToolDefinition, InlineExtension, ModelRuntime, SessionManager, InteractiveModeOptions, AgentSessionRuntime, CreateAgentSessionServicesOptions, InteractiveMode, ProgressCallback } from '@earendil-works/pi-coding-agent';
|
|
2
|
+
export { ToolDefinition as QlooHarnessToolDefinition } from '@earendil-works/pi-coding-agent';
|
|
3
|
+
import { Static, Type } from 'typebox';
|
|
4
|
+
|
|
5
|
+
interface ResolveQlooPathsOptions {
|
|
6
|
+
cwd?: string;
|
|
7
|
+
env?: Readonly<Record<string, string | undefined>>;
|
|
8
|
+
homeDirectory?: string;
|
|
9
|
+
}
|
|
10
|
+
interface QlooPaths {
|
|
11
|
+
qlooDir: string;
|
|
12
|
+
configFile: string;
|
|
13
|
+
agentDir: string;
|
|
14
|
+
authFile: string;
|
|
15
|
+
modelsFile: string;
|
|
16
|
+
modelsStoreFile: string;
|
|
17
|
+
settingsFile: string;
|
|
18
|
+
trustFile: string;
|
|
19
|
+
sessionsDir: string;
|
|
20
|
+
sessionDir: string;
|
|
21
|
+
projectsDir: string;
|
|
22
|
+
projectDir: string;
|
|
23
|
+
projectContextFile: string;
|
|
24
|
+
plansDir: string;
|
|
25
|
+
cacheDir: string;
|
|
26
|
+
logsDir: string;
|
|
27
|
+
}
|
|
28
|
+
declare function resolveQlooPaths(options?: ResolveQlooPathsOptions): QlooPaths;
|
|
29
|
+
interface EnsureQlooStateOptions {
|
|
30
|
+
platform?: NodeJS.Platform;
|
|
31
|
+
}
|
|
32
|
+
declare function ensureQlooStateDirectories(paths: QlooPaths, options?: EnsureQlooStateOptions): Promise<void>;
|
|
33
|
+
|
|
34
|
+
declare const QLOO_HARNESS_PROFILES: readonly ["explore", "integrate", "plan", "build"];
|
|
35
|
+
type QlooHarnessProfile = (typeof QLOO_HARNESS_PROFILES)[number];
|
|
36
|
+
declare function isQlooHarnessProfile(value: string): value is QlooHarnessProfile;
|
|
37
|
+
declare const QLOO_DEFAULT_PROFILE: QlooHarnessProfile;
|
|
38
|
+
interface QlooProfileDefinition {
|
|
39
|
+
readonly id: QlooHarnessProfile;
|
|
40
|
+
readonly summary: string;
|
|
41
|
+
readonly workspaceTools: readonly string[];
|
|
42
|
+
readonly approvalTools: readonly string[];
|
|
43
|
+
readonly allowDirectShell: boolean;
|
|
44
|
+
readonly maxToolCallsPerTurn: number;
|
|
45
|
+
readonly maxIdenticalToolCallsPerTurn: number;
|
|
46
|
+
}
|
|
47
|
+
declare const QLOO_PROFILE_DEFINITIONS: Readonly<Record<QlooHarnessProfile, QlooProfileDefinition>>;
|
|
48
|
+
declare function getQlooProfileDefinition(profile: QlooHarnessProfile): QlooProfileDefinition;
|
|
49
|
+
|
|
50
|
+
type QueryPrimitive = string | number | boolean;
|
|
51
|
+
type QueryValue = QueryPrimitive | readonly QueryPrimitive[] | null | undefined;
|
|
52
|
+
type QlooQuery = Readonly<Record<string, QueryValue>>;
|
|
53
|
+
interface QlooRequestOptions {
|
|
54
|
+
readonly signal?: AbortSignal;
|
|
55
|
+
readonly correlationId?: string;
|
|
56
|
+
}
|
|
57
|
+
interface QlooApiResponse {
|
|
58
|
+
readonly success?: boolean;
|
|
59
|
+
readonly duration?: number;
|
|
60
|
+
readonly results?: unknown;
|
|
61
|
+
readonly code?: number | string;
|
|
62
|
+
readonly reason?: string;
|
|
63
|
+
readonly message?: string;
|
|
64
|
+
readonly [key: string]: unknown;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
type QlooConnectivityKind = "authentication" | "cancelled" | "configuration" | "connection" | "dns" | "http" | "proxy" | "rate-limit" | "ready" | "reachable" | "service" | "timeout" | "tls";
|
|
68
|
+
interface QlooConnectivityProbeResult {
|
|
69
|
+
readonly ok: boolean;
|
|
70
|
+
readonly reachable: boolean;
|
|
71
|
+
readonly kind: QlooConnectivityKind;
|
|
72
|
+
readonly message: string;
|
|
73
|
+
readonly durationMs: number;
|
|
74
|
+
readonly retryable: boolean;
|
|
75
|
+
readonly status?: number;
|
|
76
|
+
readonly requestId?: string;
|
|
77
|
+
readonly systemCode?: string;
|
|
78
|
+
}
|
|
79
|
+
interface ProbeQlooConnectivityOptions {
|
|
80
|
+
readonly apiKey?: string;
|
|
81
|
+
readonly baseUrl?: string;
|
|
82
|
+
/** Required for any base URL other than the exact production Qloo endpoint. */
|
|
83
|
+
readonly allowCustomBaseUrl?: boolean;
|
|
84
|
+
readonly timeoutMs?: number;
|
|
85
|
+
readonly fetch?: typeof globalThis.fetch;
|
|
86
|
+
readonly now?: () => number;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
interface QlooFileConfig {
|
|
90
|
+
readonly api_key?: string;
|
|
91
|
+
readonly base_url?: string;
|
|
92
|
+
readonly trusted_base_url?: string;
|
|
93
|
+
readonly taste_resolver_url?: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
declare const QLOO_TOOL_RESULT_SCHEMA_VERSION: "1.0-preview.1";
|
|
97
|
+
declare const QLOO_WORKFLOW_OPERATION_IDS: readonly ["recommend", "rank", "describe", "where_popular", "compare_audiences", "entity_tags", "audience_demographics", "trends", "find_tags"];
|
|
98
|
+
type QlooWorkflowOperationId = (typeof QLOO_WORKFLOW_OPERATION_IDS)[number];
|
|
99
|
+
|
|
100
|
+
declare const QLOO_WORKFLOW_INPUT_SCHEMAS: {
|
|
101
|
+
readonly recommend: Type.TObject<{
|
|
102
|
+
target_type: Type.TString;
|
|
103
|
+
signals: Type.TOptional<Type.TArray<Type.TString>>;
|
|
104
|
+
signal_tags: Type.TOptional<Type.TArray<Type.TString>>;
|
|
105
|
+
signal_tags_operator: Type.TOptional<Type.TString>;
|
|
106
|
+
signal_location: Type.TOptional<Type.TString>;
|
|
107
|
+
demographic: Type.TOptional<Type.TString>;
|
|
108
|
+
filter_location: Type.TOptional<Type.TString>;
|
|
109
|
+
include_tags: Type.TOptional<Type.TArray<Type.TString>>;
|
|
110
|
+
include_tags_operator: Type.TOptional<Type.TString>;
|
|
111
|
+
exclude_tags: Type.TOptional<Type.TArray<Type.TString>>;
|
|
112
|
+
exclude_tags_operator: Type.TOptional<Type.TString>;
|
|
113
|
+
explain: Type.TOptional<Type.TBoolean>;
|
|
114
|
+
limit: Type.TOptional<Type.TInteger>;
|
|
115
|
+
}>;
|
|
116
|
+
readonly rank: Type.TObject<{
|
|
117
|
+
options: Type.TArray<Type.TString>;
|
|
118
|
+
option_type: Type.TString;
|
|
119
|
+
signals: Type.TOptional<Type.TArray<Type.TString>>;
|
|
120
|
+
signal_location: Type.TOptional<Type.TString>;
|
|
121
|
+
demographic: Type.TOptional<Type.TString>;
|
|
122
|
+
include_tags: Type.TOptional<Type.TArray<Type.TString>>;
|
|
123
|
+
exclude_tags: Type.TOptional<Type.TArray<Type.TString>>;
|
|
124
|
+
}>;
|
|
125
|
+
readonly describe: Type.TObject<{
|
|
126
|
+
entity: Type.TString;
|
|
127
|
+
type: Type.TOptional<Type.TString>;
|
|
128
|
+
}>;
|
|
129
|
+
readonly where_popular: Type.TObject<{
|
|
130
|
+
entity: Type.TString;
|
|
131
|
+
entity_type: Type.TOptional<Type.TString>;
|
|
132
|
+
within: Type.TString;
|
|
133
|
+
limit: Type.TOptional<Type.TInteger>;
|
|
134
|
+
}>;
|
|
135
|
+
readonly compare_audiences: Type.TObject<{
|
|
136
|
+
group_a: Type.TArray<Type.TString>;
|
|
137
|
+
group_b: Type.TArray<Type.TString>;
|
|
138
|
+
target_type: Type.TOptional<Type.TString>;
|
|
139
|
+
limit: Type.TOptional<Type.TInteger>;
|
|
140
|
+
}>;
|
|
141
|
+
readonly entity_tags: Type.TObject<{
|
|
142
|
+
entities: Type.TArray<Type.TString>;
|
|
143
|
+
entity_type: Type.TOptional<Type.TString>;
|
|
144
|
+
limit: Type.TOptional<Type.TInteger>;
|
|
145
|
+
}>;
|
|
146
|
+
readonly audience_demographics: Type.TObject<{
|
|
147
|
+
entity: Type.TString;
|
|
148
|
+
entity_type: Type.TOptional<Type.TString>;
|
|
149
|
+
limit: Type.TOptional<Type.TInteger>;
|
|
150
|
+
}>;
|
|
151
|
+
readonly trends: Type.TObject<{
|
|
152
|
+
entities: Type.TArray<Type.TString>;
|
|
153
|
+
entity_type: Type.TString;
|
|
154
|
+
start_date: Type.TString;
|
|
155
|
+
end_date: Type.TString;
|
|
156
|
+
limit: Type.TOptional<Type.TInteger>;
|
|
157
|
+
}>;
|
|
158
|
+
readonly find_tags: Type.TObject<{
|
|
159
|
+
query: Type.TString;
|
|
160
|
+
semantic: Type.TOptional<Type.TBoolean>;
|
|
161
|
+
limit: Type.TOptional<Type.TInteger>;
|
|
162
|
+
}>;
|
|
163
|
+
};
|
|
164
|
+
type QlooRecommendInput = Static<typeof QLOO_WORKFLOW_INPUT_SCHEMAS.recommend>;
|
|
165
|
+
type QlooRankInput = Static<typeof QLOO_WORKFLOW_INPUT_SCHEMAS.rank>;
|
|
166
|
+
type QlooDescribeInput = Static<typeof QLOO_WORKFLOW_INPUT_SCHEMAS.describe>;
|
|
167
|
+
type QlooWherePopularInput = Static<typeof QLOO_WORKFLOW_INPUT_SCHEMAS.where_popular>;
|
|
168
|
+
type QlooCompareAudiencesInput = Static<typeof QLOO_WORKFLOW_INPUT_SCHEMAS.compare_audiences>;
|
|
169
|
+
type QlooEntityTagsInput = Static<typeof QLOO_WORKFLOW_INPUT_SCHEMAS.entity_tags>;
|
|
170
|
+
type QlooAudienceDemographicsInput = Static<typeof QLOO_WORKFLOW_INPUT_SCHEMAS.audience_demographics>;
|
|
171
|
+
type QlooTrendsInput = Static<typeof QLOO_WORKFLOW_INPUT_SCHEMAS.trends>;
|
|
172
|
+
type QlooFindTagsInput = Static<typeof QLOO_WORKFLOW_INPUT_SCHEMAS.find_tags>;
|
|
173
|
+
type QlooWorkflowInputByOperation = {
|
|
174
|
+
readonly recommend: QlooRecommendInput;
|
|
175
|
+
readonly rank: QlooRankInput;
|
|
176
|
+
readonly describe: QlooDescribeInput;
|
|
177
|
+
readonly where_popular: QlooWherePopularInput;
|
|
178
|
+
readonly compare_audiences: QlooCompareAudiencesInput;
|
|
179
|
+
readonly entity_tags: QlooEntityTagsInput;
|
|
180
|
+
readonly audience_demographics: QlooAudienceDemographicsInput;
|
|
181
|
+
readonly trends: QlooTrendsInput;
|
|
182
|
+
readonly find_tags: QlooFindTagsInput;
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
declare const QLOO_RESOLUTION_PROVIDER_DESCRIPTOR_SCHEMA: Type.TObject<{
|
|
186
|
+
contract_version: Type.TLiteral<"1.0-preview.1">;
|
|
187
|
+
provider_id: Type.TString;
|
|
188
|
+
name: Type.TString;
|
|
189
|
+
entity_strategy: Type.TString;
|
|
190
|
+
tag_strategy: Type.TString;
|
|
191
|
+
remote: Type.TBoolean;
|
|
192
|
+
uses_model: Type.TBoolean;
|
|
193
|
+
fallback: Type.TLiteral<"none">;
|
|
194
|
+
}>;
|
|
195
|
+
declare const QLOO_RESOLUTION_OUTCOME_SCHEMA: Type.TUnion<[Type.TObject<{
|
|
196
|
+
status: Type.TLiteral<"resolved">;
|
|
197
|
+
match: Type.TUnion<[Type.TLiteral<"identifier">, Type.TLiteral<"exact">, Type.TLiteral<"semantic">]>;
|
|
198
|
+
selected: Type.TObject<{
|
|
199
|
+
id: Type.TString;
|
|
200
|
+
name: Type.TString;
|
|
201
|
+
type: Type.TOptional<Type.TString>;
|
|
202
|
+
rank: Type.TOptional<Type.TInteger>;
|
|
203
|
+
score: Type.TOptional<Type.TNumber>;
|
|
204
|
+
popularity: Type.TOptional<Type.TNumber>;
|
|
205
|
+
parent_types: Type.TOptional<Type.TArray<Type.TString>>;
|
|
206
|
+
description: Type.TOptional<Type.TString>;
|
|
207
|
+
release_year: Type.TOptional<Type.TInteger>;
|
|
208
|
+
address: Type.TOptional<Type.TUnknown>;
|
|
209
|
+
}>;
|
|
210
|
+
alternatives: Type.TOptional<Type.TArray<Type.TObject<{
|
|
211
|
+
id: Type.TString;
|
|
212
|
+
name: Type.TString;
|
|
213
|
+
type: Type.TOptional<Type.TString>;
|
|
214
|
+
rank: Type.TOptional<Type.TInteger>;
|
|
215
|
+
score: Type.TOptional<Type.TNumber>;
|
|
216
|
+
popularity: Type.TOptional<Type.TNumber>;
|
|
217
|
+
parent_types: Type.TOptional<Type.TArray<Type.TString>>;
|
|
218
|
+
description: Type.TOptional<Type.TString>;
|
|
219
|
+
release_year: Type.TOptional<Type.TInteger>;
|
|
220
|
+
address: Type.TOptional<Type.TUnknown>;
|
|
221
|
+
}>>>;
|
|
222
|
+
input: Type.TString;
|
|
223
|
+
provenance: Type.TObject<{
|
|
224
|
+
contract_version: Type.TLiteral<"1.0-preview.1">;
|
|
225
|
+
provider_id: Type.TString;
|
|
226
|
+
provider_name: Type.TString;
|
|
227
|
+
endpoint: Type.TString;
|
|
228
|
+
strategy: Type.TString;
|
|
229
|
+
remote: Type.TBoolean;
|
|
230
|
+
uses_model: Type.TBoolean;
|
|
231
|
+
provider_version: Type.TOptional<Type.TString>;
|
|
232
|
+
cache_status: Type.TOptional<Type.TString>;
|
|
233
|
+
}>;
|
|
234
|
+
warnings: Type.TOptional<Type.TArray<Type.TString>>;
|
|
235
|
+
}>, Type.TObject<{
|
|
236
|
+
status: Type.TLiteral<"ambiguous">;
|
|
237
|
+
candidates: Type.TArray<Type.TObject<{
|
|
238
|
+
id: Type.TString;
|
|
239
|
+
name: Type.TString;
|
|
240
|
+
type: Type.TOptional<Type.TString>;
|
|
241
|
+
rank: Type.TOptional<Type.TInteger>;
|
|
242
|
+
score: Type.TOptional<Type.TNumber>;
|
|
243
|
+
popularity: Type.TOptional<Type.TNumber>;
|
|
244
|
+
parent_types: Type.TOptional<Type.TArray<Type.TString>>;
|
|
245
|
+
description: Type.TOptional<Type.TString>;
|
|
246
|
+
release_year: Type.TOptional<Type.TInteger>;
|
|
247
|
+
address: Type.TOptional<Type.TUnknown>;
|
|
248
|
+
}>>;
|
|
249
|
+
input: Type.TString;
|
|
250
|
+
provenance: Type.TObject<{
|
|
251
|
+
contract_version: Type.TLiteral<"1.0-preview.1">;
|
|
252
|
+
provider_id: Type.TString;
|
|
253
|
+
provider_name: Type.TString;
|
|
254
|
+
endpoint: Type.TString;
|
|
255
|
+
strategy: Type.TString;
|
|
256
|
+
remote: Type.TBoolean;
|
|
257
|
+
uses_model: Type.TBoolean;
|
|
258
|
+
provider_version: Type.TOptional<Type.TString>;
|
|
259
|
+
cache_status: Type.TOptional<Type.TString>;
|
|
260
|
+
}>;
|
|
261
|
+
warnings: Type.TOptional<Type.TArray<Type.TString>>;
|
|
262
|
+
}>, Type.TObject<{
|
|
263
|
+
status: Type.TLiteral<"not_found">;
|
|
264
|
+
candidates: Type.TOptional<Type.TArray<Type.TObject<{
|
|
265
|
+
id: Type.TString;
|
|
266
|
+
name: Type.TString;
|
|
267
|
+
type: Type.TOptional<Type.TString>;
|
|
268
|
+
rank: Type.TOptional<Type.TInteger>;
|
|
269
|
+
score: Type.TOptional<Type.TNumber>;
|
|
270
|
+
popularity: Type.TOptional<Type.TNumber>;
|
|
271
|
+
parent_types: Type.TOptional<Type.TArray<Type.TString>>;
|
|
272
|
+
description: Type.TOptional<Type.TString>;
|
|
273
|
+
release_year: Type.TOptional<Type.TInteger>;
|
|
274
|
+
address: Type.TOptional<Type.TUnknown>;
|
|
275
|
+
}>>>;
|
|
276
|
+
input: Type.TString;
|
|
277
|
+
provenance: Type.TObject<{
|
|
278
|
+
contract_version: Type.TLiteral<"1.0-preview.1">;
|
|
279
|
+
provider_id: Type.TString;
|
|
280
|
+
provider_name: Type.TString;
|
|
281
|
+
endpoint: Type.TString;
|
|
282
|
+
strategy: Type.TString;
|
|
283
|
+
remote: Type.TBoolean;
|
|
284
|
+
uses_model: Type.TBoolean;
|
|
285
|
+
provider_version: Type.TOptional<Type.TString>;
|
|
286
|
+
cache_status: Type.TOptional<Type.TString>;
|
|
287
|
+
}>;
|
|
288
|
+
warnings: Type.TOptional<Type.TArray<Type.TString>>;
|
|
289
|
+
}>]>;
|
|
290
|
+
type QlooResolutionProviderDescriptor = Static<typeof QLOO_RESOLUTION_PROVIDER_DESCRIPTOR_SCHEMA>;
|
|
291
|
+
type QlooResolutionOutcome = Static<typeof QLOO_RESOLUTION_OUTCOME_SCHEMA>;
|
|
292
|
+
|
|
293
|
+
type QlooTransportKind = "cli" | "direct" | "mcp";
|
|
294
|
+
interface QlooTransportDescriptor {
|
|
295
|
+
readonly kind: QlooTransportKind;
|
|
296
|
+
readonly name: string;
|
|
297
|
+
readonly remote?: boolean;
|
|
298
|
+
}
|
|
299
|
+
interface QlooWorkflowExecutionContext {
|
|
300
|
+
readonly signal?: AbortSignal;
|
|
301
|
+
readonly correlationId?: string;
|
|
302
|
+
}
|
|
303
|
+
interface QlooWorkflowResultEnvelope extends Record<string, unknown> {
|
|
304
|
+
readonly schema_version: typeof QLOO_TOOL_RESULT_SCHEMA_VERSION;
|
|
305
|
+
readonly operation: string;
|
|
306
|
+
}
|
|
307
|
+
interface QlooWorkflowExecution<Operation extends QlooWorkflowOperationId> {
|
|
308
|
+
readonly operation: Operation;
|
|
309
|
+
readonly transport: QlooTransportDescriptor;
|
|
310
|
+
readonly correlationId: string;
|
|
311
|
+
readonly durationMs: number;
|
|
312
|
+
readonly result: QlooWorkflowResultEnvelope;
|
|
313
|
+
}
|
|
314
|
+
interface QlooWorkflowFailure {
|
|
315
|
+
readonly operation: QlooWorkflowOperationId;
|
|
316
|
+
readonly transport: QlooTransportDescriptor;
|
|
317
|
+
readonly correlationId: string;
|
|
318
|
+
readonly durationMs: number;
|
|
319
|
+
readonly error: QlooWorkflowExecutionError;
|
|
320
|
+
}
|
|
321
|
+
type QlooWorkflowFailureLayer = "qloo" | "resolver" | "tool_input" | "transport" | "harness";
|
|
322
|
+
type QlooWorkflowFailureCode = "CANCELLED" | "HARNESS_INTERNAL" | "QLOO_AUTH" | "QLOO_CONNECT" | "QLOO_CONTRACT" | "QLOO_DNS" | "QLOO_RATE_LIMIT" | "QLOO_TIMEOUT" | "QLOO_TLS" | "QLOO_UPSTREAM" | "RESOLVER_AUTH" | "RESOLVER_CONNECT" | "RESOLVER_CONTRACT" | "RESOLVER_TIMEOUT" | "RESOLVER_UPSTREAM" | "TOOL_INPUT";
|
|
323
|
+
interface QlooWorkflowExecutionObserver {
|
|
324
|
+
onExecution?(execution: QlooWorkflowExecution<QlooWorkflowOperationId>): void | Promise<void>;
|
|
325
|
+
onFailure?(failure: QlooWorkflowFailure): void | Promise<void>;
|
|
326
|
+
}
|
|
327
|
+
interface QlooWorkflowExecutor {
|
|
328
|
+
readonly transport: QlooTransportDescriptor;
|
|
329
|
+
readonly resolution?: QlooResolutionProviderDescriptor;
|
|
330
|
+
execute<Operation extends QlooWorkflowOperationId>(operation: Operation, input: QlooWorkflowInputByOperation[Operation], context?: QlooWorkflowExecutionContext): Promise<QlooWorkflowExecution<Operation>>;
|
|
331
|
+
}
|
|
332
|
+
interface CreateDelegatingQlooExecutorOptions {
|
|
333
|
+
readonly transport: QlooTransportDescriptor;
|
|
334
|
+
readonly resolution?: QlooResolutionProviderDescriptor;
|
|
335
|
+
readonly invoke: <Operation extends QlooWorkflowOperationId>(operation: Operation, input: QlooWorkflowInputByOperation[Operation], context: QlooWorkflowExecutionContext) => Promise<Record<string, unknown>>;
|
|
336
|
+
readonly now?: () => number;
|
|
337
|
+
readonly createCorrelationId?: () => string;
|
|
338
|
+
readonly observer?: QlooWorkflowExecutionObserver;
|
|
339
|
+
}
|
|
340
|
+
declare class QlooWorkflowExecutionError extends Error {
|
|
341
|
+
readonly operation: QlooWorkflowOperationId;
|
|
342
|
+
readonly transport: QlooTransportDescriptor;
|
|
343
|
+
readonly code: QlooWorkflowFailureCode;
|
|
344
|
+
readonly layer: QlooWorkflowFailureLayer;
|
|
345
|
+
readonly retryable: boolean;
|
|
346
|
+
readonly expected: boolean;
|
|
347
|
+
readonly recovery: string;
|
|
348
|
+
readonly correlationId?: string;
|
|
349
|
+
readonly durationMs?: number;
|
|
350
|
+
constructor(operation: QlooWorkflowOperationId, transport: QlooTransportDescriptor, message: string, cause?: unknown, metadata?: {
|
|
351
|
+
readonly code?: QlooWorkflowFailureCode;
|
|
352
|
+
readonly layer?: QlooWorkflowFailureLayer;
|
|
353
|
+
readonly retryable?: boolean;
|
|
354
|
+
readonly expected?: boolean;
|
|
355
|
+
readonly recovery?: string;
|
|
356
|
+
readonly correlationId?: string;
|
|
357
|
+
readonly durationMs?: number;
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Adapt a direct client, embedded CLI workflow, or MCP workflow invoker to one
|
|
362
|
+
* versioned execution boundary. Selection happens outside this function and is
|
|
363
|
+
* never changed silently after a failure.
|
|
364
|
+
*/
|
|
365
|
+
declare function createDelegatingQlooWorkflowExecutor(options: CreateDelegatingQlooExecutorOptions): QlooWorkflowExecutor;
|
|
366
|
+
declare function createCliQlooWorkflowExecutor(invoke: CreateDelegatingQlooExecutorOptions["invoke"]): QlooWorkflowExecutor;
|
|
367
|
+
declare function createMcpQlooWorkflowExecutor(invoke: CreateDelegatingQlooExecutorOptions["invoke"], name?: string): QlooWorkflowExecutor;
|
|
368
|
+
|
|
369
|
+
declare const QLOO_RESOLUTION_PROVIDER_ENVIRONMENT_VARIABLE = "QLOO_RESOLUTION_PROVIDER";
|
|
370
|
+
declare const TASTE_RESOLVER_URL_ENVIRONMENT_VARIABLE = "TASTE_RESOLVER_URL";
|
|
371
|
+
declare const TASTE_RESOLVER_API_KEY_ENVIRONMENT_VARIABLE = "TASTE_RESOLVER_API_KEY";
|
|
372
|
+
declare const QLOO_TRUSTED_TASTE_RESOLVER_URL_ENVIRONMENT_VARIABLE = "QLOO_TRUSTED_TASTE_RESOLVER_URL";
|
|
373
|
+
declare const QLOO_TASTE_RESOLVER_TAG_ENDPOINT_ENVIRONMENT_VARIABLE = "QLOO_TASTE_RESOLVER_TAG_ENDPOINT";
|
|
374
|
+
declare const QLOO_TASTE_RESOLVER_MIN_SCORE_ENVIRONMENT_VARIABLE = "QLOO_TASTE_RESOLVER_MIN_SCORE";
|
|
375
|
+
declare const QLOO_TASTE_RESOLVER_MIN_MARGIN_ENVIRONMENT_VARIABLE = "QLOO_TASTE_RESOLVER_MIN_MARGIN";
|
|
376
|
+
type QlooTagResolutionPurpose = "signal" | "include_filter" | "exclude_filter";
|
|
377
|
+
interface QlooResolutionContext {
|
|
378
|
+
readonly signal?: AbortSignal;
|
|
379
|
+
readonly correlationId: string;
|
|
380
|
+
}
|
|
381
|
+
interface QlooEntityResolutionRequest {
|
|
382
|
+
readonly inputs: readonly string[];
|
|
383
|
+
readonly type?: string;
|
|
384
|
+
}
|
|
385
|
+
interface QlooTagResolutionRequest {
|
|
386
|
+
readonly inputs: readonly string[];
|
|
387
|
+
readonly targetType?: string;
|
|
388
|
+
readonly purpose: QlooTagResolutionPurpose;
|
|
389
|
+
}
|
|
390
|
+
interface QlooResolutionBatch {
|
|
391
|
+
readonly outcomes: readonly QlooResolutionOutcome[];
|
|
392
|
+
}
|
|
393
|
+
interface QlooResolutionProvider {
|
|
394
|
+
readonly descriptor: QlooResolutionProviderDescriptor;
|
|
395
|
+
resolveEntities(request: QlooEntityResolutionRequest, context: QlooResolutionContext): Promise<QlooResolutionBatch>;
|
|
396
|
+
resolveTags(request: QlooTagResolutionRequest, context: QlooResolutionContext): Promise<QlooResolutionBatch>;
|
|
397
|
+
}
|
|
398
|
+
interface QlooResolutionClient {
|
|
399
|
+
searchEntities(query: QlooQuery, options?: QlooRequestOptions): Promise<QlooApiResponse>;
|
|
400
|
+
entities(entityIds: readonly string[], options?: QlooRequestOptions): Promise<QlooApiResponse>;
|
|
401
|
+
tags(query?: QlooQuery, options?: QlooRequestOptions): Promise<QlooApiResponse>;
|
|
402
|
+
}
|
|
403
|
+
interface NativeQlooResolutionProviderOptions {
|
|
404
|
+
readonly cacheTtlMs?: number;
|
|
405
|
+
readonly cacheMaxEntries?: number;
|
|
406
|
+
readonly now?: () => number;
|
|
407
|
+
}
|
|
408
|
+
type QlooResolutionProviderErrorCode = "RESOLVER_ABORTED" | "RESOLVER_AUTH" | "RESOLVER_CONFIGURATION" | "RESOLVER_CONNECT" | "RESOLVER_CONTRACT" | "RESOLVER_TIMEOUT" | "RESOLVER_UPSTREAM";
|
|
409
|
+
declare class QlooResolutionProviderError extends Error {
|
|
410
|
+
readonly code: QlooResolutionProviderErrorCode;
|
|
411
|
+
readonly retryable: boolean;
|
|
412
|
+
readonly recovery: string;
|
|
413
|
+
readonly status?: number;
|
|
414
|
+
constructor(code: QlooResolutionProviderErrorCode, message: string, options: {
|
|
415
|
+
readonly retryable?: boolean;
|
|
416
|
+
readonly recovery: string;
|
|
417
|
+
readonly status?: number;
|
|
418
|
+
readonly cause?: unknown;
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
interface TasteResolverResolutionProviderOptions {
|
|
422
|
+
readonly baseUrl: string;
|
|
423
|
+
readonly trustedBaseUrl?: string;
|
|
424
|
+
readonly apiKey?: string;
|
|
425
|
+
readonly entityProvider: QlooResolutionProvider;
|
|
426
|
+
readonly fetch?: typeof globalThis.fetch;
|
|
427
|
+
readonly timeoutMs?: number;
|
|
428
|
+
readonly maxResponseBytes?: number;
|
|
429
|
+
readonly tagEndpoint?: TasteResolverTagEndpoint;
|
|
430
|
+
readonly minimumSemanticScore?: number;
|
|
431
|
+
readonly minimumSemanticScoreMargin?: number;
|
|
432
|
+
readonly cacheTtlMs?: number;
|
|
433
|
+
readonly cacheMaxEntries?: number;
|
|
434
|
+
readonly now?: () => number;
|
|
435
|
+
}
|
|
436
|
+
type TasteResolverTagEndpoint = "legacy" | "structured";
|
|
437
|
+
type TasteResolverHealthKind = "resolver-healthy" | "resolver-degraded" | "resolver-http" | "resolver-timeout" | "resolver-connect" | "resolver-contract";
|
|
438
|
+
interface TasteResolverHealthProbeOptions {
|
|
439
|
+
readonly baseUrl: string;
|
|
440
|
+
readonly trustedBaseUrl?: string;
|
|
441
|
+
readonly fetch?: typeof globalThis.fetch;
|
|
442
|
+
readonly timeoutMs?: number;
|
|
443
|
+
readonly maxResponseBytes?: number;
|
|
444
|
+
readonly signal?: AbortSignal;
|
|
445
|
+
}
|
|
446
|
+
interface TasteResolverHealthProbeResult {
|
|
447
|
+
readonly ok: boolean;
|
|
448
|
+
readonly kind: TasteResolverHealthKind;
|
|
449
|
+
readonly message: string;
|
|
450
|
+
readonly durationMs: number;
|
|
451
|
+
readonly retryable: boolean;
|
|
452
|
+
readonly status?: number;
|
|
453
|
+
}
|
|
454
|
+
interface CreateQlooResolutionProviderFromEnvironmentOptions {
|
|
455
|
+
readonly client: QlooResolutionClient;
|
|
456
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
457
|
+
readonly fileConfig?: QlooFileConfig;
|
|
458
|
+
readonly fetch?: typeof globalThis.fetch;
|
|
459
|
+
}
|
|
460
|
+
interface InspectQlooResolutionProviderConfigurationOptions {
|
|
461
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
462
|
+
readonly fileConfig?: QlooFileConfig;
|
|
463
|
+
}
|
|
464
|
+
interface QlooResolutionProviderConfigurationInspection {
|
|
465
|
+
readonly selection: string;
|
|
466
|
+
readonly valid: boolean;
|
|
467
|
+
readonly providerId?: string;
|
|
468
|
+
readonly endpoint?: string;
|
|
469
|
+
readonly trusted: boolean;
|
|
470
|
+
readonly authenticated: boolean;
|
|
471
|
+
readonly usesModel: boolean;
|
|
472
|
+
readonly tagEndpoint?: TasteResolverTagEndpoint;
|
|
473
|
+
readonly minimumSemanticScore?: number;
|
|
474
|
+
readonly minimumSemanticScoreMargin?: number;
|
|
475
|
+
readonly message: string;
|
|
476
|
+
readonly recovery?: string;
|
|
477
|
+
}
|
|
478
|
+
declare function createNativeQlooResolutionProvider(client: QlooResolutionClient, options?: NativeQlooResolutionProviderOptions): QlooResolutionProvider;
|
|
479
|
+
/** @deprecated Use createNativeQlooResolutionProvider for the server-free default. */
|
|
480
|
+
declare function createPublicQlooResolutionProvider(client: QlooResolutionClient, options?: NativeQlooResolutionProviderOptions): QlooResolutionProvider;
|
|
481
|
+
declare function inspectQlooResolutionProviderConfiguration(options?: InspectQlooResolutionProviderConfigurationOptions): QlooResolutionProviderConfigurationInspection;
|
|
482
|
+
/** Probe the standalone taste-resolver's public, side-effect-free v1 health route. */
|
|
483
|
+
declare function probeTasteResolverHealth(options: TasteResolverHealthProbeOptions): Promise<TasteResolverHealthProbeResult>;
|
|
484
|
+
declare function createTasteResolverAssistedResolutionProvider(options: TasteResolverResolutionProviderOptions): QlooResolutionProvider;
|
|
485
|
+
declare function createQlooResolutionProviderFromEnvironment(options: CreateQlooResolutionProviderFromEnvironmentOptions): QlooResolutionProvider;
|
|
486
|
+
|
|
487
|
+
interface QlooToolClient extends QlooResolutionClient {
|
|
488
|
+
insights(query: QlooQuery, options?: QlooRequestOptions): Promise<QlooApiResponse>;
|
|
489
|
+
compare(query: QlooQuery, options?: QlooRequestOptions): Promise<QlooApiResponse>;
|
|
490
|
+
trending(query: QlooQuery, options?: QlooRequestOptions): Promise<QlooApiResponse>;
|
|
491
|
+
}
|
|
492
|
+
interface CreateQlooToolsOptions {
|
|
493
|
+
readonly client?: QlooToolClient;
|
|
494
|
+
readonly executor?: QlooWorkflowExecutor;
|
|
495
|
+
readonly executionObserver?: QlooWorkflowExecutionObserver;
|
|
496
|
+
readonly resolutionProvider?: QlooResolutionProvider;
|
|
497
|
+
}
|
|
498
|
+
interface QlooToolRuntimeInfo {
|
|
499
|
+
readonly transport: "cli" | "direct" | "mcp" | "none";
|
|
500
|
+
readonly transportName: string;
|
|
501
|
+
readonly remote: boolean;
|
|
502
|
+
readonly fallback: "none";
|
|
503
|
+
readonly resolution?: QlooResolutionProviderDescriptor;
|
|
504
|
+
}
|
|
505
|
+
declare function getQlooToolRuntimeInfo(tools: readonly ToolDefinition[]): QlooToolRuntimeInfo | undefined;
|
|
506
|
+
declare function createDirectQlooWorkflowExecutor(client: QlooToolClient, observer?: QlooWorkflowExecutionObserver, resolutionProvider?: QlooResolutionProvider): QlooWorkflowExecutor;
|
|
507
|
+
declare function createQlooTools(options?: CreateQlooToolsOptions): ToolDefinition[];
|
|
508
|
+
interface CreateQlooToolsFromEnvironmentOptions {
|
|
509
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
510
|
+
readonly client?: QlooToolClient;
|
|
511
|
+
readonly executor?: QlooWorkflowExecutor;
|
|
512
|
+
readonly executionObserver?: QlooWorkflowExecutionObserver;
|
|
513
|
+
readonly resolutionProvider?: QlooResolutionProvider;
|
|
514
|
+
readonly configPath?: string;
|
|
515
|
+
readonly readConfigFile?: (path: string) => string;
|
|
516
|
+
}
|
|
517
|
+
type CreateDirectQlooWorkflowExecutorFromEnvironmentOptions = Omit<CreateQlooToolsFromEnvironmentOptions, "client" | "executor">;
|
|
518
|
+
/**
|
|
519
|
+
* Resolve one direct executor from Qloo's shared credential and endpoint
|
|
520
|
+
* configuration. Returning undefined is an explicit unauthenticated state;
|
|
521
|
+
* callers must not replace it with another transport silently.
|
|
522
|
+
*/
|
|
523
|
+
declare function createDirectQlooWorkflowExecutorFromEnvironment(options?: CreateDirectQlooWorkflowExecutorFromEnvironmentOptions): QlooWorkflowExecutor | undefined;
|
|
524
|
+
declare function createQlooToolsFromEnvironment(options?: CreateQlooToolsFromEnvironmentOptions): ToolDefinition[];
|
|
525
|
+
|
|
526
|
+
declare const QLOO_WORKSPACE_TOOL_NAMES: readonly string[];
|
|
527
|
+
declare const QLOO_SESSION_STATE_ENTRY_TYPE: "qloo.workflow-state";
|
|
528
|
+
declare const QLOO_SESSION_STATE_SCHEMA_VERSION: "1.4";
|
|
529
|
+
interface QlooInteractiveCommandActions {
|
|
530
|
+
readonly doctor?: (network: boolean) => Promise<unknown>;
|
|
531
|
+
readonly retry?: (toolName: string, input: Readonly<Record<string, unknown>>) => Promise<Record<string, unknown>>;
|
|
532
|
+
}
|
|
533
|
+
declare function buildExploreToolNames(tools: readonly ToolDefinition[]): string[];
|
|
534
|
+
declare function buildProfileToolNames(profile: QlooHarnessProfile, tools: readonly ToolDefinition[]): string[];
|
|
535
|
+
declare function validateExploreTools(tools: readonly ToolDefinition[]): void;
|
|
536
|
+
declare function createHarnessPolicyExtension(profile: QlooHarnessProfile, allowedToolNames: ReadonlySet<string>, runtimeInfo?: {
|
|
537
|
+
readonly transport: string;
|
|
538
|
+
readonly transportName: string;
|
|
539
|
+
readonly remote: boolean;
|
|
540
|
+
readonly fallback: "none";
|
|
541
|
+
readonly resolution?: {
|
|
542
|
+
readonly name: string;
|
|
543
|
+
readonly tag_strategy: string;
|
|
544
|
+
readonly uses_model: boolean;
|
|
545
|
+
readonly fallback: "none";
|
|
546
|
+
};
|
|
547
|
+
}, commandActions?: QlooInteractiveCommandActions): InlineExtension;
|
|
548
|
+
declare function createExplorePolicyExtension(allowedToolNames: ReadonlySet<string>): InlineExtension;
|
|
549
|
+
|
|
550
|
+
interface HarnessResources {
|
|
551
|
+
systemPrompt: string;
|
|
552
|
+
exploreInstructions: string;
|
|
553
|
+
profileInstructions?: Readonly<Record<QlooHarnessProfile, string>>;
|
|
554
|
+
}
|
|
555
|
+
interface LoadHarnessResourcesOptions {
|
|
556
|
+
resourceRoot?: URL;
|
|
557
|
+
readText?: (url: URL) => Promise<string>;
|
|
558
|
+
}
|
|
559
|
+
declare function loadHarnessResources(options?: LoadHarnessResourcesOptions): Promise<HarnessResources>;
|
|
560
|
+
|
|
561
|
+
declare const PI_AGENT_DIR_ENVIRONMENT_VARIABLE = "PI_CODING_AGENT_DIR";
|
|
562
|
+
declare const PI_TELEMETRY_ENVIRONMENT_VARIABLE = "PI_TELEMETRY";
|
|
563
|
+
declare const PI_SKIP_VERSION_CHECK_ENVIRONMENT_VARIABLE = "PI_SKIP_VERSION_CHECK";
|
|
564
|
+
declare const PI_OFFLINE_ENVIRONMENT_VARIABLE = "PI_OFFLINE";
|
|
565
|
+
declare const QLOO_MODEL_RETRY_POLICY: Readonly<{
|
|
566
|
+
maxRetries: 1;
|
|
567
|
+
baseDelayMs: 1000;
|
|
568
|
+
providerTimeoutMs: 60000;
|
|
569
|
+
providerMaxRetries: 0;
|
|
570
|
+
providerMaxRetryDelayMs: 5000;
|
|
571
|
+
}>;
|
|
572
|
+
interface RetryPolicySettingsManager {
|
|
573
|
+
getGlobalSettings(): {
|
|
574
|
+
retry?: {
|
|
575
|
+
enabled?: boolean;
|
|
576
|
+
maxRetries?: number;
|
|
577
|
+
baseDelayMs?: number;
|
|
578
|
+
provider?: {
|
|
579
|
+
timeoutMs?: number;
|
|
580
|
+
maxRetries?: number;
|
|
581
|
+
maxRetryDelayMs?: number;
|
|
582
|
+
};
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
applyOverrides(overrides: {
|
|
586
|
+
retry: {
|
|
587
|
+
enabled: boolean;
|
|
588
|
+
maxRetries: number;
|
|
589
|
+
baseDelayMs: number;
|
|
590
|
+
provider: {
|
|
591
|
+
timeoutMs: number;
|
|
592
|
+
maxRetries: number;
|
|
593
|
+
maxRetryDelayMs: number;
|
|
594
|
+
};
|
|
595
|
+
};
|
|
596
|
+
}): void;
|
|
597
|
+
}
|
|
598
|
+
/** Bound Pi's model retry layers without persisting changes to user settings. */
|
|
599
|
+
declare function applyQlooModelRetryPolicy(settingsManager: RetryPolicySettingsManager): void;
|
|
600
|
+
declare function withPiAgentDirectory<T>(agentDir: string, operation: () => Promise<T>): Promise<T>;
|
|
601
|
+
/**
|
|
602
|
+
* Scope Qloo's privacy defaults without overriding explicit caller choices.
|
|
603
|
+
* PI_OFFLINE prevents Pi's automatic catalog, package, tool-download, and
|
|
604
|
+
* update egress; caller-provided values are preserved verbatim.
|
|
605
|
+
*/
|
|
606
|
+
declare function withPiPrivacyDefaults<T>(operation: () => Promise<T>): Promise<T>;
|
|
607
|
+
declare class MissingModelAuthenticationError extends Error {
|
|
608
|
+
readonly authFile: string;
|
|
609
|
+
constructor(authFile: string);
|
|
610
|
+
}
|
|
611
|
+
interface ModelAvailability {
|
|
612
|
+
getAvailable(): Promise<readonly unknown[]>;
|
|
613
|
+
}
|
|
614
|
+
declare function requireAuthenticatedModel(modelRuntime: ModelAvailability, authFile: string): Promise<void>;
|
|
615
|
+
type ResourceLoaderOptions = NonNullable<CreateAgentSessionServicesOptions["resourceLoaderOptions"]>;
|
|
616
|
+
declare function buildExploreResourceOptions(resources: HarnessResources, allowedToolNames: ReadonlySet<string>): ResourceLoaderOptions;
|
|
617
|
+
declare function buildHarnessResourceOptions(resources: HarnessResources, allowedToolNames: ReadonlySet<string>, profile: QlooHarnessProfile, runtimeInfo?: ReturnType<typeof getQlooToolRuntimeInfo>, commandActions?: QlooInteractiveCommandActions): ResourceLoaderOptions;
|
|
618
|
+
interface CreatePiHarnessRuntimeOptions {
|
|
619
|
+
cwd: string;
|
|
620
|
+
paths: QlooPaths;
|
|
621
|
+
resources: HarnessResources;
|
|
622
|
+
customTools?: readonly ToolDefinition[];
|
|
623
|
+
profile?: QlooHarnessProfile;
|
|
624
|
+
modelRuntime?: ModelRuntime;
|
|
625
|
+
sessionManager?: SessionManager;
|
|
626
|
+
interactiveCommandActions?: Pick<QlooInteractiveCommandActions, "doctor">;
|
|
627
|
+
}
|
|
628
|
+
interface HarnessRuntime {
|
|
629
|
+
/**
|
|
630
|
+
* Runs the interactive UI. Pi's InteractiveMode owns normal shutdown and
|
|
631
|
+
* disposes the underlying AgentSessionRuntime before it exits.
|
|
632
|
+
*/
|
|
633
|
+
runInteractive(options?: InteractiveModeOptions): Promise<void>;
|
|
634
|
+
/** Releases a partially started or non-interactive runtime. Idempotent here. */
|
|
635
|
+
dispose(): Promise<void>;
|
|
636
|
+
}
|
|
637
|
+
declare class PiHarnessRuntime implements HarnessRuntime {
|
|
638
|
+
readonly sessionRuntime: AgentSessionRuntime;
|
|
639
|
+
private runStarted;
|
|
640
|
+
private disposed;
|
|
641
|
+
constructor(sessionRuntime: AgentSessionRuntime);
|
|
642
|
+
/** Run one model turn through the same session, tools, and policy as the TUI. */
|
|
643
|
+
runPrompt(prompt: string): Promise<string | undefined>;
|
|
644
|
+
runInteractive(options?: InteractiveModeOptions): Promise<void>;
|
|
645
|
+
dispose(): Promise<void>;
|
|
646
|
+
}
|
|
647
|
+
declare function createPiHarnessRuntime(options: CreatePiHarnessRuntimeOptions): Promise<PiHarnessRuntime>;
|
|
648
|
+
|
|
649
|
+
interface HarnessPrerequisiteContext {
|
|
650
|
+
cwd: string;
|
|
651
|
+
paths: QlooPaths;
|
|
652
|
+
}
|
|
653
|
+
interface HarnessPrerequisite {
|
|
654
|
+
name: string;
|
|
655
|
+
check(context: HarnessPrerequisiteContext): Promise<void>;
|
|
656
|
+
}
|
|
657
|
+
interface HarnessRuntimeFactory {
|
|
658
|
+
create(options: CreatePiHarnessRuntimeOptions): Promise<HarnessRuntime>;
|
|
659
|
+
}
|
|
660
|
+
interface LaunchInteractiveHarnessOptions {
|
|
661
|
+
cwd?: string;
|
|
662
|
+
paths?: QlooPaths;
|
|
663
|
+
pathOptions?: Omit<ResolveQlooPathsOptions, "cwd">;
|
|
664
|
+
resources?: HarnessResources;
|
|
665
|
+
resourceOptions?: LoadHarnessResourcesOptions;
|
|
666
|
+
customTools?: readonly ToolDefinition[];
|
|
667
|
+
profile?: QlooHarnessProfile;
|
|
668
|
+
prerequisites?: readonly HarnessPrerequisite[];
|
|
669
|
+
interactiveOptions?: InteractiveModeOptions;
|
|
670
|
+
runtimeFactory?: HarnessRuntimeFactory;
|
|
671
|
+
ensureState?: (paths: QlooPaths) => Promise<void>;
|
|
672
|
+
interactiveCommandActions?: Pick<QlooInteractiveCommandActions, "doctor">;
|
|
673
|
+
}
|
|
674
|
+
declare function launchInteractiveHarness(options?: LaunchInteractiveHarnessOptions): Promise<void>;
|
|
675
|
+
|
|
676
|
+
declare const HARNESS_VERSION = "0.1.18";
|
|
677
|
+
declare const HARNESS_HELP = "Qloo terminal harness\n\nUsage:\n qloo Start guided Qloo chat\n qloo chat Start guided Qloo chat explicitly\n qloo explore Ask grounded Qloo questions (read-only workspace)\n qloo integrate Inspect and design a Qloo integration\n qloo plan Open interactive read-only planning\n qloo plan \"<goal>\" --json\n Create a typed, evidence-backed plan\n qloo build Open approval-gated build mode\n qloo build --plan <plan-id>\n Build from a validated integration plan\n qloo chat --mode <explore|integrate|plan|build>\n qloo --help Show this help\n qloo --version Show the harness version\n\nThe deterministic API CLI and additional harness commands are attached by the\ntop-level qloo command router.";
|
|
678
|
+
interface HarnessCliDependencies {
|
|
679
|
+
launch: (profile: QlooHarnessProfile) => Promise<void>;
|
|
680
|
+
isInteractiveTerminal: () => boolean;
|
|
681
|
+
writeOut: (text: string) => void;
|
|
682
|
+
writeError: (text: string) => void;
|
|
683
|
+
}
|
|
684
|
+
declare function runHarnessCli(args?: readonly string[], dependencies?: HarnessCliDependencies): Promise<number>;
|
|
685
|
+
|
|
686
|
+
declare const QLOO_INTEGRATION_PLAN_SCHEMA_VERSION: "1.0";
|
|
687
|
+
declare const QLOO_INTEGRATION_PLAN_MAX_BYTES: number;
|
|
688
|
+
declare const QLOO_INTEGRATION_PLAN_MAX_GOAL_BYTES: number;
|
|
689
|
+
declare const QLOO_INTEGRATION_PLAN_MAX_EVIDENCE_BYTES: number;
|
|
690
|
+
declare const QLOO_INTEGRATION_PLAN_ID_PATTERN: RegExp;
|
|
691
|
+
declare const QLOO_INTEGRATION_PLAN_DRAFT_SCHEMA: Type.TObject<{
|
|
692
|
+
status: Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"needs_input">]>;
|
|
693
|
+
summary: Type.TString;
|
|
694
|
+
operation: Type.TUnion<[Type.TLiteral<"recommend">, Type.TLiteral<"rank">, Type.TLiteral<"describe">, Type.TLiteral<"where_popular">, Type.TLiteral<"compare_audiences">, Type.TLiteral<"entity_tags">, Type.TLiteral<"audience_demographics">, Type.TLiteral<"trends">, Type.TLiteral<"find_tags">]>;
|
|
695
|
+
transport: Type.TUnion<[Type.TLiteral<"direct">, Type.TLiteral<"mcp">]>;
|
|
696
|
+
field_mapping: Type.TArray<Type.TObject<{
|
|
697
|
+
local_field: Type.TString;
|
|
698
|
+
qloo_role: Type.TUnion<[Type.TLiteral<"signal">, Type.TLiteral<"filter">, Type.TLiteral<"output">]>;
|
|
699
|
+
qloo_field: Type.TString;
|
|
700
|
+
normalized_result_field: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
701
|
+
owning_boundary: Type.TString;
|
|
702
|
+
transformation: Type.TString;
|
|
703
|
+
}>>;
|
|
704
|
+
boundaries: Type.TObject<{
|
|
705
|
+
http_client: Type.TString;
|
|
706
|
+
configuration: Type.TString;
|
|
707
|
+
data_model: Type.TString;
|
|
708
|
+
error_boundary: Type.TString;
|
|
709
|
+
}>;
|
|
710
|
+
error_handling: Type.TArray<Type.TObject<{
|
|
711
|
+
condition: Type.TString;
|
|
712
|
+
behavior: Type.TString;
|
|
713
|
+
}>>;
|
|
714
|
+
privacy_constraints: Type.TArray<Type.TString>;
|
|
715
|
+
changes: Type.TArray<Type.TObject<{
|
|
716
|
+
path: Type.TString;
|
|
717
|
+
action: Type.TUnion<[Type.TLiteral<"create">, Type.TLiteral<"modify">]>;
|
|
718
|
+
purpose: Type.TString;
|
|
719
|
+
verification: Type.TString;
|
|
720
|
+
}>>;
|
|
721
|
+
verification: Type.TArray<Type.TObject<{
|
|
722
|
+
command: Type.TString;
|
|
723
|
+
purpose: Type.TString;
|
|
724
|
+
}>>;
|
|
725
|
+
rollout: Type.TArray<Type.TString>;
|
|
726
|
+
rollback: Type.TArray<Type.TString>;
|
|
727
|
+
assumptions: Type.TArray<Type.TString>;
|
|
728
|
+
unresolved_decisions: Type.TArray<Type.TString>;
|
|
729
|
+
evidence: Type.TArray<Type.TObject<{
|
|
730
|
+
path: Type.TString;
|
|
731
|
+
relevance: Type.TString;
|
|
732
|
+
}>>;
|
|
733
|
+
}>;
|
|
734
|
+
declare const QLOO_INTEGRATION_PLAN_SCHEMA: Type.TObject<{
|
|
735
|
+
schema_version: Type.TLiteral<"1.0">;
|
|
736
|
+
plan_id: Type.TString;
|
|
737
|
+
generated_at: Type.TString;
|
|
738
|
+
goal: Type.TString;
|
|
739
|
+
status: Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"needs_input">]>;
|
|
740
|
+
summary: Type.TString;
|
|
741
|
+
project: Type.TObject<{
|
|
742
|
+
name: Type.TString;
|
|
743
|
+
fingerprint: Type.TString;
|
|
744
|
+
context_schema_version: Type.TLiteral<"1.1">;
|
|
745
|
+
languages: Type.TArray<Type.TString>;
|
|
746
|
+
package_managers: Type.TArray<Type.TString>;
|
|
747
|
+
frameworks: Type.TArray<Type.TString>;
|
|
748
|
+
source_roots: Type.TArray<Type.TString>;
|
|
749
|
+
http_clients: Type.TArray<Type.TString>;
|
|
750
|
+
data_modeling: Type.TArray<Type.TString>;
|
|
751
|
+
configuration: Type.TArray<Type.TString>;
|
|
752
|
+
test_frameworks: Type.TArray<Type.TString>;
|
|
753
|
+
verification_scripts: Type.TArray<Type.TString>;
|
|
754
|
+
}>;
|
|
755
|
+
qloo: Type.TObject<{
|
|
756
|
+
operation: Type.TUnion<[Type.TLiteral<"recommend">, Type.TLiteral<"rank">, Type.TLiteral<"describe">, Type.TLiteral<"where_popular">, Type.TLiteral<"compare_audiences">, Type.TLiteral<"entity_tags">, Type.TLiteral<"audience_demographics">, Type.TLiteral<"trends">, Type.TLiteral<"find_tags">]>;
|
|
757
|
+
tool_name: Type.TString;
|
|
758
|
+
transport: Type.TUnion<[Type.TLiteral<"direct">, Type.TLiteral<"mcp">]>;
|
|
759
|
+
manifest_schema_version: Type.TString;
|
|
760
|
+
contract_version: Type.TString;
|
|
761
|
+
contract_checksum: Type.TString;
|
|
762
|
+
result_schema_version: Type.TString;
|
|
763
|
+
}>;
|
|
764
|
+
field_mapping: Type.TArray<Type.TObject<{
|
|
765
|
+
local_field: Type.TString;
|
|
766
|
+
qloo_role: Type.TUnion<[Type.TLiteral<"signal">, Type.TLiteral<"filter">, Type.TLiteral<"output">]>;
|
|
767
|
+
qloo_field: Type.TString;
|
|
768
|
+
normalized_result_field: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
769
|
+
owning_boundary: Type.TString;
|
|
770
|
+
transformation: Type.TString;
|
|
771
|
+
}>>;
|
|
772
|
+
boundaries: Type.TObject<{
|
|
773
|
+
http_client: Type.TString;
|
|
774
|
+
configuration: Type.TString;
|
|
775
|
+
data_model: Type.TString;
|
|
776
|
+
error_boundary: Type.TString;
|
|
777
|
+
}>;
|
|
778
|
+
error_handling: Type.TArray<Type.TObject<{
|
|
779
|
+
condition: Type.TString;
|
|
780
|
+
behavior: Type.TString;
|
|
781
|
+
}>>;
|
|
782
|
+
privacy_constraints: Type.TArray<Type.TString>;
|
|
783
|
+
changes: Type.TArray<Type.TObject<{
|
|
784
|
+
path: Type.TString;
|
|
785
|
+
action: Type.TUnion<[Type.TLiteral<"create">, Type.TLiteral<"modify">]>;
|
|
786
|
+
purpose: Type.TString;
|
|
787
|
+
verification: Type.TString;
|
|
788
|
+
}>>;
|
|
789
|
+
verification: Type.TArray<Type.TObject<{
|
|
790
|
+
command: Type.TString;
|
|
791
|
+
purpose: Type.TString;
|
|
792
|
+
}>>;
|
|
793
|
+
rollout: Type.TArray<Type.TString>;
|
|
794
|
+
rollback: Type.TArray<Type.TString>;
|
|
795
|
+
assumptions: Type.TArray<Type.TString>;
|
|
796
|
+
unresolved_decisions: Type.TArray<Type.TString>;
|
|
797
|
+
evidence: Type.TArray<Type.TObject<{
|
|
798
|
+
path: Type.TString;
|
|
799
|
+
relevance: Type.TString;
|
|
800
|
+
sha256: Type.TString;
|
|
801
|
+
}>>;
|
|
802
|
+
}>;
|
|
803
|
+
type QlooIntegrationPlanDraft = Static<typeof QLOO_INTEGRATION_PLAN_DRAFT_SCHEMA>;
|
|
804
|
+
type QlooIntegrationPlan = Static<typeof QLOO_INTEGRATION_PLAN_SCHEMA>;
|
|
805
|
+
type QlooIntegrationPlanErrorCode = "PLAN_INVALID" | "PLAN_NOT_FOUND" | "PLAN_NOT_READY" | "PLAN_STALE";
|
|
806
|
+
declare class QlooIntegrationPlanError extends Error {
|
|
807
|
+
readonly code: QlooIntegrationPlanErrorCode;
|
|
808
|
+
constructor(code: QlooIntegrationPlanErrorCode, message: string);
|
|
809
|
+
}
|
|
810
|
+
interface CreateIntegrationPlanArtifactOptions {
|
|
811
|
+
readonly cwd: string;
|
|
812
|
+
readonly paths: QlooPaths;
|
|
813
|
+
readonly goal: string;
|
|
814
|
+
readonly draft: unknown;
|
|
815
|
+
readonly now?: () => Date;
|
|
816
|
+
}
|
|
817
|
+
declare function createIntegrationPlanArtifact(options: CreateIntegrationPlanArtifactOptions): Promise<QlooIntegrationPlan>;
|
|
818
|
+
declare function saveIntegrationPlanArtifact(plan: QlooIntegrationPlan, paths: QlooPaths): Promise<string>;
|
|
819
|
+
interface LoadIntegrationPlanArtifactOptions {
|
|
820
|
+
readonly cwd: string;
|
|
821
|
+
readonly paths: QlooPaths;
|
|
822
|
+
readonly planId: string;
|
|
823
|
+
readonly requireReady?: boolean;
|
|
824
|
+
}
|
|
825
|
+
declare function loadIntegrationPlanArtifact(options: LoadIntegrationPlanArtifactOptions): Promise<QlooIntegrationPlan>;
|
|
826
|
+
interface IntegrationPlanSubmission {
|
|
827
|
+
readonly tool: ToolDefinition;
|
|
828
|
+
getArtifact(): QlooIntegrationPlan | undefined;
|
|
829
|
+
}
|
|
830
|
+
interface CreateIntegrationPlanSubmissionOptions {
|
|
831
|
+
readonly cwd: string;
|
|
832
|
+
readonly paths: QlooPaths;
|
|
833
|
+
readonly goal: string;
|
|
834
|
+
readonly now?: () => Date;
|
|
835
|
+
}
|
|
836
|
+
declare function createIntegrationPlanSubmissionTool(options: CreateIntegrationPlanSubmissionOptions): IntegrationPlanSubmission;
|
|
837
|
+
|
|
838
|
+
declare const QLOO_BUILD_HELP = "Build from a validated Qloo integration plan\n\nUsage:\n qloo build --plan <plan-id>\n qloo build --help\n\nThe plan must be ready, match the current Qloo contract and project structure,\nand retain the same hashes for every evidence file. Starting build grants only\nthis session's build profile; each model shell, edit, and write still requires\nseparate approval.";
|
|
839
|
+
interface RunQlooBuildOptions {
|
|
840
|
+
readonly cwd?: string;
|
|
841
|
+
readonly paths?: QlooPaths;
|
|
842
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
843
|
+
readonly isInteractiveTerminal?: () => boolean;
|
|
844
|
+
readonly writeOut?: (text: string) => void;
|
|
845
|
+
readonly writeError?: (text: string) => void;
|
|
846
|
+
readonly loadArtifact?: (options: Parameters<typeof loadIntegrationPlanArtifact>[0]) => Promise<QlooIntegrationPlan>;
|
|
847
|
+
readonly launch: (artifact: QlooIntegrationPlan, initialMessage: string) => Promise<void>;
|
|
848
|
+
}
|
|
849
|
+
declare function createBuildHandoffPrompt(plan: QlooIntegrationPlan): string;
|
|
850
|
+
declare function runQlooBuild(argv: readonly string[], options: RunQlooBuildOptions): Promise<number>;
|
|
851
|
+
|
|
852
|
+
declare const QLOO_PLAN_HELP = "Create an evidence-backed Qloo integration plan without modifying the project\n\nUsage:\n qloo plan \"<integration goal>\"\n qloo plan \"<integration goal>\" --json\n qloo plan --help\n\nThe model may inspect bounded project context, relevant source files, and the\nlocal Qloo workflow contract. It cannot use shell, edit, or write tools. A\nversioned plan is stored privately and can be handed to build with:\n\n qloo build --plan <plan-id>";
|
|
853
|
+
interface QlooPromptRuntime {
|
|
854
|
+
runPrompt(prompt: string): Promise<string | undefined>;
|
|
855
|
+
dispose(): Promise<void>;
|
|
856
|
+
}
|
|
857
|
+
interface RunQlooPlanOptions {
|
|
858
|
+
readonly cwd?: string;
|
|
859
|
+
readonly paths?: QlooPaths;
|
|
860
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
861
|
+
readonly resources?: HarnessResources;
|
|
862
|
+
readonly modelRuntime?: ModelRuntime;
|
|
863
|
+
readonly writeOut?: (text: string) => void;
|
|
864
|
+
readonly writeError?: (text: string) => void;
|
|
865
|
+
readonly now?: () => Date;
|
|
866
|
+
readonly createRuntime?: (options: CreatePiHarnessRuntimeOptions) => Promise<QlooPromptRuntime>;
|
|
867
|
+
readonly createQlooTools?: (env: NodeJS.ProcessEnv) => readonly ToolDefinition[];
|
|
868
|
+
readonly saveArtifact?: (artifact: QlooIntegrationPlan, paths: QlooPaths) => Promise<string>;
|
|
869
|
+
}
|
|
870
|
+
declare function createIntegrationPlanPrompt(goal: string): string;
|
|
871
|
+
declare function runQlooPlan(argv: readonly string[], options?: RunQlooPlanOptions): Promise<number>;
|
|
872
|
+
|
|
873
|
+
type DoctorStatus = "ok" | "warning";
|
|
874
|
+
interface DoctorCheck {
|
|
875
|
+
readonly id: string;
|
|
876
|
+
readonly status: DoctorStatus;
|
|
877
|
+
readonly message: string;
|
|
878
|
+
readonly category?: QlooConnectivityKind | TasteResolverHealthKind;
|
|
879
|
+
readonly durationMs?: number;
|
|
880
|
+
readonly retryable?: boolean;
|
|
881
|
+
readonly statusCode?: number;
|
|
882
|
+
readonly requestId?: string;
|
|
883
|
+
}
|
|
884
|
+
interface DoctorReport {
|
|
885
|
+
readonly schemaVersion: "1.0";
|
|
886
|
+
readonly status: DoctorStatus;
|
|
887
|
+
readonly versions: {
|
|
888
|
+
readonly harness: string;
|
|
889
|
+
readonly node: string;
|
|
890
|
+
readonly pi: string;
|
|
891
|
+
};
|
|
892
|
+
readonly paths: {
|
|
893
|
+
readonly qlooHome: string;
|
|
894
|
+
readonly agentDirectory: string;
|
|
895
|
+
};
|
|
896
|
+
readonly checks: readonly DoctorCheck[];
|
|
897
|
+
}
|
|
898
|
+
interface RunDoctorOptions {
|
|
899
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
900
|
+
readonly paths?: QlooPaths;
|
|
901
|
+
readonly harnessVersion: string;
|
|
902
|
+
readonly piVersion: string;
|
|
903
|
+
readonly fileExists?: (path: string) => Promise<boolean>;
|
|
904
|
+
readonly directoryMode?: (path: string) => Promise<number | undefined>;
|
|
905
|
+
readonly fileMode?: (path: string) => Promise<number | undefined>;
|
|
906
|
+
readonly readConfigFile?: (path: string) => string;
|
|
907
|
+
readonly readAuthFile?: (path: string) => string;
|
|
908
|
+
/** Run one bounded, side-effect-free request against the configured Qloo endpoint. */
|
|
909
|
+
readonly network?: boolean;
|
|
910
|
+
readonly networkTimeoutMs?: number;
|
|
911
|
+
readonly networkProbe?: (options: ProbeQlooConnectivityOptions) => Promise<QlooConnectivityProbeResult>;
|
|
912
|
+
readonly resolverNetworkProbe?: (options: TasteResolverHealthProbeOptions) => Promise<TasteResolverHealthProbeResult>;
|
|
913
|
+
}
|
|
914
|
+
type PiAuthFileInspection = {
|
|
915
|
+
readonly status: "usable";
|
|
916
|
+
readonly credentialCount: number;
|
|
917
|
+
} | {
|
|
918
|
+
readonly status: "empty" | "invalid";
|
|
919
|
+
};
|
|
920
|
+
/** Validate the credential shapes consumed by pinned Pi 0.84.2 without returning secrets. */
|
|
921
|
+
declare function inspectPiAuthFile(content: string): PiAuthFileInspection;
|
|
922
|
+
declare function runDoctor(options: RunDoctorOptions): Promise<DoctorReport>;
|
|
923
|
+
declare function formatDoctorReport(report: DoctorReport): string;
|
|
924
|
+
|
|
925
|
+
interface QlooPresentationTheme {
|
|
926
|
+
fg(color: "accent" | "dim" | "error" | "muted" | "success" | "warning", text: string): string;
|
|
927
|
+
bold(text: string): string;
|
|
928
|
+
}
|
|
929
|
+
interface QlooTextComponent {
|
|
930
|
+
render(width: number): string[];
|
|
931
|
+
invalidate(): void;
|
|
932
|
+
}
|
|
933
|
+
interface QlooResolutionChoice {
|
|
934
|
+
readonly input: string;
|
|
935
|
+
readonly selectedId: string;
|
|
936
|
+
}
|
|
937
|
+
declare function formatQlooResolutionCandidateLabels(candidates: readonly Readonly<Record<string, unknown>>[]): string[];
|
|
938
|
+
declare function renderQlooCallLines(toolName: string, input: Readonly<Record<string, unknown>>, width: number): string[];
|
|
939
|
+
declare function renderQlooResultLines(detailsValue: unknown, options?: {
|
|
940
|
+
readonly expanded?: boolean;
|
|
941
|
+
readonly width?: number;
|
|
942
|
+
}): string[];
|
|
943
|
+
declare function createQlooCallComponent(toolName: string, input: Readonly<Record<string, unknown>>, theme: QlooPresentationTheme): QlooTextComponent;
|
|
944
|
+
declare function createQlooResultComponent(details: unknown, expanded: boolean, theme: QlooPresentationTheme): QlooTextComponent;
|
|
945
|
+
declare function paginateQlooResult(detailsValue: Readonly<Record<string, unknown>>, requestedPage: number, pageSize?: number): Record<string, unknown>;
|
|
946
|
+
declare function parseQlooRawPage(argument: string, currentPage: number): number | undefined;
|
|
947
|
+
declare function resolutionCandidates(detailsValue: unknown): readonly {
|
|
948
|
+
readonly input: string;
|
|
949
|
+
readonly candidates: readonly Record<string, unknown>[];
|
|
950
|
+
}[];
|
|
951
|
+
declare function applyResolutionChoices(toolName: string, input: Readonly<Record<string, unknown>>, choices: readonly QlooResolutionChoice[]): Record<string, unknown> | undefined;
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* Qloo CLI - Command line interface for Qloo's Insights API
|
|
955
|
+
*/
|
|
956
|
+
|
|
957
|
+
interface ApiCliRunOptions {
|
|
958
|
+
/** Write command data and Commander help output. Defaults to process.stdout. */
|
|
959
|
+
readonly writeOut?: (value: string) => void;
|
|
960
|
+
/** Write diagnostics and Commander usage errors. Defaults to process.stderr. */
|
|
961
|
+
readonly writeErr?: (value: string) => void;
|
|
962
|
+
/** Environment used for API key and resolver lookup. Defaults to process.env. */
|
|
963
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
964
|
+
/** Input stream passed to the MCP stdio command. Defaults to process.stdin. */
|
|
965
|
+
readonly stdin?: NodeJS.ReadableStream;
|
|
966
|
+
/** Controls table-vs-JSON defaults. Defaults to process.stdout.isTTY. */
|
|
967
|
+
readonly stdoutIsTTY?: boolean;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
declare const PI_VERSION = "0.84.2";
|
|
971
|
+
declare const QLOO_HELP = "Qloo terminal agent\n\nUsage:\n qloo Start guided Qloo chat (TTY only)\n qloo chat Start guided Qloo chat explicitly\n qloo explore Grounded Qloo discovery (read-only workspace)\n qloo integrate Inspect and design a Qloo integration\n qloo plan Open interactive read-only planning\n qloo plan \"<goal>\" --json Create a typed, evidence-backed plan\n qloo build Open interactive approval-gated build\n qloo build --plan <plan-id> Build from a validated plan\n qloo exec <workflow> [...] Execute one shared workflow as JSON/JSONL\n qloo setup [options] Configure Qloo data and a model provider\n qloo doctor [--network] Inspect local Qloo and model readiness\n qloo doctor --network --json Emit active diagnostics as JSON\n qloo update [options] Update Qloo and/or its extension packages\n qloo mcp Start the canonical nine-workflow MCP server\n qloo api <command> [...] Run a deterministic Qloo API command\n qloo <legacy-command> [...] Run a legacy API command unchanged\n qloo --help Show this help\n qloo --version Show the harness version\n\nExamples:\n qloo\n qloo setup\n qloo setup --status --json\n qloo doctor\n qloo update\n qloo update --extensions\n qloo plan \"Add taste-based recommendations\" --json\n qloo build --plan qplan_<id>\n qloo exec find_tags --input '{\"query\":\"sneakers\",\"limit\":1}'\n qloo api search --query \"Beyonce\" --json\n qloo insights --type movie --signal-entities <entity-id>\n\nThe authoritative API documentation is https://docs.qloo.com.";
|
|
972
|
+
interface QlooRouterDependencies {
|
|
973
|
+
readonly launchChat: (profile: QlooHarnessProfile, options?: {
|
|
974
|
+
readonly initialMessage?: string;
|
|
975
|
+
}) => Promise<void>;
|
|
976
|
+
readonly runApi: (argv: readonly string[], options: ApiCliRunOptions) => Promise<number>;
|
|
977
|
+
readonly legacyVerbs: ReadonlySet<string>;
|
|
978
|
+
/** Legacy CLI global option name to whether it consumes the following argument. */
|
|
979
|
+
readonly legacyGlobalOptions: ReadonlyMap<string, boolean>;
|
|
980
|
+
readonly doctor: (network: boolean) => Promise<DoctorReport>;
|
|
981
|
+
readonly runExec: (argv: readonly string[]) => Promise<number>;
|
|
982
|
+
readonly runPlan: (argv: readonly string[]) => Promise<number>;
|
|
983
|
+
readonly runBuild: (argv: readonly string[]) => Promise<number>;
|
|
984
|
+
readonly runMcp: (argv: readonly string[]) => Promise<number> | number;
|
|
985
|
+
readonly runSetup: (argv: readonly string[]) => Promise<number>;
|
|
986
|
+
readonly runUpdate: (argv: readonly string[], options: {
|
|
987
|
+
readonly env: Readonly<NodeJS.ProcessEnv>;
|
|
988
|
+
readonly writeOut: (text: string) => void;
|
|
989
|
+
readonly writeError: (text: string) => void;
|
|
990
|
+
}) => Promise<number>;
|
|
991
|
+
readonly isInteractiveTerminal: () => boolean;
|
|
992
|
+
readonly isOutputTerminal: () => boolean;
|
|
993
|
+
readonly writeOut: (text: string) => void;
|
|
994
|
+
readonly writeError: (text: string) => void;
|
|
995
|
+
readonly env: NodeJS.ProcessEnv;
|
|
996
|
+
readonly stdin: NodeJS.ReadableStream;
|
|
997
|
+
}
|
|
998
|
+
declare function runQloo(argv?: readonly string[], dependencies?: QlooRouterDependencies): Promise<number>;
|
|
999
|
+
|
|
1000
|
+
declare const QLOO_EXEC_EVENT_SCHEMA_VERSION: "1.0";
|
|
1001
|
+
declare const QLOO_EXEC_MAX_INPUT_BYTES = 1048576;
|
|
1002
|
+
declare const QLOO_EXEC_HELP: string;
|
|
1003
|
+
type QlooExecEventName = "started" | "completed" | "failed";
|
|
1004
|
+
interface QlooExecEventBase {
|
|
1005
|
+
readonly schema_version: typeof QLOO_EXEC_EVENT_SCHEMA_VERSION;
|
|
1006
|
+
readonly event: QlooExecEventName;
|
|
1007
|
+
readonly sequence: number;
|
|
1008
|
+
readonly operation: QlooWorkflowOperationId;
|
|
1009
|
+
readonly correlation_id: string;
|
|
1010
|
+
}
|
|
1011
|
+
interface QlooExecStartedEvent extends QlooExecEventBase {
|
|
1012
|
+
readonly event: "started";
|
|
1013
|
+
readonly sequence: 1;
|
|
1014
|
+
readonly transport: "direct";
|
|
1015
|
+
}
|
|
1016
|
+
interface QlooExecCompletedEvent extends QlooExecEventBase {
|
|
1017
|
+
readonly event: "completed";
|
|
1018
|
+
readonly sequence: 2;
|
|
1019
|
+
readonly duration_ms: number;
|
|
1020
|
+
readonly result: Record<string, unknown>;
|
|
1021
|
+
}
|
|
1022
|
+
interface QlooExecFailedEvent extends QlooExecEventBase {
|
|
1023
|
+
readonly event: "failed";
|
|
1024
|
+
readonly sequence: 1 | 2;
|
|
1025
|
+
readonly error: {
|
|
1026
|
+
readonly code: string;
|
|
1027
|
+
readonly layer: string;
|
|
1028
|
+
readonly retryable: boolean;
|
|
1029
|
+
readonly recovery: string;
|
|
1030
|
+
};
|
|
1031
|
+
}
|
|
1032
|
+
type QlooExecEvent = QlooExecStartedEvent | QlooExecCompletedEvent | QlooExecFailedEvent;
|
|
1033
|
+
interface RunQlooExecOptions {
|
|
1034
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
1035
|
+
readonly stdin?: NodeJS.ReadableStream;
|
|
1036
|
+
readonly stdinIsTTY?: boolean;
|
|
1037
|
+
readonly signal?: AbortSignal;
|
|
1038
|
+
readonly writeOut?: (text: string) => void;
|
|
1039
|
+
readonly writeError?: (text: string) => void;
|
|
1040
|
+
readonly createExecutor?: () => QlooWorkflowExecutor | undefined;
|
|
1041
|
+
readonly createCorrelationId?: () => string;
|
|
1042
|
+
readonly readInputFile?: (path: string, maximumBytes: number) => Promise<string>;
|
|
1043
|
+
readonly maximumInputBytes?: number;
|
|
1044
|
+
}
|
|
1045
|
+
/** Execute one shared Qloo workflow without loading a model or interactive UI. */
|
|
1046
|
+
declare function runQlooExec(argv: readonly string[], options?: RunQlooExecOptions): Promise<number>;
|
|
1047
|
+
|
|
1048
|
+
declare const QLOO_PROJECT_CONTEXT_SCHEMA_VERSION: "1.1";
|
|
1049
|
+
interface QlooProjectContext {
|
|
1050
|
+
readonly schema_version: typeof QLOO_PROJECT_CONTEXT_SCHEMA_VERSION;
|
|
1051
|
+
readonly project_name: string;
|
|
1052
|
+
readonly project_root: string;
|
|
1053
|
+
readonly fingerprint: string;
|
|
1054
|
+
readonly generated_at: string;
|
|
1055
|
+
readonly languages: readonly string[];
|
|
1056
|
+
readonly package_managers: readonly string[];
|
|
1057
|
+
readonly frameworks: readonly string[];
|
|
1058
|
+
readonly infrastructure: readonly string[];
|
|
1059
|
+
readonly source_roots: readonly string[];
|
|
1060
|
+
readonly http_clients: readonly string[];
|
|
1061
|
+
readonly data_modeling: readonly string[];
|
|
1062
|
+
readonly configuration: readonly string[];
|
|
1063
|
+
readonly test_frameworks: readonly string[];
|
|
1064
|
+
readonly verification_scripts: readonly string[];
|
|
1065
|
+
readonly qloo_dependencies: readonly string[];
|
|
1066
|
+
readonly detected_files: readonly string[];
|
|
1067
|
+
}
|
|
1068
|
+
interface ProjectContextResult {
|
|
1069
|
+
readonly cache: "hit" | "refreshed";
|
|
1070
|
+
readonly context: QlooProjectContext;
|
|
1071
|
+
}
|
|
1072
|
+
interface InspectProjectContextOptions {
|
|
1073
|
+
readonly cwd: string;
|
|
1074
|
+
readonly paths: QlooPaths;
|
|
1075
|
+
readonly refresh?: boolean;
|
|
1076
|
+
readonly now?: () => Date;
|
|
1077
|
+
}
|
|
1078
|
+
declare function inspectProjectContext(options: InspectProjectContextOptions): Promise<ProjectContextResult>;
|
|
1079
|
+
interface CreateProjectContextToolOptions {
|
|
1080
|
+
readonly cwd: string;
|
|
1081
|
+
readonly paths: QlooPaths;
|
|
1082
|
+
}
|
|
1083
|
+
declare function createProjectContextTool(options: CreateProjectContextToolOptions): ToolDefinition;
|
|
1084
|
+
|
|
1085
|
+
declare const PINNED_PI_VERSION = "0.84.2";
|
|
1086
|
+
declare const BLOCKED_PI_INTERACTIVE_COMMANDS: ReadonlySet<string>;
|
|
1087
|
+
declare const PI_SHARE_BLOCK_MESSAGE = "External session sharing is disabled in the Qloo harness.";
|
|
1088
|
+
declare const PI_TRUST_BLOCK_MESSAGE = "Project trust changes are disabled in Qloo's explore profile.";
|
|
1089
|
+
declare class PiCommandPolicyCompatibilityError extends Error {
|
|
1090
|
+
constructor(method: string);
|
|
1091
|
+
}
|
|
1092
|
+
/** Return true when an autocomplete value represents a blocked built-in command. */
|
|
1093
|
+
declare function isBlockedPiInteractiveCommand(value: string): boolean;
|
|
1094
|
+
/**
|
|
1095
|
+
* Fail-closed compatibility adapter for Pi 0.84.2.
|
|
1096
|
+
*
|
|
1097
|
+
* Pi dispatches its built-in `/share` and `/trust` commands inside
|
|
1098
|
+
* InteractiveMode before extension `input` hooks run. It also unconditionally
|
|
1099
|
+
* probes for managed fd and ripgrep binaries during TUI initialization, with
|
|
1100
|
+
* no public option to disable that setup when their consumers are absent.
|
|
1101
|
+
* Qloo replaces those pinned instance seams before `run()`: unsafe commands
|
|
1102
|
+
* are blocked, and only the exact offline absence notices are omitted. Pi
|
|
1103
|
+
* still performs its local PATH probes, while PI_OFFLINE prevents downloads.
|
|
1104
|
+
* Startup fails if a future Pi version changes a seam instead of silently
|
|
1105
|
+
* weakening policy or filtering unrelated diagnostics.
|
|
1106
|
+
*/
|
|
1107
|
+
declare function applyPiInteractiveCommandPolicy(mode: InteractiveMode): void;
|
|
1108
|
+
|
|
1109
|
+
type QlooGuidedGoalId = "ask" | "audience" | "integrate" | "diagnose" | "blank";
|
|
1110
|
+
interface QlooGuidedStarter {
|
|
1111
|
+
readonly label: string;
|
|
1112
|
+
readonly prompt: string;
|
|
1113
|
+
}
|
|
1114
|
+
interface QlooGuidedGoal {
|
|
1115
|
+
readonly id: QlooGuidedGoalId;
|
|
1116
|
+
readonly label: string;
|
|
1117
|
+
readonly description: string;
|
|
1118
|
+
readonly profile?: QlooHarnessProfile;
|
|
1119
|
+
readonly starters: readonly QlooGuidedStarter[];
|
|
1120
|
+
}
|
|
1121
|
+
declare const QLOO_GUIDED_GOALS: readonly QlooGuidedGoal[];
|
|
1122
|
+
interface QlooNextAction {
|
|
1123
|
+
readonly id: string;
|
|
1124
|
+
readonly label: string;
|
|
1125
|
+
readonly kind: "command" | "prompt";
|
|
1126
|
+
readonly value: string;
|
|
1127
|
+
readonly profile?: QlooHarnessProfile;
|
|
1128
|
+
}
|
|
1129
|
+
declare function qlooNextActions(workflow: Readonly<Record<string, unknown>>): QlooNextAction[];
|
|
1130
|
+
declare function findGuidedGoal(label: string): QlooGuidedGoal | undefined;
|
|
1131
|
+
declare function guidedGoalLabel(goal: QlooGuidedGoal): string;
|
|
1132
|
+
|
|
1133
|
+
declare const QLOO_SETUP_SCHEMA_VERSION: "1.0";
|
|
1134
|
+
declare const QLOO_NO_GUIDED_START_ENVIRONMENT_VARIABLE = "QLOO_NO_GUIDED_START";
|
|
1135
|
+
declare const QLOO_SETUP_HELP = "Configure Qloo chat\n\nUsage:\n qloo setup Configure missing Qloo and model authentication\n qloo setup --qloo Configure or replace the Qloo API credential\n qloo setup --model Sign in to a model provider\n qloo setup --status Show readiness without changing configuration\n qloo setup --status --json Emit machine-readable readiness\n\nInteractive secret values are hidden and are never printed in the setup report.";
|
|
1136
|
+
interface QlooSetupChoice {
|
|
1137
|
+
readonly id: string;
|
|
1138
|
+
readonly label: string;
|
|
1139
|
+
readonly description?: string;
|
|
1140
|
+
}
|
|
1141
|
+
interface QlooSetupIO {
|
|
1142
|
+
readonly interactive: boolean;
|
|
1143
|
+
select(title: string, choices: readonly QlooSetupChoice[]): Promise<string | undefined>;
|
|
1144
|
+
text(message: string, placeholder?: string): Promise<string | undefined>;
|
|
1145
|
+
secret(message: string): Promise<string | undefined>;
|
|
1146
|
+
write(message: string): void;
|
|
1147
|
+
}
|
|
1148
|
+
interface QlooSetupProvider {
|
|
1149
|
+
readonly id: string;
|
|
1150
|
+
readonly name: string;
|
|
1151
|
+
readonly auth: {
|
|
1152
|
+
readonly apiKey?: {
|
|
1153
|
+
readonly name?: string;
|
|
1154
|
+
readonly login?: unknown;
|
|
1155
|
+
};
|
|
1156
|
+
readonly oauth?: {
|
|
1157
|
+
readonly name?: string;
|
|
1158
|
+
readonly login?: unknown;
|
|
1159
|
+
};
|
|
1160
|
+
};
|
|
1161
|
+
}
|
|
1162
|
+
interface QlooSetupModelRuntime {
|
|
1163
|
+
getAvailable(providerId?: string): Promise<readonly unknown[]>;
|
|
1164
|
+
getProviders(): readonly QlooSetupProvider[];
|
|
1165
|
+
login(providerId: string, type: "api_key" | "oauth", interaction: {
|
|
1166
|
+
readonly signal?: AbortSignal;
|
|
1167
|
+
prompt(prompt: {
|
|
1168
|
+
readonly type: "text" | "secret" | "select" | "manual_code";
|
|
1169
|
+
readonly message: string;
|
|
1170
|
+
readonly placeholder?: string;
|
|
1171
|
+
readonly options?: readonly {
|
|
1172
|
+
readonly id: string;
|
|
1173
|
+
readonly label: string;
|
|
1174
|
+
readonly description?: string;
|
|
1175
|
+
}[];
|
|
1176
|
+
readonly signal?: AbortSignal;
|
|
1177
|
+
}): Promise<string>;
|
|
1178
|
+
notify(event: Readonly<Record<string, unknown>>): void;
|
|
1179
|
+
}): Promise<unknown>;
|
|
1180
|
+
}
|
|
1181
|
+
interface QlooSetupReport {
|
|
1182
|
+
readonly schemaVersion: typeof QLOO_SETUP_SCHEMA_VERSION;
|
|
1183
|
+
readonly readyForChat: boolean;
|
|
1184
|
+
readonly qloo: {
|
|
1185
|
+
readonly ready: boolean;
|
|
1186
|
+
readonly source: "environment" | "config" | "missing";
|
|
1187
|
+
readonly mode: "live" | "learning";
|
|
1188
|
+
};
|
|
1189
|
+
readonly model: {
|
|
1190
|
+
readonly ready: boolean;
|
|
1191
|
+
readonly availableModels: number;
|
|
1192
|
+
};
|
|
1193
|
+
readonly changes: readonly ("model-auth" | "qloo-auth")[];
|
|
1194
|
+
}
|
|
1195
|
+
interface QlooSetupOptions {
|
|
1196
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
1197
|
+
readonly paths: QlooPaths;
|
|
1198
|
+
readonly io?: QlooSetupIO;
|
|
1199
|
+
readonly configureQloo?: boolean;
|
|
1200
|
+
readonly configureModel?: boolean;
|
|
1201
|
+
readonly allowLearningMode?: boolean;
|
|
1202
|
+
readonly modelRuntime?: QlooSetupModelRuntime;
|
|
1203
|
+
readonly createModelRuntime?: (paths: QlooPaths) => Promise<QlooSetupModelRuntime>;
|
|
1204
|
+
readonly networkProbe?: (options: {
|
|
1205
|
+
readonly apiKey: string;
|
|
1206
|
+
readonly baseUrl: string;
|
|
1207
|
+
readonly allowCustomBaseUrl: boolean;
|
|
1208
|
+
readonly timeoutMs: number;
|
|
1209
|
+
}) => Promise<QlooConnectivityProbeResult>;
|
|
1210
|
+
readonly saveApiKey?: (apiKey: string, configPath: string) => void;
|
|
1211
|
+
}
|
|
1212
|
+
interface RunQlooSetupOptions extends Omit<QlooSetupOptions, "configureQloo" | "configureModel"> {
|
|
1213
|
+
readonly writeOut?: (text: string) => void;
|
|
1214
|
+
readonly writeError?: (text: string) => void;
|
|
1215
|
+
}
|
|
1216
|
+
declare function createTerminalSetupIO(input?: NodeJS.ReadStream, output?: NodeJS.WriteStream): QlooSetupIO;
|
|
1217
|
+
declare function setupQloo(options: QlooSetupOptions): Promise<QlooSetupReport>;
|
|
1218
|
+
declare function formatQlooSetupReport(report: QlooSetupReport): string;
|
|
1219
|
+
declare function runQlooSetup(argv: readonly string[], options: RunQlooSetupOptions): Promise<number>;
|
|
1220
|
+
|
|
1221
|
+
declare const QLOO_HARNESS_PACKAGE_NAME = "@qloo/qloo-harness";
|
|
1222
|
+
declare const QLOO_UPDATE_SPEC_ENVIRONMENT_VARIABLE = "QLOO_UPDATE_SPEC";
|
|
1223
|
+
declare const QLOO_UPDATE_HELP = "Update Qloo\n\nUsage:\n qloo update Update the Qloo harness\n qloo update --self Update the Qloo harness explicitly\n qloo update --extensions Update configured Qloo extension packages\n qloo update --all Update extensions, then the harness\n qloo update --self --extensions Update extensions, then the harness\n qloo update --extension <source> Update one configured extension package\n\nOptions:\n --self Include the Qloo harness\n --extensions Include all configured Qloo extension packages\n --extension Update one configured Qloo extension package\n --all Include extensions and the Qloo harness\n --force Reinstall the harness even at the same or an older version\n --timeout <s> Bound each package-manager install (10-900 seconds; default 120)\n -h, --help Show this help\n\nUpdate overrides:\n QLOO_UPDATE_SPEC may select an approved absolute .tgz path or an exact Qloo\n package tag or version, such as @qloo/qloo-harness@next.";
|
|
1224
|
+
interface ExternalCommandRequest {
|
|
1225
|
+
readonly command: string;
|
|
1226
|
+
readonly args: readonly string[];
|
|
1227
|
+
readonly cwd: string;
|
|
1228
|
+
readonly env: Readonly<NodeJS.ProcessEnv>;
|
|
1229
|
+
readonly streamOutput: boolean;
|
|
1230
|
+
readonly writeOut: (text: string) => void;
|
|
1231
|
+
readonly writeError: (text: string) => void;
|
|
1232
|
+
readonly timeoutMs?: number;
|
|
1233
|
+
readonly heartbeatMs?: number;
|
|
1234
|
+
readonly description?: string;
|
|
1235
|
+
}
|
|
1236
|
+
interface ExternalCommandResult {
|
|
1237
|
+
readonly exitCode: number | null;
|
|
1238
|
+
readonly signal: NodeJS.Signals | null;
|
|
1239
|
+
readonly stdout: string;
|
|
1240
|
+
readonly stderr: string;
|
|
1241
|
+
readonly error?: Error;
|
|
1242
|
+
readonly timedOut?: boolean;
|
|
1243
|
+
readonly durationMs?: number;
|
|
1244
|
+
}
|
|
1245
|
+
type ExternalCommandRunner = (request: ExternalCommandRequest) => Promise<ExternalCommandResult>;
|
|
1246
|
+
interface QlooExtensionPackageManager {
|
|
1247
|
+
listConfiguredPackages(): Array<{
|
|
1248
|
+
readonly source: string;
|
|
1249
|
+
readonly scope: "user" | "project";
|
|
1250
|
+
readonly filtered: boolean;
|
|
1251
|
+
readonly installedPath?: string;
|
|
1252
|
+
}>;
|
|
1253
|
+
setProgressCallback(callback: ProgressCallback | undefined): void;
|
|
1254
|
+
update(source?: string): Promise<void>;
|
|
1255
|
+
}
|
|
1256
|
+
interface RunQlooUpdateOptions {
|
|
1257
|
+
readonly currentVersion?: string;
|
|
1258
|
+
readonly packageRoot?: string;
|
|
1259
|
+
readonly cwd?: string;
|
|
1260
|
+
readonly env?: Readonly<NodeJS.ProcessEnv>;
|
|
1261
|
+
readonly platform?: NodeJS.Platform;
|
|
1262
|
+
readonly npmCommand?: string;
|
|
1263
|
+
readonly pnpmCommand?: string;
|
|
1264
|
+
readonly writeOut?: (text: string) => void;
|
|
1265
|
+
readonly writeError?: (text: string) => void;
|
|
1266
|
+
readonly runCommand?: ExternalCommandRunner;
|
|
1267
|
+
readonly createExtensionPackageManager?: (agentDirectory: string) => QlooExtensionPackageManager;
|
|
1268
|
+
readonly selfUpdate?: (force: boolean, timeoutMs: number) => Promise<void>;
|
|
1269
|
+
readonly extensionUpdate?: (source: string | undefined) => Promise<void>;
|
|
1270
|
+
}
|
|
1271
|
+
declare function inferGlobalInstallPrefix(packageRoot: string, platform?: NodeJS.Platform): string | undefined;
|
|
1272
|
+
declare function runQlooUpdate(args: readonly string[], options?: RunQlooUpdateOptions): Promise<number>;
|
|
1273
|
+
|
|
1274
|
+
declare const QLOO_EXECUTION_LOG_SCHEMA_VERSION: "1.0";
|
|
1275
|
+
interface QlooExecutionLogRecord {
|
|
1276
|
+
readonly schema_version: typeof QLOO_EXECUTION_LOG_SCHEMA_VERSION;
|
|
1277
|
+
readonly timestamp: string;
|
|
1278
|
+
readonly event: "workflow_completed" | "workflow_failed";
|
|
1279
|
+
readonly operation: string;
|
|
1280
|
+
readonly transport: string;
|
|
1281
|
+
readonly correlation_id: string;
|
|
1282
|
+
readonly duration_ms: number;
|
|
1283
|
+
readonly status?: string;
|
|
1284
|
+
readonly result_count?: number;
|
|
1285
|
+
readonly error_code?: string;
|
|
1286
|
+
readonly retryable?: boolean;
|
|
1287
|
+
}
|
|
1288
|
+
interface CreateFileExecutionObserverOptions {
|
|
1289
|
+
readonly logsDirectory: string;
|
|
1290
|
+
readonly now?: () => Date;
|
|
1291
|
+
readonly append?: (path: string, content: string) => Promise<void>;
|
|
1292
|
+
readonly ensureDirectory?: (path: string) => Promise<void>;
|
|
1293
|
+
}
|
|
1294
|
+
/**
|
|
1295
|
+
* Append privacy-minimized workflow telemetry to a daily local JSONL file.
|
|
1296
|
+
* Inputs, result entities, prompts, file paths, commands, and error messages
|
|
1297
|
+
* are deliberately excluded.
|
|
1298
|
+
*/
|
|
1299
|
+
declare function createFileExecutionObserver(options: CreateFileExecutionObserverOptions): QlooWorkflowExecutionObserver;
|
|
1300
|
+
|
|
1301
|
+
/** Canonical Qloo MCP stdio adapter over the shared workflow executor. */
|
|
1302
|
+
|
|
1303
|
+
declare const QLOO_MCP_CONTRACT_RESOURCE_URI: "qloo://contracts/workflows";
|
|
1304
|
+
declare const QLOO_MCP_HELP = "Start the canonical Qloo MCP stdio server\n\nUsage:\n qloo mcp\n\nThe server exposes qloo_capabilities and the nine shared Qloo workflow tools.\nUse qloo api mcp only when you explicitly need the legacy endpoint-shaped server.";
|
|
1305
|
+
type WriteOutput = (value: string) => void;
|
|
1306
|
+
interface CanonicalMcpServerOptions {
|
|
1307
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
1308
|
+
readonly input?: NodeJS.ReadableStream;
|
|
1309
|
+
readonly writeOut?: WriteOutput;
|
|
1310
|
+
readonly tools?: readonly ToolDefinition[];
|
|
1311
|
+
readonly serverVersion?: string;
|
|
1312
|
+
}
|
|
1313
|
+
interface CanonicalMcpServerLifecycle {
|
|
1314
|
+
close(): void;
|
|
1315
|
+
}
|
|
1316
|
+
/** Start the canonical MCP JSON-RPC loop and return its readline lifecycle handle. */
|
|
1317
|
+
declare function startCanonicalMcpServer(options?: CanonicalMcpServerOptions): CanonicalMcpServerLifecycle;
|
|
1318
|
+
declare function runQlooMcp(argv: readonly string[], options?: CanonicalMcpServerOptions): number;
|
|
1319
|
+
|
|
1320
|
+
export { BLOCKED_PI_INTERACTIVE_COMMANDS, HARNESS_HELP, HARNESS_VERSION, MissingModelAuthenticationError, PINNED_PI_VERSION, PI_AGENT_DIR_ENVIRONMENT_VARIABLE, PI_OFFLINE_ENVIRONMENT_VARIABLE, PI_SHARE_BLOCK_MESSAGE, PI_SKIP_VERSION_CHECK_ENVIRONMENT_VARIABLE, PI_TELEMETRY_ENVIRONMENT_VARIABLE, PI_TRUST_BLOCK_MESSAGE, PI_VERSION, PiCommandPolicyCompatibilityError, PiHarnessRuntime, QLOO_BUILD_HELP, QLOO_DEFAULT_PROFILE, QLOO_EXECUTION_LOG_SCHEMA_VERSION, QLOO_EXEC_EVENT_SCHEMA_VERSION, QLOO_EXEC_HELP, QLOO_EXEC_MAX_INPUT_BYTES, QLOO_GUIDED_GOALS, QLOO_HARNESS_PACKAGE_NAME, QLOO_HARNESS_PROFILES, QLOO_HELP, QLOO_INTEGRATION_PLAN_DRAFT_SCHEMA, QLOO_INTEGRATION_PLAN_ID_PATTERN, QLOO_INTEGRATION_PLAN_MAX_BYTES, QLOO_INTEGRATION_PLAN_MAX_EVIDENCE_BYTES, QLOO_INTEGRATION_PLAN_MAX_GOAL_BYTES, QLOO_INTEGRATION_PLAN_SCHEMA, QLOO_INTEGRATION_PLAN_SCHEMA_VERSION, QLOO_MCP_CONTRACT_RESOURCE_URI, QLOO_MCP_HELP, QLOO_MODEL_RETRY_POLICY, QLOO_NO_GUIDED_START_ENVIRONMENT_VARIABLE, QLOO_PLAN_HELP, QLOO_PROFILE_DEFINITIONS, QLOO_PROJECT_CONTEXT_SCHEMA_VERSION, QLOO_RESOLUTION_PROVIDER_ENVIRONMENT_VARIABLE, QLOO_SESSION_STATE_ENTRY_TYPE, QLOO_SESSION_STATE_SCHEMA_VERSION, QLOO_SETUP_HELP, QLOO_SETUP_SCHEMA_VERSION, QLOO_TASTE_RESOLVER_MIN_MARGIN_ENVIRONMENT_VARIABLE, QLOO_TASTE_RESOLVER_MIN_SCORE_ENVIRONMENT_VARIABLE, QLOO_TASTE_RESOLVER_TAG_ENDPOINT_ENVIRONMENT_VARIABLE, QLOO_TRUSTED_TASTE_RESOLVER_URL_ENVIRONMENT_VARIABLE, QLOO_UPDATE_HELP, QLOO_UPDATE_SPEC_ENVIRONMENT_VARIABLE, QLOO_WORKSPACE_TOOL_NAMES, QlooIntegrationPlanError, QlooResolutionProviderError, QlooWorkflowExecutionError, TASTE_RESOLVER_API_KEY_ENVIRONMENT_VARIABLE, TASTE_RESOLVER_URL_ENVIRONMENT_VARIABLE, applyPiInteractiveCommandPolicy, applyQlooModelRetryPolicy, applyResolutionChoices, buildExploreResourceOptions, buildExploreToolNames, buildHarnessResourceOptions, buildProfileToolNames, createBuildHandoffPrompt, createCliQlooWorkflowExecutor, createDelegatingQlooWorkflowExecutor, createDirectQlooWorkflowExecutor, createDirectQlooWorkflowExecutorFromEnvironment, createExplorePolicyExtension, createFileExecutionObserver, createHarnessPolicyExtension, createIntegrationPlanArtifact, createIntegrationPlanPrompt, createIntegrationPlanSubmissionTool, createMcpQlooWorkflowExecutor, createNativeQlooResolutionProvider, createPiHarnessRuntime, createProjectContextTool, createPublicQlooResolutionProvider, createQlooCallComponent, createQlooResolutionProviderFromEnvironment, createQlooResultComponent, createQlooTools, createQlooToolsFromEnvironment, createTasteResolverAssistedResolutionProvider, createTerminalSetupIO, ensureQlooStateDirectories, findGuidedGoal, formatDoctorReport, formatQlooResolutionCandidateLabels, formatQlooSetupReport, getQlooProfileDefinition, getQlooToolRuntimeInfo, guidedGoalLabel, inferGlobalInstallPrefix, inspectPiAuthFile, inspectProjectContext, inspectQlooResolutionProviderConfiguration, isBlockedPiInteractiveCommand, isQlooHarnessProfile, launchInteractiveHarness, loadHarnessResources, loadIntegrationPlanArtifact, paginateQlooResult, parseQlooRawPage, probeTasteResolverHealth, qlooNextActions, renderQlooCallLines, renderQlooResultLines, requireAuthenticatedModel, resolutionCandidates, resolveQlooPaths, runDoctor, runHarnessCli, runQloo, runQlooBuild, runQlooExec, runQlooMcp, runQlooPlan, runQlooSetup, runQlooUpdate, saveIntegrationPlanArtifact, setupQloo, startCanonicalMcpServer, validateExploreTools, withPiAgentDirectory, withPiPrivacyDefaults };
|
|
1321
|
+
export type { CanonicalMcpServerLifecycle, CanonicalMcpServerOptions, CreateDelegatingQlooExecutorOptions, CreateDirectQlooWorkflowExecutorFromEnvironmentOptions, CreateFileExecutionObserverOptions, CreateIntegrationPlanArtifactOptions, CreateIntegrationPlanSubmissionOptions, CreatePiHarnessRuntimeOptions, CreateProjectContextToolOptions, CreateQlooResolutionProviderFromEnvironmentOptions, CreateQlooToolsFromEnvironmentOptions, CreateQlooToolsOptions, DoctorCheck, DoctorReport, EnsureQlooStateOptions, HarnessPrerequisite, HarnessPrerequisiteContext, HarnessResources, HarnessRuntime, HarnessRuntimeFactory, InspectProjectContextOptions, InspectQlooResolutionProviderConfigurationOptions, IntegrationPlanSubmission, LaunchInteractiveHarnessOptions, LoadHarnessResourcesOptions, LoadIntegrationPlanArtifactOptions, NativeQlooResolutionProviderOptions, PiAuthFileInspection, ProjectContextResult, QlooEntityResolutionRequest, QlooExecCompletedEvent, QlooExecEvent, QlooExecFailedEvent, QlooExecStartedEvent, QlooExecutionLogRecord, QlooGuidedGoal, QlooGuidedGoalId, QlooGuidedStarter, QlooHarnessProfile, QlooIntegrationPlan, QlooIntegrationPlanDraft, QlooIntegrationPlanErrorCode, QlooInteractiveCommandActions, QlooNextAction, QlooPaths, QlooPresentationTheme, QlooProfileDefinition, QlooProjectContext, QlooResolutionBatch, QlooResolutionChoice, QlooResolutionClient, QlooResolutionContext, QlooResolutionProvider, QlooResolutionProviderConfigurationInspection, QlooResolutionProviderErrorCode, QlooRouterDependencies, QlooSetupChoice, QlooSetupIO, QlooSetupModelRuntime, QlooSetupOptions, QlooSetupReport, QlooTagResolutionPurpose, QlooTagResolutionRequest, QlooTextComponent, QlooToolClient, QlooToolRuntimeInfo, QlooTransportDescriptor, QlooTransportKind, QlooWorkflowExecution, QlooWorkflowExecutionContext, QlooWorkflowExecutionObserver, QlooWorkflowExecutor, QlooWorkflowFailure, QlooWorkflowResultEnvelope, ResolveQlooPathsOptions, RunDoctorOptions, RunQlooBuildOptions, RunQlooExecOptions, RunQlooPlanOptions, RunQlooSetupOptions, RunQlooUpdateOptions, TasteResolverHealthKind, TasteResolverHealthProbeOptions, TasteResolverHealthProbeResult, TasteResolverResolutionProviderOptions, TasteResolverTagEndpoint };
|