@codetelemetry/connect 0.1.1 → 0.1.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.
Files changed (93) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +8 -24
  3. package/dist/agent.d.ts +699 -0
  4. package/dist/agent.js +435 -0
  5. package/dist/assistants.d.ts +4 -0
  6. package/dist/assistants.js +5 -0
  7. package/dist/bin.js +3 -0
  8. package/dist/cli.d.ts +1 -0
  9. package/dist/cli.js +567 -0
  10. package/dist/clients.d.ts +34 -0
  11. package/dist/clients.js +74 -0
  12. package/dist/{src/codexConfig.d.ts → codexConfig.d.ts} +1 -0
  13. package/dist/{src/codexConfig.js → codexConfig.js} +5 -0
  14. package/dist/{src/config.d.ts → config.d.ts} +17 -0
  15. package/dist/{src/config.js → config.js} +17 -0
  16. package/dist/connectivity.d.ts +51 -0
  17. package/dist/connectivity.js +118 -0
  18. package/dist/{src/deviceClient.d.ts → deviceClient.d.ts} +9 -2
  19. package/dist/{src/deviceClient.js → deviceClient.js} +45 -13
  20. package/dist/graderArtifact.d.ts +14 -0
  21. package/dist/graderArtifact.js +94 -0
  22. package/dist/graderSeed.d.ts +50 -0
  23. package/dist/graderSeed.js +289 -0
  24. package/dist/hostMetrics.d.ts +54 -0
  25. package/dist/hostMetrics.js +425 -0
  26. package/dist/import/browser.d.ts +30 -0
  27. package/dist/import/browser.js +157 -0
  28. package/dist/import/convert.d.ts +20 -0
  29. package/dist/import/convert.js +165 -0
  30. package/dist/import/core.d.ts +143 -0
  31. package/dist/import/core.js +441 -0
  32. package/dist/import/ledger.d.ts +52 -0
  33. package/dist/import/ledger.js +161 -0
  34. package/dist/import/model.d.ts +70 -0
  35. package/dist/import/model.js +42 -0
  36. package/dist/import/options.d.ts +24 -0
  37. package/dist/import/options.js +71 -0
  38. package/dist/import/otlpImport.d.ts +7 -0
  39. package/dist/import/otlpImport.js +81 -0
  40. package/dist/import/protocol.d.ts +35 -0
  41. package/dist/import/protocol.js +51 -0
  42. package/dist/import/run.d.ts +30 -0
  43. package/dist/import/run.js +127 -0
  44. package/dist/import/sources/claudeCodeText.d.ts +19 -0
  45. package/dist/import/sources/claudeCodeText.js +214 -0
  46. package/dist/import/sources/codexText.d.ts +20 -0
  47. package/dist/import/sources/codexText.js +319 -0
  48. package/dist/import/sources/files.d.ts +24 -0
  49. package/dist/import/sources/files.js +129 -0
  50. package/dist/import/transport.d.ts +76 -0
  51. package/dist/import/transport.js +141 -0
  52. package/dist/index.d.ts +19 -0
  53. package/dist/index.js +19 -0
  54. package/dist/kiro/collector.d.ts +88 -0
  55. package/dist/kiro/collector.js +577 -0
  56. package/dist/kiro/command.d.ts +3 -0
  57. package/dist/kiro/command.js +109 -0
  58. package/dist/kiro/config.d.ts +39 -0
  59. package/dist/kiro/config.js +107 -0
  60. package/dist/kiro/records.d.ts +52 -0
  61. package/dist/kiro/records.js +206 -0
  62. package/dist/kiro/service.d.ts +21 -0
  63. package/dist/kiro/service.js +183 -0
  64. package/dist/kiro/state.d.ts +45 -0
  65. package/dist/kiro/state.js +205 -0
  66. package/dist/kiro/transport.d.ts +9 -0
  67. package/dist/kiro/transport.js +90 -0
  68. package/dist/{src/onboard.d.ts → onboard.d.ts} +8 -2
  69. package/dist/onboard.js +116 -0
  70. package/dist/piConfig.d.ts +29 -0
  71. package/dist/piConfig.js +112 -0
  72. package/dist/plan.d.ts +53 -0
  73. package/dist/plan.js +113 -0
  74. package/dist/{src/repositoryHook.d.ts → repositoryHook.d.ts} +0 -1
  75. package/dist/{src/repositoryHook.js → repositoryHook.js} +5 -38
  76. package/dist/{src/settings.d.ts → settings.d.ts} +4 -0
  77. package/dist/{src/settings.js → settings.js} +17 -0
  78. package/dist/yaml.d.ts +5 -0
  79. package/dist/yaml.js +72 -0
  80. package/package.json +27 -18
  81. package/dist/bin/connect.js +0 -6
  82. package/dist/src/cli.d.ts +0 -10
  83. package/dist/src/cli.js +0 -172
  84. package/dist/src/connectivity.d.ts +0 -27
  85. package/dist/src/connectivity.js +0 -54
  86. package/dist/src/index.d.ts +0 -8
  87. package/dist/src/index.js +0 -8
  88. package/dist/src/onboard.js +0 -84
  89. /package/dist/{bin/connect.d.ts → bin.d.ts} +0 -0
  90. /package/dist/{src/keys.d.ts → keys.d.ts} +0 -0
  91. /package/dist/{src/keys.js → keys.js} +0 -0
  92. /package/dist/{src/otlp.d.ts → otlp.d.ts} +0 -0
  93. /package/dist/{src/otlp.js → otlp.js} +0 -0
