@ouraihub/aether-contracts 0.0.0-stage → 0.1.1
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 +789 -0
- package/package.json +32 -3
- package/src/generated/Ack.ts +10 -0
- package/src/generated/Approval.ts +6 -0
- package/src/generated/ContextRef.ts +14 -0
- package/src/generated/ContextSource.ts +6 -0
- package/src/generated/ContextUsage.ts +27 -0
- package/src/generated/Conversation.ts +16 -0
- package/src/generated/ConversationSummary.ts +30 -0
- package/src/generated/Cost.ts +15 -0
- package/src/generated/Currency.ts +6 -0
- package/src/generated/Details.ts +6 -0
- package/src/generated/EndStatus.ts +6 -0
- package/src/generated/Endpoint.ts +54 -0
- package/src/generated/EndpointKey.ts +34 -0
- package/src/generated/EndpointKeySave.ts +30 -0
- package/src/generated/EndpointSave.ts +45 -0
- package/src/generated/ImagePart.ts +14 -0
- package/src/generated/ImageRef.ts +14 -0
- package/src/generated/IngestBatch.ts +15 -0
- package/src/generated/IngestEntry.ts +19 -0
- package/src/generated/IngestLevel.ts +6 -0
- package/src/generated/IngestReceipt.ts +14 -0
- package/src/generated/IssuedToken.ts +34 -0
- package/src/generated/KeyStrategy.ts +6 -0
- package/src/generated/KitError.ts +21 -0
- package/src/generated/KitErrorCode.ts +6 -0
- package/src/generated/LogEntry.ts +26 -0
- package/src/generated/LogLevel.ts +6 -0
- package/src/generated/LogStatus.ts +15 -0
- package/src/generated/ManualSave.ts +30 -0
- package/src/generated/McpTransport.ts +22 -0
- package/src/generated/Model.ts +58 -0
- package/src/generated/ModelFilter.ts +15 -0
- package/src/generated/ModelOption.ts +44 -0
- package/src/generated/ModelPricing.ts +16 -0
- package/src/generated/ModelRef.ts +14 -0
- package/src/generated/ModelSave.ts +60 -0
- package/src/generated/ModelType.ts +6 -0
- package/src/generated/PermissionMode.ts +7 -0
- package/src/generated/Preview.ts +50 -0
- package/src/generated/PreviewAction.ts +6 -0
- package/src/generated/PreviewCurrent.ts +14 -0
- package/src/generated/PricingTier.ts +26 -0
- package/src/generated/ProbeError.ts +23 -0
- package/src/generated/ProbeErrorKind.ts +6 -0
- package/src/generated/ProbeResult.ts +26 -0
- package/src/generated/ProbeTarget.ts +27 -0
- package/src/generated/ProbedModel.ts +62 -0
- package/src/generated/Protocol.ts +6 -0
- package/src/generated/Provider.ts +31 -0
- package/src/generated/ProviderSave.ts +32 -0
- package/src/generated/ReasoningConfig.ts +20 -0
- package/src/generated/ReasoningDialect.ts +6 -0
- package/src/generated/ReasoningEffort.ts +6 -0
- package/src/generated/RunAccepted.ts +18 -0
- package/src/generated/RunEvent.ts +121 -0
- package/src/generated/RunRequest.ts +84 -0
- package/src/generated/RunSnapshot.ts +36 -0
- package/src/generated/RunStatus.ts +6 -0
- package/src/generated/ScopeState.ts +22 -0
- package/src/generated/SearchHit.ts +18 -0
- package/src/generated/ServerDto.ts +44 -0
- package/src/generated/ServerSave.ts +40 -0
- package/src/generated/ServerSecret.ts +19 -0
- package/src/generated/SkillDto.ts +64 -0
- package/src/generated/SkillFileKind.ts +6 -0
- package/src/generated/SkillFileMeta.ts +19 -0
- package/src/generated/SkillMeta.ts +47 -0
- package/src/generated/SkillOrigin.ts +6 -0
- package/src/generated/SkillRef.ts +14 -0
- package/src/generated/Source.ts +15 -0
- package/src/generated/Status.ts +22 -0
- package/src/generated/TokenRecord.ts +30 -0
- package/src/generated/TokenUsage.ts +26 -0
- package/src/generated/ToolDto.ts +23 -0
- package/src/generated/ToolEffect.ts +6 -0
- package/src/generated/ToolOutcome.ts +6 -0
- package/src/generated/ToolSourceKind.ts +6 -0
- package/src/generated/Turn.ts +84 -0
- package/src/generated/TurnStatus.ts +6 -0
- package/src/generated/TypeSource.ts +6 -0
- package/src/index.ts +82 -0
- package/src/search.ts +50 -0
- package/src/validation.ts +368 -0
- package/src/validators.d.ts +177 -0
- package/src/validators.js +18 -0
- package/README.md +0 -3
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { ContextUsage } from "./ContextUsage.js";
|
|
3
|
+
import type { Cost } from "./Cost.js";
|
|
4
|
+
import type { ImageRef } from "./ImageRef.js";
|
|
5
|
+
import type { ReasoningEffort } from "./ReasoningEffort.js";
|
|
6
|
+
import type { TokenUsage } from "./TokenUsage.js";
|
|
7
|
+
import type { TurnStatus } from "./TurnStatus.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* One display turn, with visible text and controlled image addresses.
|
|
11
|
+
*/
|
|
12
|
+
export type Turn = {
|
|
13
|
+
/**
|
|
14
|
+
* Turn identity.
|
|
15
|
+
*/
|
|
16
|
+
id: string,
|
|
17
|
+
/**
|
|
18
|
+
* Previous context head.
|
|
19
|
+
*/
|
|
20
|
+
parentId: string | null,
|
|
21
|
+
/**
|
|
22
|
+
* Question identity shared by alternative candidates.
|
|
23
|
+
*/
|
|
24
|
+
questionId: string,
|
|
25
|
+
/**
|
|
26
|
+
* Source candidate retried by this turn.
|
|
27
|
+
*/
|
|
28
|
+
supersedesId: string | null,
|
|
29
|
+
/**
|
|
30
|
+
* Reply or translation branch kind.
|
|
31
|
+
*/
|
|
32
|
+
kind: 'reply' | 'translation',
|
|
33
|
+
/**
|
|
34
|
+
* Persisted run state.
|
|
35
|
+
*/
|
|
36
|
+
status: TurnStatus,
|
|
37
|
+
/**
|
|
38
|
+
* Authoritative user input.
|
|
39
|
+
*/
|
|
40
|
+
input: string,
|
|
41
|
+
/**
|
|
42
|
+
* Joined visible assistant text, excluding tools and native reasoning.
|
|
43
|
+
*/
|
|
44
|
+
text: string,
|
|
45
|
+
/**
|
|
46
|
+
* Model used, when known.
|
|
47
|
+
*/
|
|
48
|
+
modelId: string | null,
|
|
49
|
+
/**
|
|
50
|
+
* Endpoint used, when known.
|
|
51
|
+
*/
|
|
52
|
+
endpointId: string | null,
|
|
53
|
+
/**
|
|
54
|
+
* Terminal error code, when present.
|
|
55
|
+
*/
|
|
56
|
+
errorCode: string | null,
|
|
57
|
+
/**
|
|
58
|
+
* Provider-reported token counts; absent counts remain unknown.
|
|
59
|
+
*/
|
|
60
|
+
usage?: TokenUsage | null,
|
|
61
|
+
/**
|
|
62
|
+
* Saved context report, when available.
|
|
63
|
+
*/
|
|
64
|
+
contextUsage?: ContextUsage | null,
|
|
65
|
+
/**
|
|
66
|
+
* Requested reasoning effort.
|
|
67
|
+
*/
|
|
68
|
+
reasoningEffort?: ReasoningEffort | null,
|
|
69
|
+
/**
|
|
70
|
+
* Fixed cost saved at completion, never recalculated for display.
|
|
71
|
+
*/
|
|
72
|
+
cost?: Cost | null,
|
|
73
|
+
/**
|
|
74
|
+
* Safe display reasoning text, never raw native reasoning JSON.
|
|
75
|
+
*/
|
|
76
|
+
reasoningText: string | null,
|
|
77
|
+
/**
|
|
78
|
+
* Input images, retaining references with null addresses after expiry.
|
|
79
|
+
*/
|
|
80
|
+
images: Array<ImageRef>,
|
|
81
|
+
/**
|
|
82
|
+
* Generated images, not automatically replayed as model input.
|
|
83
|
+
*/
|
|
84
|
+
generated: Array<ImageRef>, };
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export type * from './generated/Ack.js'
|
|
2
|
+
export type * from './generated/Approval.js'
|
|
3
|
+
export type * from './generated/ContextRef.js'
|
|
4
|
+
export type * from './generated/ContextSource.js'
|
|
5
|
+
export type * from './generated/ContextUsage.js'
|
|
6
|
+
export type * from './generated/Conversation.js'
|
|
7
|
+
export type * from './generated/ConversationSummary.js'
|
|
8
|
+
export type * from './generated/Cost.js'
|
|
9
|
+
export type * from './generated/Currency.js'
|
|
10
|
+
export type * from './generated/Details.js'
|
|
11
|
+
export type * from './generated/EndStatus.js'
|
|
12
|
+
export type * from './generated/Endpoint.js'
|
|
13
|
+
export type * from './generated/EndpointKey.js'
|
|
14
|
+
export type * from './generated/EndpointKeySave.js'
|
|
15
|
+
export type * from './generated/EndpointSave.js'
|
|
16
|
+
export type * from './generated/ImagePart.js'
|
|
17
|
+
export type * from './generated/ImageRef.js'
|
|
18
|
+
export type * from './generated/IngestBatch.js'
|
|
19
|
+
export type * from './generated/IngestEntry.js'
|
|
20
|
+
export type * from './generated/IngestLevel.js'
|
|
21
|
+
export type * from './generated/IngestReceipt.js'
|
|
22
|
+
export type * from './generated/IssuedToken.js'
|
|
23
|
+
export type * from './generated/KeyStrategy.js'
|
|
24
|
+
export type * from './generated/KitError.js'
|
|
25
|
+
export type * from './generated/KitErrorCode.js'
|
|
26
|
+
export type * from './generated/LogEntry.js'
|
|
27
|
+
export type * from './generated/LogLevel.js'
|
|
28
|
+
export type * from './generated/LogStatus.js'
|
|
29
|
+
export type * from './generated/ManualSave.js'
|
|
30
|
+
export type * from './generated/McpTransport.js'
|
|
31
|
+
export type * from './generated/Model.js'
|
|
32
|
+
export type * from './generated/ModelFilter.js'
|
|
33
|
+
export type * from './generated/ModelOption.js'
|
|
34
|
+
export type * from './generated/ModelPricing.js'
|
|
35
|
+
export type * from './generated/ModelRef.js'
|
|
36
|
+
export type * from './generated/ModelSave.js'
|
|
37
|
+
export type * from './generated/ModelType.js'
|
|
38
|
+
export type * from './generated/PermissionMode.js'
|
|
39
|
+
export type * from './generated/Preview.js'
|
|
40
|
+
export type * from './generated/PreviewAction.js'
|
|
41
|
+
export type * from './generated/PreviewCurrent.js'
|
|
42
|
+
export type * from './generated/PricingTier.js'
|
|
43
|
+
export type * from './generated/ProbeError.js'
|
|
44
|
+
export type * from './generated/ProbeErrorKind.js'
|
|
45
|
+
export type * from './generated/ProbeResult.js'
|
|
46
|
+
export type * from './generated/ProbeTarget.js'
|
|
47
|
+
export type * from './generated/ProbedModel.js'
|
|
48
|
+
export type * from './generated/Protocol.js'
|
|
49
|
+
export type * from './generated/Provider.js'
|
|
50
|
+
export type * from './generated/ProviderSave.js'
|
|
51
|
+
export type * from './generated/ReasoningConfig.js'
|
|
52
|
+
export type * from './generated/ReasoningDialect.js'
|
|
53
|
+
export type * from './generated/ReasoningEffort.js'
|
|
54
|
+
export type * from './generated/RunAccepted.js'
|
|
55
|
+
export type * from './generated/RunEvent.js'
|
|
56
|
+
export type * from './generated/RunRequest.js'
|
|
57
|
+
export type * from './generated/RunSnapshot.js'
|
|
58
|
+
export type * from './generated/RunStatus.js'
|
|
59
|
+
export type * from './generated/ScopeState.js'
|
|
60
|
+
export type * from './generated/SearchHit.js'
|
|
61
|
+
export type * from './generated/ServerDto.js'
|
|
62
|
+
export type * from './generated/ServerSave.js'
|
|
63
|
+
export type * from './generated/ServerSecret.js'
|
|
64
|
+
export type * from './generated/SkillDto.js'
|
|
65
|
+
export type * from './generated/SkillFileKind.js'
|
|
66
|
+
export type * from './generated/SkillFileMeta.js'
|
|
67
|
+
export type * from './generated/SkillMeta.js'
|
|
68
|
+
export type * from './generated/SkillOrigin.js'
|
|
69
|
+
export type * from './generated/SkillRef.js'
|
|
70
|
+
export type * from './generated/Source.js'
|
|
71
|
+
export type * from './generated/Status.js'
|
|
72
|
+
export type * from './generated/TokenRecord.js'
|
|
73
|
+
export type * from './generated/TokenUsage.js'
|
|
74
|
+
export type * from './generated/ToolDto.js'
|
|
75
|
+
export type * from './generated/ToolEffect.js'
|
|
76
|
+
export type * from './generated/ToolOutcome.js'
|
|
77
|
+
export type * from './generated/ToolSourceKind.js'
|
|
78
|
+
export type * from './generated/Turn.js'
|
|
79
|
+
export type * from './generated/TurnStatus.js'
|
|
80
|
+
export type * from './generated/TypeSource.js'
|
|
81
|
+
export type * from './search.js'
|
|
82
|
+
export * from './validation.js'
|
package/src/search.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { SearchHit } from './generated/SearchHit.js'
|
|
2
|
+
|
|
3
|
+
export type SearchCap = 'search' | 'fetch'
|
|
4
|
+
export interface SearchKey {
|
|
5
|
+
id: string
|
|
6
|
+
masked: string
|
|
7
|
+
}
|
|
8
|
+
export interface SearchPreferences {
|
|
9
|
+
maxResults: number
|
|
10
|
+
compression: 'none' | 'cutoff'
|
|
11
|
+
cutoffLimit: number
|
|
12
|
+
blacklist: string[]
|
|
13
|
+
modelToolsPreferred: boolean
|
|
14
|
+
}
|
|
15
|
+
export interface SearchProvider {
|
|
16
|
+
id: string
|
|
17
|
+
name: string
|
|
18
|
+
description: string
|
|
19
|
+
officialWebsite?: string
|
|
20
|
+
apiKeyWebsite?: string
|
|
21
|
+
keyMode: 'required' | 'optional' | 'none'
|
|
22
|
+
basicAuth: boolean
|
|
23
|
+
defaultBaseUrl?: string
|
|
24
|
+
baseUrl?: string
|
|
25
|
+
basicAuthUsername?: string
|
|
26
|
+
keys: SearchKey[]
|
|
27
|
+
ready: boolean
|
|
28
|
+
}
|
|
29
|
+
export interface SearchSettingsDto {
|
|
30
|
+
capability: SearchCap
|
|
31
|
+
defaultProvider: string
|
|
32
|
+
providers: SearchProvider[]
|
|
33
|
+
preferences: SearchPreferences
|
|
34
|
+
}
|
|
35
|
+
export interface SearchSave {
|
|
36
|
+
capability: SearchCap
|
|
37
|
+
provider: string
|
|
38
|
+
baseUrl?: string
|
|
39
|
+
basicAuthUsername?: string
|
|
40
|
+
}
|
|
41
|
+
export interface SearchResult {
|
|
42
|
+
query: string
|
|
43
|
+
provider: string
|
|
44
|
+
hits: SearchHit[]
|
|
45
|
+
}
|
|
46
|
+
export interface SearchPage {
|
|
47
|
+
title: string
|
|
48
|
+
url: string
|
|
49
|
+
content: string
|
|
50
|
+
}
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
// Generated by scripts/generate.mjs; normative run/error/conversation schemas take precedence.
|
|
2
|
+
import type { ErrorObject } from 'ajv'
|
|
3
|
+
import type { Ack } from './generated/Ack.js'
|
|
4
|
+
import type { Approval } from './generated/Approval.js'
|
|
5
|
+
import type { ContextRef } from './generated/ContextRef.js'
|
|
6
|
+
import type { ContextSource } from './generated/ContextSource.js'
|
|
7
|
+
import type { ContextUsage } from './generated/ContextUsage.js'
|
|
8
|
+
import type { Conversation } from './generated/Conversation.js'
|
|
9
|
+
import type { ConversationSummary } from './generated/ConversationSummary.js'
|
|
10
|
+
import type { Cost } from './generated/Cost.js'
|
|
11
|
+
import type { Currency } from './generated/Currency.js'
|
|
12
|
+
import type { Details } from './generated/Details.js'
|
|
13
|
+
import type { EndStatus } from './generated/EndStatus.js'
|
|
14
|
+
import type { Endpoint } from './generated/Endpoint.js'
|
|
15
|
+
import type { EndpointKey } from './generated/EndpointKey.js'
|
|
16
|
+
import type { EndpointKeySave } from './generated/EndpointKeySave.js'
|
|
17
|
+
import type { EndpointSave } from './generated/EndpointSave.js'
|
|
18
|
+
import type { ImagePart } from './generated/ImagePart.js'
|
|
19
|
+
import type { ImageRef } from './generated/ImageRef.js'
|
|
20
|
+
import type { IngestBatch } from './generated/IngestBatch.js'
|
|
21
|
+
import type { IngestEntry } from './generated/IngestEntry.js'
|
|
22
|
+
import type { IngestLevel } from './generated/IngestLevel.js'
|
|
23
|
+
import type { IngestReceipt } from './generated/IngestReceipt.js'
|
|
24
|
+
import type { IssuedToken } from './generated/IssuedToken.js'
|
|
25
|
+
import type { KeyStrategy } from './generated/KeyStrategy.js'
|
|
26
|
+
import type { KitError } from './generated/KitError.js'
|
|
27
|
+
import type { KitErrorCode } from './generated/KitErrorCode.js'
|
|
28
|
+
import type { LogEntry } from './generated/LogEntry.js'
|
|
29
|
+
import type { LogLevel } from './generated/LogLevel.js'
|
|
30
|
+
import type { LogStatus } from './generated/LogStatus.js'
|
|
31
|
+
import type { ManualSave } from './generated/ManualSave.js'
|
|
32
|
+
import type { McpTransport } from './generated/McpTransport.js'
|
|
33
|
+
import type { Model } from './generated/Model.js'
|
|
34
|
+
import type { ModelFilter } from './generated/ModelFilter.js'
|
|
35
|
+
import type { ModelOption } from './generated/ModelOption.js'
|
|
36
|
+
import type { ModelPricing } from './generated/ModelPricing.js'
|
|
37
|
+
import type { ModelRef } from './generated/ModelRef.js'
|
|
38
|
+
import type { ModelSave } from './generated/ModelSave.js'
|
|
39
|
+
import type { ModelType } from './generated/ModelType.js'
|
|
40
|
+
import type { PermissionMode } from './generated/PermissionMode.js'
|
|
41
|
+
import type { Preview } from './generated/Preview.js'
|
|
42
|
+
import type { PreviewAction } from './generated/PreviewAction.js'
|
|
43
|
+
import type { PreviewCurrent } from './generated/PreviewCurrent.js'
|
|
44
|
+
import type { PricingTier } from './generated/PricingTier.js'
|
|
45
|
+
import type { ProbeError } from './generated/ProbeError.js'
|
|
46
|
+
import type { ProbeErrorKind } from './generated/ProbeErrorKind.js'
|
|
47
|
+
import type { ProbeResult } from './generated/ProbeResult.js'
|
|
48
|
+
import type { ProbeTarget } from './generated/ProbeTarget.js'
|
|
49
|
+
import type { ProbedModel } from './generated/ProbedModel.js'
|
|
50
|
+
import type { Protocol } from './generated/Protocol.js'
|
|
51
|
+
import type { Provider } from './generated/Provider.js'
|
|
52
|
+
import type { ProviderSave } from './generated/ProviderSave.js'
|
|
53
|
+
import type { ReasoningConfig } from './generated/ReasoningConfig.js'
|
|
54
|
+
import type { ReasoningDialect } from './generated/ReasoningDialect.js'
|
|
55
|
+
import type { ReasoningEffort } from './generated/ReasoningEffort.js'
|
|
56
|
+
import type { RunAccepted } from './generated/RunAccepted.js'
|
|
57
|
+
import type { RunEvent } from './generated/RunEvent.js'
|
|
58
|
+
import type { RunRequest } from './generated/RunRequest.js'
|
|
59
|
+
import type { RunSnapshot } from './generated/RunSnapshot.js'
|
|
60
|
+
import type { RunStatus } from './generated/RunStatus.js'
|
|
61
|
+
import type { ScopeState } from './generated/ScopeState.js'
|
|
62
|
+
import type { SearchCap } from './search.js'
|
|
63
|
+
import type { SearchHit } from './generated/SearchHit.js'
|
|
64
|
+
import type { SearchKey } from './search.js'
|
|
65
|
+
import type { SearchPage } from './search.js'
|
|
66
|
+
import type { SearchPreferences } from './search.js'
|
|
67
|
+
import type { SearchProvider } from './search.js'
|
|
68
|
+
import type { SearchResult } from './search.js'
|
|
69
|
+
import type { SearchSave } from './search.js'
|
|
70
|
+
import type { SearchSettingsDto } from './search.js'
|
|
71
|
+
import type { ServerDto } from './generated/ServerDto.js'
|
|
72
|
+
import type { ServerSave } from './generated/ServerSave.js'
|
|
73
|
+
import type { ServerSecret } from './generated/ServerSecret.js'
|
|
74
|
+
import type { SkillDto } from './generated/SkillDto.js'
|
|
75
|
+
import type { SkillFileKind } from './generated/SkillFileKind.js'
|
|
76
|
+
import type { SkillFileMeta } from './generated/SkillFileMeta.js'
|
|
77
|
+
import type { SkillMeta } from './generated/SkillMeta.js'
|
|
78
|
+
import type { SkillOrigin } from './generated/SkillOrigin.js'
|
|
79
|
+
import type { SkillRef } from './generated/SkillRef.js'
|
|
80
|
+
import type { Source } from './generated/Source.js'
|
|
81
|
+
import type { Status } from './generated/Status.js'
|
|
82
|
+
import type { TokenRecord } from './generated/TokenRecord.js'
|
|
83
|
+
import type { TokenUsage } from './generated/TokenUsage.js'
|
|
84
|
+
import type { ToolDto } from './generated/ToolDto.js'
|
|
85
|
+
import type { ToolEffect } from './generated/ToolEffect.js'
|
|
86
|
+
import type { ToolOutcome } from './generated/ToolOutcome.js'
|
|
87
|
+
import type { ToolSourceKind } from './generated/ToolSourceKind.js'
|
|
88
|
+
import type { Turn } from './generated/Turn.js'
|
|
89
|
+
import type { TurnStatus } from './generated/TurnStatus.js'
|
|
90
|
+
import type { TypeSource } from './generated/TypeSource.js'
|
|
91
|
+
import * as compiled from './validators.js'
|
|
92
|
+
|
|
93
|
+
export interface ContractMap {
|
|
94
|
+
Ack: Ack
|
|
95
|
+
Approval: Approval
|
|
96
|
+
ContextRef: ContextRef
|
|
97
|
+
ContextSource: ContextSource
|
|
98
|
+
ContextUsage: ContextUsage
|
|
99
|
+
Conversation: Conversation
|
|
100
|
+
ConversationSummary: ConversationSummary
|
|
101
|
+
Cost: Cost
|
|
102
|
+
Currency: Currency
|
|
103
|
+
Details: Details
|
|
104
|
+
EndStatus: EndStatus
|
|
105
|
+
Endpoint: Endpoint
|
|
106
|
+
EndpointKey: EndpointKey
|
|
107
|
+
EndpointKeySave: EndpointKeySave
|
|
108
|
+
EndpointSave: EndpointSave
|
|
109
|
+
ImagePart: ImagePart
|
|
110
|
+
ImageRef: ImageRef
|
|
111
|
+
IngestBatch: IngestBatch
|
|
112
|
+
IngestEntry: IngestEntry
|
|
113
|
+
IngestLevel: IngestLevel
|
|
114
|
+
IngestReceipt: IngestReceipt
|
|
115
|
+
IssuedToken: IssuedToken
|
|
116
|
+
KeyStrategy: KeyStrategy
|
|
117
|
+
KitError: KitError
|
|
118
|
+
KitErrorCode: KitErrorCode
|
|
119
|
+
LogEntry: LogEntry
|
|
120
|
+
LogLevel: LogLevel
|
|
121
|
+
LogStatus: LogStatus
|
|
122
|
+
ManualSave: ManualSave
|
|
123
|
+
McpTransport: McpTransport
|
|
124
|
+
Model: Model
|
|
125
|
+
ModelFilter: ModelFilter
|
|
126
|
+
ModelOption: ModelOption
|
|
127
|
+
ModelPricing: ModelPricing
|
|
128
|
+
ModelRef: ModelRef
|
|
129
|
+
ModelSave: ModelSave
|
|
130
|
+
ModelType: ModelType
|
|
131
|
+
PermissionMode: PermissionMode
|
|
132
|
+
Preview: Preview
|
|
133
|
+
PreviewAction: PreviewAction
|
|
134
|
+
PreviewCurrent: PreviewCurrent
|
|
135
|
+
PricingTier: PricingTier
|
|
136
|
+
ProbeError: ProbeError
|
|
137
|
+
ProbeErrorKind: ProbeErrorKind
|
|
138
|
+
ProbeResult: ProbeResult
|
|
139
|
+
ProbeTarget: ProbeTarget
|
|
140
|
+
ProbedModel: ProbedModel
|
|
141
|
+
Protocol: Protocol
|
|
142
|
+
Provider: Provider
|
|
143
|
+
ProviderSave: ProviderSave
|
|
144
|
+
ReasoningConfig: ReasoningConfig
|
|
145
|
+
ReasoningDialect: ReasoningDialect
|
|
146
|
+
ReasoningEffort: ReasoningEffort
|
|
147
|
+
RunAccepted: RunAccepted
|
|
148
|
+
RunEvent: RunEvent
|
|
149
|
+
RunRequest: RunRequest
|
|
150
|
+
RunSnapshot: RunSnapshot
|
|
151
|
+
RunStatus: RunStatus
|
|
152
|
+
ScopeState: ScopeState
|
|
153
|
+
SearchCap: SearchCap
|
|
154
|
+
SearchHit: SearchHit
|
|
155
|
+
SearchKey: SearchKey
|
|
156
|
+
SearchPage: SearchPage
|
|
157
|
+
SearchPreferences: SearchPreferences
|
|
158
|
+
SearchProvider: SearchProvider
|
|
159
|
+
SearchResult: SearchResult
|
|
160
|
+
SearchSave: SearchSave
|
|
161
|
+
SearchSettingsDto: SearchSettingsDto
|
|
162
|
+
ServerDto: ServerDto
|
|
163
|
+
ServerSave: ServerSave
|
|
164
|
+
ServerSecret: ServerSecret
|
|
165
|
+
SkillDto: SkillDto
|
|
166
|
+
SkillFileKind: SkillFileKind
|
|
167
|
+
SkillFileMeta: SkillFileMeta
|
|
168
|
+
SkillMeta: SkillMeta
|
|
169
|
+
SkillOrigin: SkillOrigin
|
|
170
|
+
SkillRef: SkillRef
|
|
171
|
+
Source: Source
|
|
172
|
+
Status: Status
|
|
173
|
+
TokenRecord: TokenRecord
|
|
174
|
+
TokenUsage: TokenUsage
|
|
175
|
+
ToolDto: ToolDto
|
|
176
|
+
ToolEffect: ToolEffect
|
|
177
|
+
ToolOutcome: ToolOutcome
|
|
178
|
+
ToolSourceKind: ToolSourceKind
|
|
179
|
+
Turn: Turn
|
|
180
|
+
TurnStatus: TurnStatus
|
|
181
|
+
TypeSource: TypeSource
|
|
182
|
+
}
|
|
183
|
+
export type ContractName = keyof ContractMap
|
|
184
|
+
export type ContractValidator<T> = { (value: unknown): value is T; errors?: ErrorObject[] | null }
|
|
185
|
+
const validators: { [N in ContractName]: ContractValidator<ContractMap[N]> } = {
|
|
186
|
+
Ack: compiled.validateAck,
|
|
187
|
+
Approval: compiled.validateApproval,
|
|
188
|
+
ContextRef: compiled.validateContextRef,
|
|
189
|
+
ContextSource: compiled.validateContextSource,
|
|
190
|
+
ContextUsage: compiled.validateContextUsage,
|
|
191
|
+
Conversation: compiled.validateConversation,
|
|
192
|
+
ConversationSummary: compiled.validateConversationSummary,
|
|
193
|
+
Cost: compiled.validateCost,
|
|
194
|
+
Currency: compiled.validateCurrency,
|
|
195
|
+
Details: compiled.validateDetails,
|
|
196
|
+
EndStatus: compiled.validateEndStatus,
|
|
197
|
+
Endpoint: compiled.validateEndpoint,
|
|
198
|
+
EndpointKey: compiled.validateEndpointKey,
|
|
199
|
+
EndpointKeySave: compiled.validateEndpointKeySave,
|
|
200
|
+
EndpointSave: compiled.validateEndpointSave,
|
|
201
|
+
ImagePart: compiled.validateImagePart,
|
|
202
|
+
ImageRef: compiled.validateImageRef,
|
|
203
|
+
IngestBatch: compiled.validateIngestBatch,
|
|
204
|
+
IngestEntry: compiled.validateIngestEntry,
|
|
205
|
+
IngestLevel: compiled.validateIngestLevel,
|
|
206
|
+
IngestReceipt: compiled.validateIngestReceipt,
|
|
207
|
+
IssuedToken: compiled.validateIssuedToken,
|
|
208
|
+
KeyStrategy: compiled.validateKeyStrategy,
|
|
209
|
+
KitError: compiled.validateKitError,
|
|
210
|
+
KitErrorCode: compiled.validateKitErrorCode,
|
|
211
|
+
LogEntry: compiled.validateLogEntry,
|
|
212
|
+
LogLevel: compiled.validateLogLevel,
|
|
213
|
+
LogStatus: compiled.validateLogStatus,
|
|
214
|
+
ManualSave: compiled.validateManualSave,
|
|
215
|
+
McpTransport: compiled.validateMcpTransport,
|
|
216
|
+
Model: compiled.validateModel,
|
|
217
|
+
ModelFilter: compiled.validateModelFilter,
|
|
218
|
+
ModelOption: compiled.validateModelOption,
|
|
219
|
+
ModelPricing: compiled.validateModelPricing,
|
|
220
|
+
ModelRef: compiled.validateModelRef,
|
|
221
|
+
ModelSave: compiled.validateModelSave,
|
|
222
|
+
ModelType: compiled.validateModelType,
|
|
223
|
+
PermissionMode: compiled.validatePermissionMode,
|
|
224
|
+
Preview: compiled.validatePreview,
|
|
225
|
+
PreviewAction: compiled.validatePreviewAction,
|
|
226
|
+
PreviewCurrent: compiled.validatePreviewCurrent,
|
|
227
|
+
PricingTier: compiled.validatePricingTier,
|
|
228
|
+
ProbeError: compiled.validateProbeError,
|
|
229
|
+
ProbeErrorKind: compiled.validateProbeErrorKind,
|
|
230
|
+
ProbeResult: compiled.validateProbeResult,
|
|
231
|
+
ProbeTarget: compiled.validateProbeTarget,
|
|
232
|
+
ProbedModel: compiled.validateProbedModel,
|
|
233
|
+
Protocol: compiled.validateProtocol,
|
|
234
|
+
Provider: compiled.validateProvider,
|
|
235
|
+
ProviderSave: compiled.validateProviderSave,
|
|
236
|
+
ReasoningConfig: compiled.validateReasoningConfig,
|
|
237
|
+
ReasoningDialect: compiled.validateReasoningDialect,
|
|
238
|
+
ReasoningEffort: compiled.validateReasoningEffort,
|
|
239
|
+
RunAccepted: compiled.validateRunAccepted,
|
|
240
|
+
RunEvent: compiled.validateRunEvent,
|
|
241
|
+
RunRequest: compiled.validateRunRequest,
|
|
242
|
+
RunSnapshot: compiled.validateRunSnapshot,
|
|
243
|
+
RunStatus: compiled.validateRunStatus,
|
|
244
|
+
ScopeState: compiled.validateScopeState,
|
|
245
|
+
SearchCap: compiled.validateSearchCap,
|
|
246
|
+
SearchHit: compiled.validateSearchHit,
|
|
247
|
+
SearchKey: compiled.validateSearchKey,
|
|
248
|
+
SearchPage: compiled.validateSearchPage,
|
|
249
|
+
SearchPreferences: compiled.validateSearchPreferences,
|
|
250
|
+
SearchProvider: compiled.validateSearchProvider,
|
|
251
|
+
SearchResult: compiled.validateSearchResult,
|
|
252
|
+
SearchSave: compiled.validateSearchSave,
|
|
253
|
+
SearchSettingsDto: compiled.validateSearchSettingsDto,
|
|
254
|
+
ServerDto: compiled.validateServerDto,
|
|
255
|
+
ServerSave: compiled.validateServerSave,
|
|
256
|
+
ServerSecret: compiled.validateServerSecret,
|
|
257
|
+
SkillDto: compiled.validateSkillDto,
|
|
258
|
+
SkillFileKind: compiled.validateSkillFileKind,
|
|
259
|
+
SkillFileMeta: compiled.validateSkillFileMeta,
|
|
260
|
+
SkillMeta: compiled.validateSkillMeta,
|
|
261
|
+
SkillOrigin: compiled.validateSkillOrigin,
|
|
262
|
+
SkillRef: compiled.validateSkillRef,
|
|
263
|
+
Source: compiled.validateSource,
|
|
264
|
+
Status: compiled.validateStatus,
|
|
265
|
+
TokenRecord: compiled.validateTokenRecord,
|
|
266
|
+
TokenUsage: compiled.validateTokenUsage,
|
|
267
|
+
ToolDto: compiled.validateToolDto,
|
|
268
|
+
ToolEffect: compiled.validateToolEffect,
|
|
269
|
+
ToolOutcome: compiled.validateToolOutcome,
|
|
270
|
+
ToolSourceKind: compiled.validateToolSourceKind,
|
|
271
|
+
Turn: compiled.validateTurn,
|
|
272
|
+
TurnStatus: compiled.validateTurnStatus,
|
|
273
|
+
TypeSource: compiled.validateTypeSource
|
|
274
|
+
}
|
|
275
|
+
export function isContract<N extends ContractName>(name: N, value: unknown): value is ContractMap[N] {
|
|
276
|
+
return validators[name](value)
|
|
277
|
+
}
|
|
278
|
+
export function contractErrors(name: ContractName): readonly ErrorObject[] {
|
|
279
|
+
return validators[name].errors ?? []
|
|
280
|
+
}
|
|
281
|
+
export const validateAck: ContractValidator<Ack> = validators.Ack
|
|
282
|
+
export const validateApproval: ContractValidator<Approval> = validators.Approval
|
|
283
|
+
export const validateContextRef: ContractValidator<ContextRef> = validators.ContextRef
|
|
284
|
+
export const validateContextSource: ContractValidator<ContextSource> = validators.ContextSource
|
|
285
|
+
export const validateContextUsage: ContractValidator<ContextUsage> = validators.ContextUsage
|
|
286
|
+
export const validateConversation: ContractValidator<Conversation> = validators.Conversation
|
|
287
|
+
export const validateConversationSummary: ContractValidator<ConversationSummary> = validators.ConversationSummary
|
|
288
|
+
export const validateCost: ContractValidator<Cost> = validators.Cost
|
|
289
|
+
export const validateCurrency: ContractValidator<Currency> = validators.Currency
|
|
290
|
+
export const validateDetails: ContractValidator<Details> = validators.Details
|
|
291
|
+
export const validateEndStatus: ContractValidator<EndStatus> = validators.EndStatus
|
|
292
|
+
export const validateEndpoint: ContractValidator<Endpoint> = validators.Endpoint
|
|
293
|
+
export const validateEndpointKey: ContractValidator<EndpointKey> = validators.EndpointKey
|
|
294
|
+
export const validateEndpointKeySave: ContractValidator<EndpointKeySave> = validators.EndpointKeySave
|
|
295
|
+
export const validateEndpointSave: ContractValidator<EndpointSave> = validators.EndpointSave
|
|
296
|
+
export const validateImagePart: ContractValidator<ImagePart> = validators.ImagePart
|
|
297
|
+
export const validateImageRef: ContractValidator<ImageRef> = validators.ImageRef
|
|
298
|
+
export const validateIngestBatch: ContractValidator<IngestBatch> = validators.IngestBatch
|
|
299
|
+
export const validateIngestEntry: ContractValidator<IngestEntry> = validators.IngestEntry
|
|
300
|
+
export const validateIngestLevel: ContractValidator<IngestLevel> = validators.IngestLevel
|
|
301
|
+
export const validateIngestReceipt: ContractValidator<IngestReceipt> = validators.IngestReceipt
|
|
302
|
+
export const validateIssuedToken: ContractValidator<IssuedToken> = validators.IssuedToken
|
|
303
|
+
export const validateKeyStrategy: ContractValidator<KeyStrategy> = validators.KeyStrategy
|
|
304
|
+
export const validateKitError: ContractValidator<KitError> = validators.KitError
|
|
305
|
+
export const validateKitErrorCode: ContractValidator<KitErrorCode> = validators.KitErrorCode
|
|
306
|
+
export const validateLogEntry: ContractValidator<LogEntry> = validators.LogEntry
|
|
307
|
+
export const validateLogLevel: ContractValidator<LogLevel> = validators.LogLevel
|
|
308
|
+
export const validateLogStatus: ContractValidator<LogStatus> = validators.LogStatus
|
|
309
|
+
export const validateManualSave: ContractValidator<ManualSave> = validators.ManualSave
|
|
310
|
+
export const validateMcpTransport: ContractValidator<McpTransport> = validators.McpTransport
|
|
311
|
+
export const validateModel: ContractValidator<Model> = validators.Model
|
|
312
|
+
export const validateModelFilter: ContractValidator<ModelFilter> = validators.ModelFilter
|
|
313
|
+
export const validateModelOption: ContractValidator<ModelOption> = validators.ModelOption
|
|
314
|
+
export const validateModelPricing: ContractValidator<ModelPricing> = validators.ModelPricing
|
|
315
|
+
export const validateModelRef: ContractValidator<ModelRef> = validators.ModelRef
|
|
316
|
+
export const validateModelSave: ContractValidator<ModelSave> = validators.ModelSave
|
|
317
|
+
export const validateModelType: ContractValidator<ModelType> = validators.ModelType
|
|
318
|
+
export const validatePermissionMode: ContractValidator<PermissionMode> = validators.PermissionMode
|
|
319
|
+
export const validatePreview: ContractValidator<Preview> = validators.Preview
|
|
320
|
+
export const validatePreviewAction: ContractValidator<PreviewAction> = validators.PreviewAction
|
|
321
|
+
export const validatePreviewCurrent: ContractValidator<PreviewCurrent> = validators.PreviewCurrent
|
|
322
|
+
export const validatePricingTier: ContractValidator<PricingTier> = validators.PricingTier
|
|
323
|
+
export const validateProbeError: ContractValidator<ProbeError> = validators.ProbeError
|
|
324
|
+
export const validateProbeErrorKind: ContractValidator<ProbeErrorKind> = validators.ProbeErrorKind
|
|
325
|
+
export const validateProbeResult: ContractValidator<ProbeResult> = validators.ProbeResult
|
|
326
|
+
export const validateProbeTarget: ContractValidator<ProbeTarget> = validators.ProbeTarget
|
|
327
|
+
export const validateProbedModel: ContractValidator<ProbedModel> = validators.ProbedModel
|
|
328
|
+
export const validateProtocol: ContractValidator<Protocol> = validators.Protocol
|
|
329
|
+
export const validateProvider: ContractValidator<Provider> = validators.Provider
|
|
330
|
+
export const validateProviderSave: ContractValidator<ProviderSave> = validators.ProviderSave
|
|
331
|
+
export const validateReasoningConfig: ContractValidator<ReasoningConfig> = validators.ReasoningConfig
|
|
332
|
+
export const validateReasoningDialect: ContractValidator<ReasoningDialect> = validators.ReasoningDialect
|
|
333
|
+
export const validateReasoningEffort: ContractValidator<ReasoningEffort> = validators.ReasoningEffort
|
|
334
|
+
export const validateRunAccepted: ContractValidator<RunAccepted> = validators.RunAccepted
|
|
335
|
+
export const validateRunEvent: ContractValidator<RunEvent> = validators.RunEvent
|
|
336
|
+
export const validateRunRequest: ContractValidator<RunRequest> = validators.RunRequest
|
|
337
|
+
export const validateRunSnapshot: ContractValidator<RunSnapshot> = validators.RunSnapshot
|
|
338
|
+
export const validateRunStatus: ContractValidator<RunStatus> = validators.RunStatus
|
|
339
|
+
export const validateScopeState: ContractValidator<ScopeState> = validators.ScopeState
|
|
340
|
+
export const validateSearchCap: ContractValidator<SearchCap> = validators.SearchCap
|
|
341
|
+
export const validateSearchHit: ContractValidator<SearchHit> = validators.SearchHit
|
|
342
|
+
export const validateSearchKey: ContractValidator<SearchKey> = validators.SearchKey
|
|
343
|
+
export const validateSearchPage: ContractValidator<SearchPage> = validators.SearchPage
|
|
344
|
+
export const validateSearchPreferences: ContractValidator<SearchPreferences> = validators.SearchPreferences
|
|
345
|
+
export const validateSearchProvider: ContractValidator<SearchProvider> = validators.SearchProvider
|
|
346
|
+
export const validateSearchResult: ContractValidator<SearchResult> = validators.SearchResult
|
|
347
|
+
export const validateSearchSave: ContractValidator<SearchSave> = validators.SearchSave
|
|
348
|
+
export const validateSearchSettingsDto: ContractValidator<SearchSettingsDto> = validators.SearchSettingsDto
|
|
349
|
+
export const validateServerDto: ContractValidator<ServerDto> = validators.ServerDto
|
|
350
|
+
export const validateServerSave: ContractValidator<ServerSave> = validators.ServerSave
|
|
351
|
+
export const validateServerSecret: ContractValidator<ServerSecret> = validators.ServerSecret
|
|
352
|
+
export const validateSkillDto: ContractValidator<SkillDto> = validators.SkillDto
|
|
353
|
+
export const validateSkillFileKind: ContractValidator<SkillFileKind> = validators.SkillFileKind
|
|
354
|
+
export const validateSkillFileMeta: ContractValidator<SkillFileMeta> = validators.SkillFileMeta
|
|
355
|
+
export const validateSkillMeta: ContractValidator<SkillMeta> = validators.SkillMeta
|
|
356
|
+
export const validateSkillOrigin: ContractValidator<SkillOrigin> = validators.SkillOrigin
|
|
357
|
+
export const validateSkillRef: ContractValidator<SkillRef> = validators.SkillRef
|
|
358
|
+
export const validateSource: ContractValidator<Source> = validators.Source
|
|
359
|
+
export const validateStatus: ContractValidator<Status> = validators.Status
|
|
360
|
+
export const validateTokenRecord: ContractValidator<TokenRecord> = validators.TokenRecord
|
|
361
|
+
export const validateTokenUsage: ContractValidator<TokenUsage> = validators.TokenUsage
|
|
362
|
+
export const validateToolDto: ContractValidator<ToolDto> = validators.ToolDto
|
|
363
|
+
export const validateToolEffect: ContractValidator<ToolEffect> = validators.ToolEffect
|
|
364
|
+
export const validateToolOutcome: ContractValidator<ToolOutcome> = validators.ToolOutcome
|
|
365
|
+
export const validateToolSourceKind: ContractValidator<ToolSourceKind> = validators.ToolSourceKind
|
|
366
|
+
export const validateTurn: ContractValidator<Turn> = validators.Turn
|
|
367
|
+
export const validateTurnStatus: ContractValidator<TurnStatus> = validators.TurnStatus
|
|
368
|
+
export const validateTypeSource: ContractValidator<TypeSource> = validators.TypeSource
|