@lensagent/core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +48 -0
- package/config/lens.example.jsonc +92 -0
- package/config/pair.example.json +3 -0
- package/dist/adapters/executor.d.ts +35 -0
- package/dist/adapters/executor.js +296 -0
- package/dist/adapters/lsp.d.ts +18 -0
- package/dist/adapters/lsp.js +218 -0
- package/dist/adapters/mcp.d.ts +32 -0
- package/dist/adapters/mcp.js +283 -0
- package/dist/adapters/revert.d.ts +12 -0
- package/dist/adapters/revert.js +155 -0
- package/dist/config/runtime.d.ts +55 -0
- package/dist/config/runtime.js +371 -0
- package/dist/config/schema.d.ts +292 -0
- package/dist/config/schema.js +177 -0
- package/dist/contracts/adapter.d.ts +28 -0
- package/dist/contracts/adapter.js +8 -0
- package/dist/contracts/capability.d.ts +41 -0
- package/dist/contracts/capability.js +1 -0
- package/dist/contracts/domain.d.ts +61 -0
- package/dist/contracts/domain.js +1 -0
- package/dist/contracts/index.d.ts +5 -0
- package/dist/contracts/index.js +5 -0
- package/dist/contracts/model.d.ts +77 -0
- package/dist/contracts/model.js +1 -0
- package/dist/contracts/ports.d.ts +14 -0
- package/dist/contracts/ports.js +14 -0
- package/dist/core/access.d.ts +24 -0
- package/dist/core/access.js +205 -0
- package/dist/core/codec.d.ts +33 -0
- package/dist/core/codec.js +105 -0
- package/dist/core/domain.d.ts +13 -0
- package/dist/core/domain.js +24 -0
- package/dist/core/host.d.ts +19 -0
- package/dist/core/host.js +249 -0
- package/dist/core/identity.d.ts +19 -0
- package/dist/core/identity.js +54 -0
- package/dist/entry/bun.d.ts +1 -0
- package/dist/entry/bun.js +2 -0
- package/dist/entry/node.d.ts +2 -0
- package/dist/entry/node.js +3 -0
- package/dist/entry/rebuild.d.ts +1 -0
- package/dist/entry/rebuild.js +47 -0
- package/dist/entry/run.d.ts +1 -0
- package/dist/entry/run.js +43 -0
- package/dist/execution/lsp-process.d.ts +14 -0
- package/dist/execution/lsp-process.js +234 -0
- package/dist/http/server.d.ts +34 -0
- package/dist/http/server.js +1332 -0
- package/dist/launch.d.ts +3 -0
- package/dist/launch.js +4 -0
- package/dist/runtime/agent.d.ts +35 -0
- package/dist/runtime/agent.js +853 -0
- package/dist/runtime/artifacts.d.ts +15 -0
- package/dist/runtime/artifacts.js +72 -0
- package/dist/runtime/cache.d.ts +20 -0
- package/dist/runtime/cache.js +44 -0
- package/dist/runtime/calls.d.ts +21 -0
- package/dist/runtime/calls.js +130 -0
- package/dist/runtime/capabilities.d.ts +58 -0
- package/dist/runtime/capabilities.js +196 -0
- package/dist/runtime/cleanup.d.ts +7 -0
- package/dist/runtime/cleanup.js +33 -0
- package/dist/runtime/context.d.ts +34 -0
- package/dist/runtime/context.js +169 -0
- package/dist/runtime/diagnostics.d.ts +8 -0
- package/dist/runtime/diagnostics.js +71 -0
- package/dist/runtime/events.d.ts +22 -0
- package/dist/runtime/events.js +131 -0
- package/dist/runtime/kernel-capabilities.d.ts +32 -0
- package/dist/runtime/kernel-capabilities.js +200 -0
- package/dist/runtime/manifests.d.ts +14 -0
- package/dist/runtime/manifests.js +117 -0
- package/dist/runtime/model.d.ts +20 -0
- package/dist/runtime/model.js +241 -0
- package/dist/runtime/observability.d.ts +22 -0
- package/dist/runtime/observability.js +104 -0
- package/dist/runtime/policy.d.ts +8 -0
- package/dist/runtime/policy.js +31 -0
- package/dist/runtime/profile.d.ts +8 -0
- package/dist/runtime/profile.js +52 -0
- package/dist/runtime/projects.d.ts +40 -0
- package/dist/runtime/projects.js +115 -0
- package/dist/runtime/results.d.ts +7 -0
- package/dist/runtime/results.js +55 -0
- package/dist/runtime/review.d.ts +9 -0
- package/dist/runtime/review.js +54 -0
- package/dist/runtime/scheduler.d.ts +15 -0
- package/dist/runtime/scheduler.js +85 -0
- package/dist/runtime/skills.d.ts +2 -0
- package/dist/runtime/skills.js +83 -0
- package/dist/runtime/tokenizer.d.ts +8 -0
- package/dist/runtime/tokenizer.js +30 -0
- package/dist/store/database.d.ts +3 -0
- package/dist/store/database.js +49 -0
- package/dist/store/event-log.d.ts +19 -0
- package/dist/store/event-log.js +61 -0
- package/dist/store/schema.d.ts +1 -0
- package/dist/store/schema.js +347 -0
- package/dist/store/store.d.ts +344 -0
- package/dist/store/store.js +2554 -0
- package/package.json +73 -0
- package/proto/executor.proto +314 -0
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import { type Static } from '@sinclair/typebox';
|
|
2
|
+
export declare const ModelHarnessProfileSchema: import("@sinclair/typebox").TObject<{
|
|
3
|
+
version: import("@sinclair/typebox").TInteger;
|
|
4
|
+
systemPrompt: import("@sinclair/typebox").TObject<{
|
|
5
|
+
sourceVersion: import("@sinclair/typebox").TString;
|
|
6
|
+
content: import("@sinclair/typebox").TString;
|
|
7
|
+
container: import("@sinclair/typebox").TLiteral<"system">;
|
|
8
|
+
}>;
|
|
9
|
+
context: import("@sinclair/typebox").TObject<{
|
|
10
|
+
segmentOrder: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
11
|
+
preserveProviderVisibleOrder: import("@sinclair/typebox").TLiteral<true>;
|
|
12
|
+
allowExternalTransforms: import("@sinclair/typebox").TLiteral<false>;
|
|
13
|
+
}>;
|
|
14
|
+
semantics: import("@sinclair/typebox").TObject<{
|
|
15
|
+
reasoningStateRoundTrip: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"required">, import("@sinclair/typebox").TLiteral<"optional">, import("@sinclair/typebox").TLiteral<"forbidden">]>;
|
|
16
|
+
thinkingContinuation: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"required">, import("@sinclair/typebox").TLiteral<"optional">, import("@sinclair/typebox").TLiteral<"forbidden">]>;
|
|
17
|
+
toolResultOrder: import("@sinclair/typebox").TLiteral<"call_ordinal">;
|
|
18
|
+
structuredOutput: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"supported">, import("@sinclair/typebox").TLiteral<"unsupported">]>;
|
|
19
|
+
toolDescriptionStyle: import("@sinclair/typebox").TString;
|
|
20
|
+
recoveryConstraints: import("@sinclair/typebox").TObject<{
|
|
21
|
+
partialResponseResume: import("@sinclair/typebox").TLiteral<"forbidden">;
|
|
22
|
+
preserveReasoningState: import("@sinclair/typebox").TBoolean;
|
|
23
|
+
}>;
|
|
24
|
+
}>;
|
|
25
|
+
ptc: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
26
|
+
enabledByDefault: import("@sinclair/typebox").TBoolean;
|
|
27
|
+
maxToolCalls: import("@sinclair/typebox").TInteger;
|
|
28
|
+
schemaVersion: import("@sinclair/typebox").TString;
|
|
29
|
+
instruction: import("@sinclair/typebox").TString;
|
|
30
|
+
}>>;
|
|
31
|
+
effort: import("@sinclair/typebox").TObject<{
|
|
32
|
+
allowed: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
33
|
+
default: import("@sinclair/typebox").TString;
|
|
34
|
+
}>;
|
|
35
|
+
cache: import("@sinclair/typebox").TObject<{
|
|
36
|
+
enabledByDefault: import("@sinclair/typebox").TBoolean;
|
|
37
|
+
minimumEligiblePrefixTokens: import("@sinclair/typebox").TInteger;
|
|
38
|
+
maximumBreakpoints: import("@sinclair/typebox").TInteger;
|
|
39
|
+
segmentStability: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"stable">, import("@sinclair/typebox").TLiteral<"dynamic">, import("@sinclair/typebox").TLiteral<"unknown">]>>;
|
|
40
|
+
}>;
|
|
41
|
+
}>;
|
|
42
|
+
export declare const ConfigSchema: import("@sinclair/typebox").TObject<{
|
|
43
|
+
listen: import("@sinclair/typebox").TObject<{
|
|
44
|
+
host: import("@sinclair/typebox").TString;
|
|
45
|
+
port: import("@sinclair/typebox").TInteger;
|
|
46
|
+
}>;
|
|
47
|
+
tls: import("@sinclair/typebox").TObject<{
|
|
48
|
+
enabled: import("@sinclair/typebox").TBoolean;
|
|
49
|
+
certFile: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
50
|
+
keyFile: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
51
|
+
}>;
|
|
52
|
+
database: import("@sinclair/typebox").TObject<{
|
|
53
|
+
path: import("@sinclair/typebox").TString;
|
|
54
|
+
}>;
|
|
55
|
+
pairPath: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
56
|
+
shutdown: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
57
|
+
graceMs: import("@sinclair/typebox").TInteger;
|
|
58
|
+
}>>;
|
|
59
|
+
executor: import("@sinclair/typebox").TObject<{
|
|
60
|
+
address: import("@sinclair/typebox").TString;
|
|
61
|
+
identityPath: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
62
|
+
tls: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
63
|
+
enabled: import("@sinclair/typebox").TBoolean;
|
|
64
|
+
caFile: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
65
|
+
certFile: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
66
|
+
keyFile: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
67
|
+
}>>;
|
|
68
|
+
}>;
|
|
69
|
+
artifacts: import("@sinclair/typebox").TObject<{
|
|
70
|
+
directory: import("@sinclair/typebox").TString;
|
|
71
|
+
}>;
|
|
72
|
+
persistence: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
73
|
+
eventLog: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
74
|
+
enabled: import("@sinclair/typebox").TBoolean;
|
|
75
|
+
path: import("@sinclair/typebox").TString;
|
|
76
|
+
fsync: import("@sinclair/typebox").TBoolean;
|
|
77
|
+
}>>;
|
|
78
|
+
contentStore: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
79
|
+
mode: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"filesystem">, import("@sinclair/typebox").TLiteral<"content_addressed">]>;
|
|
80
|
+
}>>;
|
|
81
|
+
}>>;
|
|
82
|
+
observability: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
83
|
+
logs: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
84
|
+
enabled: import("@sinclair/typebox").TBoolean;
|
|
85
|
+
path: import("@sinclair/typebox").TString;
|
|
86
|
+
maxFileBytes: import("@sinclair/typebox").TInteger;
|
|
87
|
+
maxFiles: import("@sinclair/typebox").TInteger;
|
|
88
|
+
retentionDays: import("@sinclair/typebox").TInteger;
|
|
89
|
+
}>>;
|
|
90
|
+
traces: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
91
|
+
capacity: import("@sinclair/typebox").TInteger;
|
|
92
|
+
}>>;
|
|
93
|
+
}>>;
|
|
94
|
+
mcpServers: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
95
|
+
endpoint: import("@sinclair/typebox").TString;
|
|
96
|
+
headers: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
97
|
+
env: import("@sinclair/typebox").TString;
|
|
98
|
+
optional: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
99
|
+
}>]>>>;
|
|
100
|
+
timeoutMs: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
101
|
+
outputLimitBytes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
102
|
+
}>>>;
|
|
103
|
+
lspServers: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
104
|
+
command: import("@sinclair/typebox").TString;
|
|
105
|
+
args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
106
|
+
project: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
107
|
+
initializationOptions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
|
|
108
|
+
maxFrameBytes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
109
|
+
maxBufferBytes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
110
|
+
}>>>;
|
|
111
|
+
providers: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
112
|
+
adapter: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"@ai-sdk/openai">, import("@sinclair/typebox").TLiteral<"@ai-sdk/anthropic">, import("@sinclair/typebox").TLiteral<"@ai-sdk/openai-compatible">]>;
|
|
113
|
+
options: import("@sinclair/typebox").TObject<{
|
|
114
|
+
apiKey: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
115
|
+
env: import("@sinclair/typebox").TString;
|
|
116
|
+
optional: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
117
|
+
}>]>>;
|
|
118
|
+
baseURL: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
119
|
+
headers: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString>>;
|
|
120
|
+
}>;
|
|
121
|
+
models: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
122
|
+
contextWindowTokens: import("@sinclair/typebox").TInteger;
|
|
123
|
+
wireModel: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
124
|
+
harnessProfile: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
125
|
+
usageReliable: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
126
|
+
cacheSupported: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
127
|
+
programmaticToolCallingSupported: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
128
|
+
}>>;
|
|
129
|
+
}>>;
|
|
130
|
+
modelHarnessProfiles: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
131
|
+
version: import("@sinclair/typebox").TInteger;
|
|
132
|
+
systemPrompt: import("@sinclair/typebox").TObject<{
|
|
133
|
+
sourceVersion: import("@sinclair/typebox").TString;
|
|
134
|
+
content: import("@sinclair/typebox").TString;
|
|
135
|
+
container: import("@sinclair/typebox").TLiteral<"system">;
|
|
136
|
+
}>;
|
|
137
|
+
context: import("@sinclair/typebox").TObject<{
|
|
138
|
+
segmentOrder: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
139
|
+
preserveProviderVisibleOrder: import("@sinclair/typebox").TLiteral<true>;
|
|
140
|
+
allowExternalTransforms: import("@sinclair/typebox").TLiteral<false>;
|
|
141
|
+
}>;
|
|
142
|
+
semantics: import("@sinclair/typebox").TObject<{
|
|
143
|
+
reasoningStateRoundTrip: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"required">, import("@sinclair/typebox").TLiteral<"optional">, import("@sinclair/typebox").TLiteral<"forbidden">]>;
|
|
144
|
+
thinkingContinuation: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"required">, import("@sinclair/typebox").TLiteral<"optional">, import("@sinclair/typebox").TLiteral<"forbidden">]>;
|
|
145
|
+
toolResultOrder: import("@sinclair/typebox").TLiteral<"call_ordinal">;
|
|
146
|
+
structuredOutput: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"supported">, import("@sinclair/typebox").TLiteral<"unsupported">]>;
|
|
147
|
+
toolDescriptionStyle: import("@sinclair/typebox").TString;
|
|
148
|
+
recoveryConstraints: import("@sinclair/typebox").TObject<{
|
|
149
|
+
partialResponseResume: import("@sinclair/typebox").TLiteral<"forbidden">;
|
|
150
|
+
preserveReasoningState: import("@sinclair/typebox").TBoolean;
|
|
151
|
+
}>;
|
|
152
|
+
}>;
|
|
153
|
+
ptc: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
154
|
+
enabledByDefault: import("@sinclair/typebox").TBoolean;
|
|
155
|
+
maxToolCalls: import("@sinclair/typebox").TInteger;
|
|
156
|
+
schemaVersion: import("@sinclair/typebox").TString;
|
|
157
|
+
instruction: import("@sinclair/typebox").TString;
|
|
158
|
+
}>>;
|
|
159
|
+
effort: import("@sinclair/typebox").TObject<{
|
|
160
|
+
allowed: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
161
|
+
default: import("@sinclair/typebox").TString;
|
|
162
|
+
}>;
|
|
163
|
+
cache: import("@sinclair/typebox").TObject<{
|
|
164
|
+
enabledByDefault: import("@sinclair/typebox").TBoolean;
|
|
165
|
+
minimumEligiblePrefixTokens: import("@sinclair/typebox").TInteger;
|
|
166
|
+
maximumBreakpoints: import("@sinclair/typebox").TInteger;
|
|
167
|
+
segmentStability: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"stable">, import("@sinclair/typebox").TLiteral<"dynamic">, import("@sinclair/typebox").TLiteral<"unknown">]>>;
|
|
168
|
+
}>;
|
|
169
|
+
}>>>;
|
|
170
|
+
roles: import("@sinclair/typebox").TObject<{
|
|
171
|
+
agent: import("@sinclair/typebox").TObject<{
|
|
172
|
+
model: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
173
|
+
modelReasoningEffort: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
174
|
+
policyPreset: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
175
|
+
capabilities: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
176
|
+
contextStrategy: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
177
|
+
providerRouting: import("@sinclair/typebox").TObject<{
|
|
178
|
+
retryMaxAttempts: import("@sinclair/typebox").TInteger;
|
|
179
|
+
fallback: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
180
|
+
}>;
|
|
181
|
+
}>;
|
|
182
|
+
subagent: import("@sinclair/typebox").TObject<{
|
|
183
|
+
model: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
184
|
+
modelReasoningEffort: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
185
|
+
policyPreset: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
186
|
+
capabilities: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
187
|
+
contextStrategy: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
188
|
+
providerRouting: import("@sinclair/typebox").TObject<{
|
|
189
|
+
retryMaxAttempts: import("@sinclair/typebox").TInteger;
|
|
190
|
+
fallback: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
191
|
+
}>;
|
|
192
|
+
}>;
|
|
193
|
+
compactor: import("@sinclair/typebox").TObject<{
|
|
194
|
+
model: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
195
|
+
modelReasoningEffort: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
196
|
+
policyPreset: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
197
|
+
capabilities: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
198
|
+
contextStrategy: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
199
|
+
providerRouting: import("@sinclair/typebox").TObject<{
|
|
200
|
+
retryMaxAttempts: import("@sinclair/typebox").TInteger;
|
|
201
|
+
fallback: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
202
|
+
}>;
|
|
203
|
+
}>;
|
|
204
|
+
'auto-review': import("@sinclair/typebox").TObject<{
|
|
205
|
+
model: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
206
|
+
modelReasoningEffort: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
207
|
+
policyPreset: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
208
|
+
capabilities: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
209
|
+
contextStrategy: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
210
|
+
providerRouting: import("@sinclair/typebox").TObject<{
|
|
211
|
+
retryMaxAttempts: import("@sinclair/typebox").TInteger;
|
|
212
|
+
fallback: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
213
|
+
}>;
|
|
214
|
+
}>;
|
|
215
|
+
}>;
|
|
216
|
+
tokenizer: import("@sinclair/typebox").TObject<{
|
|
217
|
+
mode: import("@sinclair/typebox").TLiteral<"universal_tel">;
|
|
218
|
+
version: import("@sinclair/typebox").TInteger;
|
|
219
|
+
}>;
|
|
220
|
+
policyPresets: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
221
|
+
capabilities: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"read_only">, import("@sinclair/typebox").TLiteral<"workspace_write">, import("@sinclair/typebox").TLiteral<"external">, import("@sinclair/typebox").TLiteral<"ask">, import("@sinclair/typebox").TLiteral<"auto_approve">, import("@sinclair/typebox").TLiteral<"full_access">]>>;
|
|
222
|
+
}>>;
|
|
223
|
+
concurrency: import("@sinclair/typebox").TObject<{
|
|
224
|
+
instanceMax: import("@sinclair/typebox").TInteger;
|
|
225
|
+
perStepMax: import("@sinclair/typebox").TInteger;
|
|
226
|
+
perAdapterMax: import("@sinclair/typebox").TInteger;
|
|
227
|
+
}>;
|
|
228
|
+
worker: import("@sinclair/typebox").TObject<{
|
|
229
|
+
timeoutMs: import("@sinclair/typebox").TInteger;
|
|
230
|
+
outputLimitBytes: import("@sinclair/typebox").TInteger;
|
|
231
|
+
}>;
|
|
232
|
+
contextBudget: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
233
|
+
outputReserveTokens: import("@sinclair/typebox").TInteger;
|
|
234
|
+
safetyMarginTokens: import("@sinclair/typebox").TInteger;
|
|
235
|
+
}>>;
|
|
236
|
+
capabilityInput: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
237
|
+
catalogMaxTokens: import("@sinclair/typebox").TInteger;
|
|
238
|
+
searchResultMaxTokens: import("@sinclair/typebox").TInteger;
|
|
239
|
+
}>>;
|
|
240
|
+
contextProjection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
241
|
+
toolResultMaxTokens: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
242
|
+
snip: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
243
|
+
triggerTokens: import("@sinclair/typebox").TInteger;
|
|
244
|
+
retainedTokens: import("@sinclair/typebox").TInteger;
|
|
245
|
+
}>>;
|
|
246
|
+
microcompact: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
247
|
+
triggerTokens: import("@sinclair/typebox").TInteger;
|
|
248
|
+
projectedTokens: import("@sinclair/typebox").TInteger;
|
|
249
|
+
}>>;
|
|
250
|
+
contextCollapse: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
251
|
+
triggerTokens: import("@sinclair/typebox").TInteger;
|
|
252
|
+
projectedTokens: import("@sinclair/typebox").TInteger;
|
|
253
|
+
}>>;
|
|
254
|
+
stageVersion: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
255
|
+
}>>;
|
|
256
|
+
compaction: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
257
|
+
preservedSegmentTokens: import("@sinclair/typebox").TInteger;
|
|
258
|
+
preservedSegmentBytes: import("@sinclair/typebox").TInteger;
|
|
259
|
+
summaryMaxTokens: import("@sinclair/typebox").TInteger;
|
|
260
|
+
}>>;
|
|
261
|
+
autoReview: import("@sinclair/typebox").TObject<{
|
|
262
|
+
timeoutMs: import("@sinclair/typebox").TInteger;
|
|
263
|
+
goalMaxBytes: import("@sinclair/typebox").TInteger;
|
|
264
|
+
}>;
|
|
265
|
+
executive: import("@sinclair/typebox").TObject<{
|
|
266
|
+
verification: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
267
|
+
id: import("@sinclair/typebox").TString;
|
|
268
|
+
description: import("@sinclair/typebox").TString;
|
|
269
|
+
}>>;
|
|
270
|
+
}>;
|
|
271
|
+
providerPromptCache: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
272
|
+
enabled: import("@sinclair/typebox").TBoolean;
|
|
273
|
+
minimumEligiblePrefixTokens: import("@sinclair/typebox").TInteger;
|
|
274
|
+
maximumBreakpoints: import("@sinclair/typebox").TInteger;
|
|
275
|
+
}>>;
|
|
276
|
+
historyRetention: import("@sinclair/typebox").TObject<{
|
|
277
|
+
purgeMode: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"manual">, import("@sinclair/typebox").TLiteral<"after_days">]>;
|
|
278
|
+
purgeArchivedAfterDays: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>;
|
|
279
|
+
}>;
|
|
280
|
+
snapshot: import("@sinclair/typebox").TObject<{
|
|
281
|
+
maxRuntimeEntities: import("@sinclair/typebox").TInteger;
|
|
282
|
+
pageSizeDefault: import("@sinclair/typebox").TInteger;
|
|
283
|
+
pageSizeMax: import("@sinclair/typebox").TInteger;
|
|
284
|
+
}>;
|
|
285
|
+
sse: import("@sinclair/typebox").TObject<{
|
|
286
|
+
heartbeatIntervalMs: import("@sinclair/typebox").TInteger;
|
|
287
|
+
maxBufferedEvents: import("@sinclair/typebox").TInteger;
|
|
288
|
+
maxBufferedBytes: import("@sinclair/typebox").TInteger;
|
|
289
|
+
}>;
|
|
290
|
+
}>;
|
|
291
|
+
export type HarnessConfig = Static<typeof ConfigSchema>;
|
|
292
|
+
export type ModelHarnessProfile = Static<typeof ModelHarnessProfileSchema>;
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { Type } from '@sinclair/typebox';
|
|
2
|
+
const NullableString = Type.Union([Type.String({ minLength: 1 }), Type.Null()]);
|
|
3
|
+
const PositiveInteger = Type.Integer({ minimum: 1 });
|
|
4
|
+
const Secret = Type.Union([
|
|
5
|
+
Type.String({ minLength: 1 }),
|
|
6
|
+
Type.Object({ env: Type.String({ minLength: 1 }), optional: Type.Optional(Type.Boolean()) }, { additionalProperties: false })
|
|
7
|
+
]);
|
|
8
|
+
const Routing = Type.Object({
|
|
9
|
+
retryMaxAttempts: Type.Integer({ minimum: 1, maximum: 10 }),
|
|
10
|
+
fallback: Type.Array(Type.String({ minLength: 3 }))
|
|
11
|
+
}, { additionalProperties: false });
|
|
12
|
+
const Role = Type.Object({
|
|
13
|
+
model: NullableString,
|
|
14
|
+
modelReasoningEffort: NullableString,
|
|
15
|
+
policyPreset: NullableString,
|
|
16
|
+
capabilities: Type.Array(Type.String({ minLength: 1 })),
|
|
17
|
+
contextStrategy: NullableString,
|
|
18
|
+
providerRouting: Routing
|
|
19
|
+
}, { additionalProperties: false });
|
|
20
|
+
const SegmentStability = Type.Union([Type.Literal('stable'), Type.Literal('dynamic'), Type.Literal('unknown')]);
|
|
21
|
+
export const ModelHarnessProfileSchema = Type.Object({
|
|
22
|
+
version: PositiveInteger,
|
|
23
|
+
systemPrompt: Type.Object({
|
|
24
|
+
sourceVersion: Type.String({ minLength: 1 }),
|
|
25
|
+
content: Type.String({ minLength: 1 }),
|
|
26
|
+
container: Type.Literal('system')
|
|
27
|
+
}, { additionalProperties: false }),
|
|
28
|
+
context: Type.Object({
|
|
29
|
+
segmentOrder: Type.Array(Type.String({ minLength: 1 }), { minItems: 1, uniqueItems: true }),
|
|
30
|
+
preserveProviderVisibleOrder: Type.Literal(true),
|
|
31
|
+
allowExternalTransforms: Type.Literal(false)
|
|
32
|
+
}, { additionalProperties: false }),
|
|
33
|
+
semantics: Type.Object({
|
|
34
|
+
reasoningStateRoundTrip: Type.Union([Type.Literal('required'), Type.Literal('optional'), Type.Literal('forbidden')]),
|
|
35
|
+
thinkingContinuation: Type.Union([Type.Literal('required'), Type.Literal('optional'), Type.Literal('forbidden')]),
|
|
36
|
+
toolResultOrder: Type.Literal('call_ordinal'),
|
|
37
|
+
structuredOutput: Type.Union([Type.Literal('supported'), Type.Literal('unsupported')]),
|
|
38
|
+
toolDescriptionStyle: Type.String({ minLength: 1 }),
|
|
39
|
+
recoveryConstraints: Type.Object({
|
|
40
|
+
partialResponseResume: Type.Literal('forbidden'),
|
|
41
|
+
preserveReasoningState: Type.Boolean()
|
|
42
|
+
}, { additionalProperties: false })
|
|
43
|
+
}, { additionalProperties: false }),
|
|
44
|
+
ptc: Type.Optional(Type.Object({
|
|
45
|
+
enabledByDefault: Type.Boolean(),
|
|
46
|
+
maxToolCalls: PositiveInteger,
|
|
47
|
+
schemaVersion: Type.String({ minLength: 1 }),
|
|
48
|
+
instruction: Type.String({ minLength: 1 })
|
|
49
|
+
}, { additionalProperties: false })),
|
|
50
|
+
effort: Type.Object({
|
|
51
|
+
allowed: Type.Array(Type.String({ minLength: 1, maxLength: 64, pattern: '^[A-Za-z0-9._:-]+$' }), { minItems: 1, uniqueItems: true }),
|
|
52
|
+
default: Type.String({ minLength: 1, maxLength: 64, pattern: '^[A-Za-z0-9._:-]+$' })
|
|
53
|
+
}, { additionalProperties: false }),
|
|
54
|
+
cache: Type.Object({
|
|
55
|
+
enabledByDefault: Type.Boolean(),
|
|
56
|
+
minimumEligiblePrefixTokens: PositiveInteger,
|
|
57
|
+
maximumBreakpoints: Type.Integer({ minimum: 0 }),
|
|
58
|
+
segmentStability: Type.Record(Type.String(), SegmentStability)
|
|
59
|
+
}, { additionalProperties: false })
|
|
60
|
+
}, { additionalProperties: false });
|
|
61
|
+
export const ConfigSchema = Type.Object({
|
|
62
|
+
listen: Type.Object({ host: Type.String({ minLength: 1 }), port: Type.Integer({ minimum: 1, maximum: 65535 }) }, { additionalProperties: false }),
|
|
63
|
+
tls: Type.Object({ enabled: Type.Boolean(), certFile: NullableString, keyFile: NullableString }, { additionalProperties: false }),
|
|
64
|
+
database: Type.Object({ path: Type.String({ minLength: 1 }) }, { additionalProperties: false }),
|
|
65
|
+
pairPath: Type.Optional(Type.String({ minLength: 1, default: 'config/pair.json' })),
|
|
66
|
+
// Upper bound on the ordered shutdown. Read only when a stop begins, so a change takes effect on
|
|
67
|
+
// the next stop and this stays a hot setting rather than a restart-only one.
|
|
68
|
+
shutdown: Type.Optional(Type.Object({
|
|
69
|
+
graceMs: Type.Integer({ minimum: 0, maximum: 600000, default: 30000 })
|
|
70
|
+
}, { additionalProperties: false })),
|
|
71
|
+
executor: Type.Object({
|
|
72
|
+
address: Type.String({ minLength: 1 }),
|
|
73
|
+
identityPath: Type.Optional(Type.String({ minLength: 1 })),
|
|
74
|
+
tls: Type.Optional(Type.Object({
|
|
75
|
+
enabled: Type.Boolean(),
|
|
76
|
+
caFile: Type.Optional(Type.String({ minLength: 1 })),
|
|
77
|
+
certFile: Type.Optional(Type.String({ minLength: 1 })),
|
|
78
|
+
keyFile: Type.Optional(Type.String({ minLength: 1 }))
|
|
79
|
+
}, { additionalProperties: false }))
|
|
80
|
+
}, { additionalProperties: false }),
|
|
81
|
+
artifacts: Type.Object({ directory: Type.String({ minLength: 1 }) }, { additionalProperties: false }),
|
|
82
|
+
persistence: Type.Optional(Type.Object({
|
|
83
|
+
eventLog: Type.Optional(Type.Object({
|
|
84
|
+
enabled: Type.Boolean(), path: Type.String({ minLength: 1 }), fsync: Type.Boolean()
|
|
85
|
+
}, { additionalProperties: false })),
|
|
86
|
+
contentStore: Type.Optional(Type.Object({ mode: Type.Union([Type.Literal('filesystem'), Type.Literal('content_addressed')]) }, { additionalProperties: false }))
|
|
87
|
+
}, { additionalProperties: false })),
|
|
88
|
+
observability: Type.Optional(Type.Object({
|
|
89
|
+
logs: Type.Optional(Type.Object({
|
|
90
|
+
enabled: Type.Boolean(),
|
|
91
|
+
path: Type.String({ minLength: 1 }),
|
|
92
|
+
maxFileBytes: PositiveInteger,
|
|
93
|
+
maxFiles: PositiveInteger,
|
|
94
|
+
retentionDays: PositiveInteger
|
|
95
|
+
}, { additionalProperties: false })),
|
|
96
|
+
traces: Type.Optional(Type.Object({ capacity: PositiveInteger }, { additionalProperties: false }))
|
|
97
|
+
}, { additionalProperties: false })),
|
|
98
|
+
mcpServers: Type.Optional(Type.Record(Type.String({ pattern: '^[a-z0-9][a-z0-9._-]{0,63}$' }), Type.Object({
|
|
99
|
+
endpoint: Type.String({ minLength: 1 }),
|
|
100
|
+
headers: Type.Optional(Type.Record(Type.String(), Secret)),
|
|
101
|
+
timeoutMs: Type.Optional(PositiveInteger),
|
|
102
|
+
outputLimitBytes: Type.Optional(PositiveInteger)
|
|
103
|
+
}, { additionalProperties: false }))),
|
|
104
|
+
lspServers: Type.Optional(Type.Record(Type.String({ pattern: '^[a-z0-9][a-z0-9._-]{0,63}$' }), Type.Object({
|
|
105
|
+
command: Type.String({ minLength: 1 }),
|
|
106
|
+
args: Type.Optional(Type.Array(Type.String())),
|
|
107
|
+
project: Type.Optional(Type.String()),
|
|
108
|
+
initializationOptions: Type.Optional(Type.Unknown()),
|
|
109
|
+
maxFrameBytes: Type.Optional(PositiveInteger),
|
|
110
|
+
maxBufferBytes: Type.Optional(PositiveInteger)
|
|
111
|
+
}, { additionalProperties: false }))),
|
|
112
|
+
providers: Type.Record(Type.String({ minLength: 1 }), Type.Object({
|
|
113
|
+
adapter: Type.Union([
|
|
114
|
+
Type.Literal('@ai-sdk/openai'),
|
|
115
|
+
Type.Literal('@ai-sdk/anthropic'),
|
|
116
|
+
Type.Literal('@ai-sdk/openai-compatible')
|
|
117
|
+
]),
|
|
118
|
+
options: Type.Object({
|
|
119
|
+
apiKey: Type.Optional(Secret),
|
|
120
|
+
baseURL: Type.Optional(Type.String({ minLength: 1 })),
|
|
121
|
+
headers: Type.Optional(Type.Record(Type.String(), Type.String()))
|
|
122
|
+
}, { additionalProperties: false }),
|
|
123
|
+
models: Type.Record(Type.String({ minLength: 1 }), Type.Object({
|
|
124
|
+
contextWindowTokens: PositiveInteger,
|
|
125
|
+
wireModel: Type.Optional(Type.String({ minLength: 1 })),
|
|
126
|
+
harnessProfile: Type.Optional(Type.String({ minLength: 1 })),
|
|
127
|
+
usageReliable: Type.Optional(Type.Boolean()),
|
|
128
|
+
cacheSupported: Type.Optional(Type.Boolean()),
|
|
129
|
+
programmaticToolCallingSupported: Type.Optional(Type.Boolean())
|
|
130
|
+
}, { additionalProperties: false }))
|
|
131
|
+
}, { additionalProperties: false })),
|
|
132
|
+
modelHarnessProfiles: Type.Optional(Type.Record(Type.String({ minLength: 1 }), ModelHarnessProfileSchema)),
|
|
133
|
+
roles: Type.Object({ agent: Role, subagent: Role, compactor: Role, 'auto-review': Role }, { additionalProperties: false }),
|
|
134
|
+
tokenizer: Type.Object({ mode: Type.Literal('universal_tel'), version: Type.Integer({ minimum: 1 }) }, { additionalProperties: false }),
|
|
135
|
+
policyPresets: Type.Record(Type.String({ minLength: 1 }), Type.Object({
|
|
136
|
+
capabilities: Type.Record(Type.String(), Type.Union([
|
|
137
|
+
Type.Literal('read_only'), Type.Literal('workspace_write'), Type.Literal('external'),
|
|
138
|
+
Type.Literal('ask'), Type.Literal('auto_approve'), Type.Literal('full_access')
|
|
139
|
+
]))
|
|
140
|
+
}, { additionalProperties: false })),
|
|
141
|
+
concurrency: Type.Object({ instanceMax: PositiveInteger, perStepMax: PositiveInteger, perAdapterMax: PositiveInteger }, { additionalProperties: false }),
|
|
142
|
+
worker: Type.Object({ timeoutMs: PositiveInteger, outputLimitBytes: PositiveInteger }, { additionalProperties: false }),
|
|
143
|
+
contextBudget: Type.Optional(Type.Object({ outputReserveTokens: PositiveInteger, safetyMarginTokens: PositiveInteger }, { additionalProperties: false })),
|
|
144
|
+
capabilityInput: Type.Optional(Type.Object({ catalogMaxTokens: PositiveInteger, searchResultMaxTokens: PositiveInteger }, { additionalProperties: false })),
|
|
145
|
+
contextProjection: Type.Optional(Type.Object({
|
|
146
|
+
toolResultMaxTokens: Type.Optional(PositiveInteger),
|
|
147
|
+
snip: Type.Optional(Type.Object({ triggerTokens: PositiveInteger, retainedTokens: PositiveInteger }, { additionalProperties: false })),
|
|
148
|
+
microcompact: Type.Optional(Type.Object({ triggerTokens: PositiveInteger, projectedTokens: PositiveInteger }, { additionalProperties: false })),
|
|
149
|
+
contextCollapse: Type.Optional(Type.Object({ triggerTokens: PositiveInteger, projectedTokens: PositiveInteger }, { additionalProperties: false })),
|
|
150
|
+
stageVersion: Type.Optional(Type.String({ minLength: 1 }))
|
|
151
|
+
}, { additionalProperties: false })),
|
|
152
|
+
compaction: Type.Optional(Type.Object({
|
|
153
|
+
preservedSegmentTokens: PositiveInteger,
|
|
154
|
+
preservedSegmentBytes: PositiveInteger,
|
|
155
|
+
summaryMaxTokens: PositiveInteger
|
|
156
|
+
}, { additionalProperties: false })),
|
|
157
|
+
autoReview: Type.Object({ timeoutMs: PositiveInteger, goalMaxBytes: PositiveInteger }, { additionalProperties: false }),
|
|
158
|
+
executive: Type.Object({
|
|
159
|
+
verification: Type.Array(Type.Object({
|
|
160
|
+
id: Type.String({ minLength: 1, maxLength: 128, pattern: '^[A-Za-z0-9._:-]+$' }),
|
|
161
|
+
description: Type.String({ minLength: 1, maxLength: 4096 })
|
|
162
|
+
}, { additionalProperties: false }), { maxItems: 128 })
|
|
163
|
+
}, { additionalProperties: false }),
|
|
164
|
+
providerPromptCache: Type.Optional(Type.Object({
|
|
165
|
+
enabled: Type.Boolean(), minimumEligiblePrefixTokens: PositiveInteger, maximumBreakpoints: Type.Integer({ minimum: 0 })
|
|
166
|
+
}, { additionalProperties: false })),
|
|
167
|
+
historyRetention: Type.Object({
|
|
168
|
+
purgeMode: Type.Union([Type.Literal('manual'), Type.Literal('after_days')]),
|
|
169
|
+
purgeArchivedAfterDays: Type.Union([PositiveInteger, Type.Null()])
|
|
170
|
+
}, { additionalProperties: false }),
|
|
171
|
+
snapshot: Type.Object({ maxRuntimeEntities: PositiveInteger, pageSizeDefault: PositiveInteger, pageSizeMax: PositiveInteger }, { additionalProperties: false }),
|
|
172
|
+
sse: Type.Object({
|
|
173
|
+
heartbeatIntervalMs: Type.Integer({ minimum: 1000, maximum: 60000 }),
|
|
174
|
+
maxBufferedEvents: Type.Integer({ minimum: 16, maximum: 10000 }),
|
|
175
|
+
maxBufferedBytes: Type.Integer({ minimum: 65536, maximum: 16777216 })
|
|
176
|
+
}, { additionalProperties: false })
|
|
177
|
+
}, { additionalProperties: false });
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { EffectScope } from './domain.js';
|
|
2
|
+
export type AdapterPlatform = 'windows-x64' | 'linux-x64' | 'darwin-x64' | 'darwin-arm64';
|
|
3
|
+
export type AdapterRuntime = 'node' | 'bun';
|
|
4
|
+
export declare const ADAPTER_CONTRACT_VERSIONS: Readonly<{
|
|
5
|
+
concurrency: "1.0.0";
|
|
6
|
+
error: "1.0.0";
|
|
7
|
+
cancellation: "1.0.0";
|
|
8
|
+
timeout: "1.0.0";
|
|
9
|
+
recovery: "1.0.0";
|
|
10
|
+
conformance: "1.0.0";
|
|
11
|
+
}>;
|
|
12
|
+
export interface AdapterManifest {
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly version: string;
|
|
15
|
+
readonly portVersions: Readonly<Record<string, string>>;
|
|
16
|
+
readonly capabilities: readonly string[];
|
|
17
|
+
readonly modelReferences: readonly string[];
|
|
18
|
+
readonly platforms: readonly AdapterPlatform[];
|
|
19
|
+
readonly runtimes: readonly AdapterRuntime[];
|
|
20
|
+
readonly effectScopes: readonly EffectScope[];
|
|
21
|
+
readonly concurrencyContractVersion: string;
|
|
22
|
+
readonly errorContractVersion: string;
|
|
23
|
+
readonly cancellationContractVersion: string;
|
|
24
|
+
readonly timeoutContractVersion: string;
|
|
25
|
+
readonly recoveryContractVersion: string;
|
|
26
|
+
readonly configSchemaDigest: string;
|
|
27
|
+
readonly conformanceTestVersion: string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { EffectScope, Json } from './domain.js';
|
|
2
|
+
export interface CapabilityDefinition {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly title: string;
|
|
5
|
+
readonly description: string;
|
|
6
|
+
readonly inputSchema: Readonly<Record<string, Json>>;
|
|
7
|
+
readonly outputSchema?: Readonly<Record<string, Json>>;
|
|
8
|
+
readonly effect: EffectScope;
|
|
9
|
+
readonly adapterId: string;
|
|
10
|
+
readonly loadMode: 'eager' | 'deferred';
|
|
11
|
+
readonly outputLimitBytes: number;
|
|
12
|
+
readonly defaultAssignment?: 'all_new_agents' | 'configured' | 'none';
|
|
13
|
+
readonly kind?: 'tool' | 'command' | 'skill';
|
|
14
|
+
readonly promptText?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface CapabilityInvocation {
|
|
17
|
+
readonly callId: string;
|
|
18
|
+
readonly projectId: string;
|
|
19
|
+
readonly agentId: string | null;
|
|
20
|
+
readonly capabilityId: string;
|
|
21
|
+
readonly arguments: Json;
|
|
22
|
+
readonly workspacePaths: readonly string[];
|
|
23
|
+
readonly workspaceId: string;
|
|
24
|
+
readonly fullAccess?: boolean;
|
|
25
|
+
readonly signal: AbortSignal;
|
|
26
|
+
}
|
|
27
|
+
export interface CapabilityOutput {
|
|
28
|
+
readonly content: Json;
|
|
29
|
+
readonly artifacts?: readonly ArtifactOutput[];
|
|
30
|
+
readonly outcome?: 'success' | 'failed';
|
|
31
|
+
readonly errorCode?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ArtifactOutput {
|
|
34
|
+
readonly name: string;
|
|
35
|
+
readonly mediaType: string;
|
|
36
|
+
readonly bytes: Uint8Array;
|
|
37
|
+
}
|
|
38
|
+
export interface CapabilityAdapter {
|
|
39
|
+
readonly id: string;
|
|
40
|
+
execute(invocation: CapabilityInvocation): Promise<CapabilityOutput>;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export type Json = null | boolean | number | string | readonly Json[] | {
|
|
2
|
+
readonly [key: string]: Json;
|
|
3
|
+
};
|
|
4
|
+
export type RunState = 'READY' | 'RUNNING' | 'WAITING' | 'TERMINAL';
|
|
5
|
+
export type StepState = 'RUNNING' | 'WAITING' | 'TERMINAL';
|
|
6
|
+
export type AttemptState = 'PREPARED' | 'RUNNING' | 'TERMINAL';
|
|
7
|
+
export type CallState = 'WAITING' | 'QUEUED' | 'RUNNING' | 'TERMINAL';
|
|
8
|
+
export type Outcome = 'success' | 'failed' | 'cancelled' | 'interrupted';
|
|
9
|
+
export type WaitReason = 'user_input' | 'policy_review';
|
|
10
|
+
export type Policy = 'read_only' | 'workspace_write' | 'external' | 'ask' | 'auto_approve' | 'full_access';
|
|
11
|
+
export type EffectScope = 'read_only' | 'workspace_write' | 'external' | 'full';
|
|
12
|
+
export interface TrustedIngress {
|
|
13
|
+
readonly source: 'user';
|
|
14
|
+
readonly clientId: string;
|
|
15
|
+
readonly transport: 'http' | 'https';
|
|
16
|
+
readonly correlationId: string;
|
|
17
|
+
}
|
|
18
|
+
export interface EntityRef {
|
|
19
|
+
readonly type: string;
|
|
20
|
+
readonly id: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 07 `ChangedEntityRef`, plus the internal `type`/`id` the publisher already used. A subscriber
|
|
24
|
+
* needs `read_route` to know what to re-read and `owner_id` to refresh the owning view.
|
|
25
|
+
*/
|
|
26
|
+
export interface ChangedEntity extends EntityRef {
|
|
27
|
+
readonly entity_type: string;
|
|
28
|
+
readonly entity_id: string;
|
|
29
|
+
readonly owner_id: string | null;
|
|
30
|
+
readonly read_route: string;
|
|
31
|
+
readonly revision: number | null;
|
|
32
|
+
readonly change: 'created' | 'updated' | 'deleted';
|
|
33
|
+
/**
|
|
34
|
+
* 07 §4.2 invalidation scope, derived from Canonical State: what a subscriber must re-read, as
|
|
35
|
+
* opposed to which row changed. A Direct Call has no Agent, Task or Project, so these are omitted
|
|
36
|
+
* rather than fabricated.
|
|
37
|
+
*/
|
|
38
|
+
readonly project_id?: string;
|
|
39
|
+
readonly task_id?: string;
|
|
40
|
+
readonly session_id?: string;
|
|
41
|
+
readonly agent_id?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface ChangeSet {
|
|
44
|
+
readonly projectId: string;
|
|
45
|
+
readonly stateRevision: number;
|
|
46
|
+
readonly changes: readonly ChangedEntity[];
|
|
47
|
+
}
|
|
48
|
+
export interface Page<T> {
|
|
49
|
+
readonly items: readonly T[];
|
|
50
|
+
readonly nextCursor: string | null;
|
|
51
|
+
readonly collectionRevision: number;
|
|
52
|
+
}
|
|
53
|
+
export interface RuntimeEvent {
|
|
54
|
+
readonly id: string;
|
|
55
|
+
readonly projectId: string;
|
|
56
|
+
readonly stateRevision: number;
|
|
57
|
+
readonly metadataRevision: number;
|
|
58
|
+
readonly type: 'stream.delta' | 'entity.changed' | 'attention.required' | 'config.changed' | 'runtime.notice' | 'snapshot.required';
|
|
59
|
+
readonly payload: Json;
|
|
60
|
+
readonly occurredAt: string;
|
|
61
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|