@@ -0,0 +1,699 @@
1
+ import type { FetchLike } from "./otlp.ts";
2
+ export type CostSignal = {
3
+ windowDays: number;
4
+ observedCostUsd: number;
5
+ feeUsd: number;
6
+ byModel: {
7
+ model: string;
8
+ observedCostUsd: number;
9
+ }[];
10
+ topRepo: string | null;
11
+ asOf: string | null;
12
+ note: string;
13
+ };
14
+ export type CostSignalResult = {
15
+ ok: boolean;
16
+ cost: CostSignal | null;
17
+ httpStatus: number;
18
+ };
19
+ export type AgentReadPerformance = {
20
+ totalMs: number;
21
+ queryMs: number;
22
+ queryCount: number;
23
+ readRows: number;
24
+ readBytes: number;
25
+ resultBytes: number;
26
+ targetMs: number;
27
+ meetsTarget: boolean;
28
+ phases: {
29
+ phase: string;
30
+ queryId: string;
31
+ durationMs: number;
32
+ readRows?: number;
33
+ readBytes?: number;
34
+ resultBytes: number;
35
+ }[];
36
+ cache?: string;
37
+ coldTargetMs?: number;
38
+ meetsColdTarget?: boolean;
39
+ };
40
+ export type SessionPerformanceReport = {
41
+ sessionId: string;
42
+ service?: string;
43
+ present: boolean;
44
+ sessionCount: number;
45
+ eventCount: number;
46
+ returnedEvents: number;
47
+ turnCount: number;
48
+ targetsMs: {
49
+ fresh: number;
50
+ cacheHit: number;
51
+ };
52
+ samples: {
53
+ mode: "fresh" | "dashboard-cache";
54
+ cache: "hit" | "miss" | "disabled" | "bypass";
55
+ performance: AgentReadPerformance;
56
+ }[];
57
+ };
58
+ export type SimilarSessionErrorsReport = {
59
+ sessionId: string;
60
+ lookbackDays: number;
61
+ targetFailures: number;
62
+ targetSignatures: {
63
+ signature: string;
64
+ tool: string;
65
+ category: string;
66
+ occurrences: number;
67
+ lastSeen: string;
68
+ }[];
69
+ targetSignaturesTruncated: boolean;
70
+ matches: {
71
+ sessionId: string;
72
+ lastSeen: string;
73
+ matchingFailures: number;
74
+ exactSignatureMatches: number;
75
+ familySignatureMatches: number;
76
+ similarityPct: number;
77
+ tools: string[];
78
+ categories: string[];
79
+ }[];
80
+ };
81
+ export type SessionPerformanceResult = {
82
+ ok: boolean;
83
+ report: SessionPerformanceReport | null;
84
+ httpStatus: number;
85
+ error: string | null;
86
+ message: string | null;
87
+ };
88
+ export type SessionSearchHit = {
89
+ sessionId: string;
90
+ sessionUrl?: string;
91
+ title: string;
92
+ titleIsId: boolean;
93
+ sessionName?: string;
94
+ delegation?: {
95
+ parentSessionId: string;
96
+ parentSessionUrl?: string;
97
+ at: string;
98
+ source: "codex.agent_communication";
99
+ taskName?: string;
100
+ taskNameSource?: "parent_spawn_agent";
101
+ };
102
+ repo: string;
103
+ repoInferred?: boolean;
104
+ user?: string;
105
+ sourceService: string;
106
+ models: string[];
107
+ lastSeen: string | null;
108
+ durationMs: number;
109
+ totalTokens?: number;
110
+ costUsd?: number;
111
+ prompts: number;
112
+ invocations?: number;
113
+ tools: number;
114
+ linesAdded?: number;
115
+ linesRemoved?: number;
116
+ commits?: number;
117
+ pullRequests?: number;
118
+ costPerCommit?: number;
119
+ zeroOutput?: true;
120
+ outcomeSource?: "claude_code_metrics" | "tool_event_parse";
121
+ activity?: "substantive" | "instrumentation_only" | "insufficient_evidence";
122
+ match?: {
123
+ fields: string[];
124
+ };
125
+ measurements?: {
126
+ version: 1;
127
+ tokens: "measured" | "unmeasured" | "unavailable" | "conflict";
128
+ usd: "measured" | "unmeasured" | "unavailable" | "conflict";
129
+ modelCalls: "measured" | "unmeasured" | "unavailable" | "conflict";
130
+ apiLatency: "measured" | "unmeasured" | "unavailable" | "conflict";
131
+ toolDuration: "measured" | "unmeasured" | "unavailable" | "conflict";
132
+ providerCredits: "measured" | "unmeasured" | "unavailable" | "conflict";
133
+ reportedTurnElapsed: "measured" | "unmeasured" | "unavailable" | "conflict";
134
+ turnCompletion?: "measured" | "unmeasured" | "unavailable" | "conflict";
135
+ };
136
+ providerUsageWindow?: {
137
+ from: string;
138
+ through: string;
139
+ basis: "retained_provider_turns";
140
+ };
141
+ turnCompletion?: {
142
+ turns: number;
143
+ completed: number;
144
+ cancelled: number;
145
+ errors: number;
146
+ unknown: number;
147
+ successfulCompleted: number;
148
+ reportedStatusTurns: number;
149
+ };
150
+ providerTurnCoverage?: {
151
+ turnsWithoutUsage: number;
152
+ turnsWithoutCompletion: number;
153
+ };
154
+ providerUsage?: {
155
+ provider: "kiro";
156
+ unit: "credit";
157
+ amount: number;
158
+ turns: number;
159
+ reportedTurnElapsedMs?: number;
160
+ reportedTurnCount: number;
161
+ };
162
+ };
163
+ export type SessionSearchLegacyReport = {
164
+ telemetrySnapshot?: {
165
+ materializedAt: string;
166
+ dataThrough: string | null;
167
+ eventContent: "separate_snapshot";
168
+ };
169
+ results: SessionSearchHit[];
170
+ total: number;
171
+ limit: number;
172
+ offset: number;
173
+ hasMore: boolean;
174
+ nextOffset: number | null;
175
+ query: Record<string, unknown>;
176
+ activityCounts?: {
177
+ substantive: number;
178
+ instrumentationOnly: number;
179
+ insufficientEvidence: number;
180
+ };
181
+ repos: string[];
182
+ promptSearchAvailable: boolean;
183
+ promptSearchTruncated?: boolean;
184
+ promptSearchThrough?: string | null;
185
+ contentRedacted: true;
186
+ truncated?: boolean;
187
+ };
188
+ export type SessionPrecedentReport = {
189
+ precedents: {
190
+ mode: "semantic" | "lexical";
191
+ degraded: boolean;
192
+ reason?: "embedding_unavailable" | "embedding_failed";
193
+ total: number;
194
+ limit: number;
195
+ offset: number;
196
+ hasMore: boolean;
197
+ candidates: number;
198
+ lookbackDays: number;
199
+ hits: Array<{
200
+ sessionId: string;
201
+ service: string;
202
+ sessionUrl?: string;
203
+ sourceGeneration: string;
204
+ outcome: "success" | "partial" | "failed" | "unknown";
205
+ complexity: "low" | "medium" | "high" | "unknown";
206
+ semanticScore: number;
207
+ lexicalScore: number;
208
+ reasons: string[];
209
+ interpretationReadiness: "ready" | "partial";
210
+ }>;
211
+ };
212
+ };
213
+ export type SessionSearchReport = SessionSearchLegacyReport | SessionPrecedentReport;
214
+ export type SessionSearchResult<TReport extends SessionSearchReport = SessionSearchLegacyReport> = {
215
+ ok: boolean;
216
+ report: TReport | null;
217
+ httpStatus: number;
218
+ error: string | null;
219
+ message: string | null;
220
+ };
221
+ export type TaskSize = "XS" | "S" | "M" | "L" | "XL";
222
+ export type LinearEstimateScale = "exponential" | "fibonacci" | "linear" | "tShirt";
223
+ export type LinearEstimateProjection = {
224
+ scale: LinearEstimateScale;
225
+ extended: boolean;
226
+ value: number;
227
+ label: string;
228
+ size: TaskSize;
229
+ };
230
+ export type TaskEffortEstimate = {
231
+ task: {
232
+ text: string;
233
+ source: "text" | "issue";
234
+ issueKey: string | null;
235
+ terms: string[];
236
+ };
237
+ sizingRequestId: string;
238
+ size: TaskSize | null;
239
+ range: {
240
+ minTokens: number;
241
+ maxTokens: number | null;
242
+ } | null;
243
+ sizeRange?: {
244
+ min: TaskSize;
245
+ max: TaskSize;
246
+ };
247
+ tokens: {
248
+ point: number;
249
+ low: number;
250
+ high: number;
251
+ };
252
+ basis: "matched" | "corpus-median" | "none";
253
+ sampleCount: number;
254
+ confidence: {
255
+ band: "high" | "medium" | "low";
256
+ ladder: "high" | "medium" | "low";
257
+ similarity: number;
258
+ evidence: number;
259
+ corpus: number;
260
+ agreement: number;
261
+ scoring: {
262
+ inputs: {
263
+ key: string;
264
+ label: string;
265
+ value: number;
266
+ weight: number;
267
+ detail: string;
268
+ }[];
269
+ weightedScore: number;
270
+ cap: number;
271
+ capBand: "high" | "medium" | "low";
272
+ capped: boolean;
273
+ capReason: "samples" | "disagreement" | null;
274
+ score: number;
275
+ };
276
+ reasons: string[];
277
+ };
278
+ matches: {
279
+ sessionId: string;
280
+ kind: "session" | "segment";
281
+ sourceSessionId?: string;
282
+ title: string;
283
+ useCase: string;
284
+ similarityPct: number;
285
+ totalTokens: number;
286
+ lastSeen: string;
287
+ }[];
288
+ model: {
289
+ rulesVersion: string;
290
+ cohortKey: string;
291
+ cohortSampleSize: number;
292
+ observationCount: number;
293
+ } | null;
294
+ evidence: {
295
+ lookbackDays: number;
296
+ sessions: number;
297
+ describedSessions: number;
298
+ truncated?: boolean;
299
+ descriptionsUnavailable?: boolean;
300
+ segmentedSessions?: number;
301
+ };
302
+ linearEstimate: LinearEstimateProjection | null;
303
+ issueSource: {
304
+ connectionId: string;
305
+ workspace: {
306
+ id: string;
307
+ name: string;
308
+ urlKey: string;
309
+ };
310
+ identifier: string;
311
+ url: string;
312
+ title: string;
313
+ description: string;
314
+ descriptionChars: number;
315
+ descriptionTruncated: boolean;
316
+ labels: string[];
317
+ project: {
318
+ id: string;
319
+ name: string;
320
+ } | null;
321
+ team: {
322
+ id: string;
323
+ key: string;
324
+ name: string;
325
+ } | null;
326
+ estimate: number | null;
327
+ } | null;
328
+ calibrationTask: {
329
+ kind: "spike" | "slice" | "instrument";
330
+ size: "XS" | "S";
331
+ title: string;
332
+ question: string;
333
+ targetSignal: "similarity" | "evidence" | "corpus" | "agreement" | "ladder";
334
+ why: string;
335
+ steps: string[];
336
+ expectedEvidence: string;
337
+ exitCriteria: string[];
338
+ expectedImprovement: string;
339
+ expectedTokens: number;
340
+ sizingRequestId: string;
341
+ markdown: string;
342
+ signature: string;
343
+ } | null;
344
+ confidenceTask: TaskEffortEstimate["calibrationTask"];
345
+ };
346
+ export type TaskEffortResult = {
347
+ ok: boolean;
348
+ estimate: TaskEffortEstimate | null;
349
+ performance: AgentReadPerformance | null;
350
+ httpStatus: number;
351
+ error: string | null;
352
+ message: string | null;
353
+ };
354
+ export type LinearIssueSource = {
355
+ reference: string;
356
+ connectionId: string;
357
+ workspace: {
358
+ id: string;
359
+ name: string;
360
+ urlKey: string;
361
+ };
362
+ identifier: string;
363
+ url: string;
364
+ title: string;
365
+ labels: string[];
366
+ project: {
367
+ id: string;
368
+ name: string;
369
+ } | null;
370
+ team: {
371
+ id: string;
372
+ key: string;
373
+ name: string;
374
+ } | null;
375
+ estimate: number | null;
376
+ normalizedText: string;
377
+ };
378
+ export type LinearConnectionChoice = {
379
+ connectionId: string;
380
+ workspace: {
381
+ id: string;
382
+ name: string;
383
+ urlKey: string;
384
+ };
385
+ isDefault: boolean;
386
+ status: string;
387
+ };
388
+ export type LinearIssueEstimateResult = {
389
+ ok: boolean;
390
+ estimate: TaskEffortEstimate | null;
391
+ source: LinearIssueSource | null;
392
+ connections: LinearConnectionChoice[] | null;
393
+ performance: AgentReadPerformance | null;
394
+ httpStatus: number;
395
+ error: string | null;
396
+ message: string | null;
397
+ };
398
+ export type SimilarSessionErrorsResult = {
399
+ ok: boolean;
400
+ report: SimilarSessionErrorsReport | null;
401
+ performance: AgentReadPerformance | null;
402
+ httpStatus: number;
403
+ error: string | null;
404
+ message: string | null;
405
+ };
406
+ export type HostState = "healthy" | "degraded" | "stale" | "offline";
407
+ export type HostThresholds = {
408
+ cpuSoft: number;
409
+ cpuHard: number;
410
+ memSoft: number;
411
+ memHard: number;
412
+ swapHard: number;
413
+ fsSoft: number;
414
+ fsHard: number;
415
+ staleAfterSec: number;
416
+ offlineAfterSec: number;
417
+ };
418
+ export type HostAgentdProcess = {
419
+ detected: boolean;
420
+ cpuUtil: number | null;
421
+ memUtil: number | null;
422
+ threads: number | null;
423
+ };
424
+ export type HostSignals = {
425
+ cpuUtil: number | null;
426
+ memUtil: number | null;
427
+ swapUtil: number | null;
428
+ fsUtil: number | null;
429
+ load1: number | null;
430
+ load5: number | null;
431
+ load15: number | null;
432
+ uptimeSec: number | null;
433
+ networkErrors: number | null;
434
+ agentd: HostAgentdProcess;
435
+ codingAgentsPresent: string[];
436
+ };
437
+ export type HostHeadroom = {
438
+ cpu: number | null;
439
+ memory: number | null;
440
+ swap: number | null;
441
+ filesystem: number | null;
442
+ limitingFactor: string | null;
443
+ };
444
+ export type HostAdmission = {
445
+ admit: boolean;
446
+ reason: string;
447
+ limitingFactor: string | null;
448
+ };
449
+ export type HostHealth = {
450
+ instance: string;
451
+ host: string | null;
452
+ os: string | null;
453
+ arch: string | null;
454
+ environment: string | null;
455
+ state: HostState;
456
+ synthetic?: boolean;
457
+ reasons: string[];
458
+ warnings: string[];
459
+ lastSeen: string | null;
460
+ ageSeconds: number | null;
461
+ signals: HostSignals;
462
+ signalObservedAt?: Record<string, {
463
+ at: string;
464
+ ageSeconds: number;
465
+ }>;
466
+ headroom: HostHeadroom;
467
+ admission: HostAdmission;
468
+ };
469
+ export type HostHealthReport = {
470
+ generatedAt: string;
471
+ asOf: string | null;
472
+ policyVersion: string;
473
+ lookbackMinutes: number;
474
+ windowMinutes: number;
475
+ signalMaxAgeSec: number;
476
+ thresholds: HostThresholds;
477
+ signalUnits?: Record<string, string>;
478
+ hosts: HostHealth[];
479
+ summary: {
480
+ total: number;
481
+ healthy: number;
482
+ degraded: number;
483
+ stale: number;
484
+ offline: number;
485
+ admittable: number;
486
+ synthetic?: number;
487
+ };
488
+ };
489
+ export type HostPipelineDiagnosis = {
490
+ stage: string;
491
+ detail: string;
492
+ hostFeedLastSeen: string | null;
493
+ hostFeedLastSeenAgeSec: number | null;
494
+ otherFeedsLastSeen: string | null;
495
+ otherFeedsLastSeenAgeSec: number | null;
496
+ horizonDays: number | null;
497
+ };
498
+ export type HostHealthResult = {
499
+ ok: boolean;
500
+ report: HostHealthReport | null;
501
+ status: string | null;
502
+ diagnosis: HostPipelineDiagnosis | null;
503
+ serverVersion: string | null;
504
+ reportUnusable: string | null;
505
+ httpStatus: number;
506
+ error: string | null;
507
+ message: string | null;
508
+ };
509
+ export declare function getCostSignal(opts: {
510
+ key: string;
511
+ url: string;
512
+ fetchImpl?: FetchLike;
513
+ timeoutMs?: number;
514
+ }): Promise<CostSignalResult>;
515
+ export declare function normalizeSessionPerformanceService(value: unknown): string | undefined | null;
516
+ export declare function getSessionPerformance(opts: {
517
+ key: string;
518
+ url: string;
519
+ sessionId: string;
520
+ service?: string;
521
+ includeFresh?: boolean;
522
+ cacheSamples?: number;
523
+ fetchImpl?: FetchLike;
524
+ timeoutMs?: number;
525
+ }): Promise<SessionPerformanceResult>;
526
+ export declare function findSimilarSessionErrors(opts: {
527
+ key: string;
528
+ url: string;
529
+ sessionId: string;
530
+ lookbackDays?: number;
531
+ limit?: number;
532
+ fetchImpl?: FetchLike;
533
+ timeoutMs?: number;
534
+ }): Promise<SimilarSessionErrorsResult>;
535
+ export declare const SESSION_SEARCH_REQUEST_TIMEOUT_MS = 65000;
536
+ type SessionSearchOptions<TQuery extends Record<string, unknown>> = {
537
+ key: string;
538
+ url: string;
539
+ query: TQuery;
540
+ fetchImpl?: FetchLike;
541
+ timeoutMs?: number;
542
+ };
543
+ export declare function searchCodingSessions(opts: SessionSearchOptions<Record<string, unknown> & {
544
+ precedent: true;
545
+ }>): Promise<SessionSearchResult<SessionPrecedentReport>>;
546
+ export declare function searchCodingSessions(opts: SessionSearchOptions<Record<string, unknown> & {
547
+ precedent?: false;
548
+ }>): Promise<SessionSearchResult>;
549
+ export type ReplyPhraseTrendsResult = {
550
+ ok: boolean;
551
+ trends: Record<string, unknown> | null;
552
+ httpStatus: number;
553
+ error: string | null;
554
+ message: string | null;
555
+ };
556
+ export declare function countReplyPhrases(opts: {
557
+ key: string;
558
+ url: string;
559
+ query: Record<string, unknown>;
560
+ fetchImpl?: FetchLike;
561
+ timeoutMs?: number;
562
+ }): Promise<ReplyPhraseTrendsResult>;
563
+ export declare function estimateTaskSize(opts: {
564
+ key: string;
565
+ url: string;
566
+ taskText?: string;
567
+ issue?: {
568
+ identifier?: string;
569
+ title?: string;
570
+ description?: string;
571
+ labels?: string[];
572
+ };
573
+ issueKey?: string;
574
+ repo?: string;
575
+ linearScale?: LinearEstimateScale;
576
+ linearScaleExtended?: boolean;
577
+ lookbackDays?: number;
578
+ limit?: number;
579
+ fetchImpl?: FetchLike;
580
+ timeoutMs?: number;
581
+ }): Promise<TaskEffortResult>;
582
+ export declare function getHostHealth(opts: {
583
+ key: string;
584
+ url: string;
585
+ lookbackMinutes?: number;
586
+ thresholds?: Partial<HostThresholds>;
587
+ diagnose?: boolean;
588
+ fetchImpl?: FetchLike;
589
+ timeoutMs?: number;
590
+ }): Promise<HostHealthResult>;
591
+ export declare function estimateLinearIssue(opts: {
592
+ key: string;
593
+ url: string;
594
+ reference: string;
595
+ connectionId?: string;
596
+ workspace?: string;
597
+ repo?: string;
598
+ linearScale?: LinearEstimateScale;
599
+ linearScaleExtended?: boolean;
600
+ lookbackDays?: number;
601
+ limit?: number;
602
+ fetchImpl?: FetchLike;
603
+ timeoutMs?: number;
604
+ }): Promise<LinearIssueEstimateResult>;
605
+ export declare function interpretSession(opts: {
606
+ key: string;
607
+ url: string;
608
+ sessionId: string;
609
+ service?: string;
610
+ evidenceIds?: string[];
611
+ snapshot?: string;
612
+ fetchImpl?: FetchLike;
613
+ timeoutMs?: number;
614
+ }): Promise<{
615
+ ok: boolean;
616
+ value: Record<string, unknown> | null;
617
+ httpStatus: number;
618
+ error: string | null;
619
+ message: string | null;
620
+ }>;
621
+ export declare function readSessionEvents(opts: {
622
+ key: string;
623
+ url: string;
624
+ input: Record<string, unknown>;
625
+ fetchImpl?: FetchLike;
626
+ timeoutMs?: number;
627
+ }): Promise<{
628
+ ok: boolean;
629
+ value: Record<string, unknown> | null;
630
+ httpStatus: number;
631
+ error: string | null;
632
+ message: string | null;
633
+ }>;
634
+ export type GitHubGateResult = {
635
+ ok: boolean;
636
+ gate: Record<string, unknown> | null;
637
+ httpStatus: number;
638
+ error: string | null;
639
+ message: string | null;
640
+ };
641
+ export declare function readGitHubGate(opts: {
642
+ key: string;
643
+ url: string;
644
+ fetchImpl?: FetchLike;
645
+ timeoutMs?: number;
646
+ }): Promise<GitHubGateResult>;
647
+ export declare function configureGitHubGate(opts: {
648
+ key: string;
649
+ url: string;
650
+ change: Record<string, unknown>;
651
+ fetchImpl?: FetchLike;
652
+ timeoutMs?: number;
653
+ }): Promise<GitHubGateResult>;
654
+ export declare function compareSessions(opts: {
655
+ key: string;
656
+ url: string;
657
+ sessions: Array<{
658
+ sessionId: string;
659
+ service?: string;
660
+ }>;
661
+ fetchImpl?: FetchLike;
662
+ timeoutMs?: number;
663
+ }): Promise<{
664
+ ok: boolean;
665
+ value: Record<string, unknown> | null;
666
+ httpStatus: number;
667
+ error: string | null;
668
+ message: string | null;
669
+ }>;
670
+ export declare function planNextSession(opts: {
671
+ key: string;
672
+ url: string;
673
+ taskText?: string;
674
+ draftPlan?: string;
675
+ repo?: string;
676
+ model?: string;
677
+ environment?: string;
678
+ fetchImpl?: FetchLike;
679
+ timeoutMs?: number;
680
+ }): Promise<{
681
+ ok: boolean;
682
+ value: Record<string, unknown> | null;
683
+ httpStatus: number;
684
+ error: string | null;
685
+ message: string | null;
686
+ }>;
687
+ export declare function graderConfigRequest(opts: {
688
+ key: string;
689
+ url: string;
690
+ body: Record<string, unknown>;
691
+ fetchImpl?: FetchLike;
692
+ }): Promise<{
693
+ ok: boolean;
694
+ config: any;
695
+ httpStatus: number;
696
+ error: any;
697
+ message: any;
698
+ }>;
699
+ export {};