ide на основе vs code
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/*---------------------------------------------------------------------------------------------
* API Keys — менеджер API-ключей: хранение, проверка пинга/ошибок,
* эвристика подлинности модели и безопасности ответов.
*--------------------------------------------------------------------------------------------*/
import { Emitter, Event } from '../../../../base/common/event.js';
import { Disposable } from '../../../../base/common/lifecycle.js';
import { generateUuid } from '../../../../base/common/uuid.js';
import { CancellationToken } from '../../../../base/common/cancellation.js';
import { createDecorator } from '../../../../platform/instantiation/common/instantiation.js';
import { registerSingleton, InstantiationType } from '../../../../platform/instantiation/common/extensions.js';
import { IStorageService, StorageScope, StorageTarget } from '../../../../platform/storage/common/storage.js'
ISecretStorageService
IRequestService asText
IConfigurationService
ILogService
Limiter
CancellationTokenSource
parseKeysBulk detectProvider defaultBaseUrl secretFingerprint
classifyHttpStatus cooldownMsForStatus modelAuthenticityPercent
routerLimits nextLatencyUpdate slowThresholdMs pushLatencySample medianLatency bestMedianLatency
pickWeightedKey
IAuraApiKeysService
id
name
baseUrl
model
expectedModel
group
priority AuraApiKeyPriority
createdAt
provider AuraProvider
weight
secretFingerprint
enabled
checking
health AuraHealthStatus
cooldownUntil
lastChecked
pingMs
ok
error
authenticityPct
securityPct
securityNotes
excludedHighPing
latencyMs
latencySamples
slowStreak
excludedReason
id
checking
health AuraHealthStatus
cooldownUntil
lastChecked
pingMs
ok
error
authenticityPct
securityPct
excludedHighPing
latencyMs
excludedReason
id status IAuraApiKeyStatus IAuraApiKeyStatusExport
id
checking statuschecking
health statushealth
cooldownUntil statuscooldownUntil
lastChecked statuslastChecked
pingMs statuspingMs
ok statusok
error statuserror
authenticityPct statusauthenticityPct
securityPct statussecurityPct
excludedHighPing statusexcludedHighPing
latencyMs statuslatencyMs
excludedReason statusexcludedReason
_serviceBrand
onDidChange Event
onDidChangeActiveKey Event
IAuraApiKey
id
input OmitIAuraApiKey secret IAuraApiKey
text added skipped
id
id patch PartialIAuraApiKey
id
id secret
id IAuraApiKeyStatus
id IAuraApiKeyStatus
IAuraApiKey
id
baseUrl model keysText group priority AuraApiKeyPriority added skipped
baseUrl secret provider AuraProvider
IAuraApiGroup
name priority baseUrl IAuraApiGroup
text groupName added skipped errors
keyId modelId available authenticityPct error
maxParallel
modelId IAuraApiKey
id
keyId httpStatus
keyId reason
keyId firstTokenMs
re RegExp note
re note
re note
re note
re note
re note
_serviceBrand
_onDidChange
onDidChange _onDidChangeevent
_onDidChangeActiveKey
onDidChangeActiveKey _onDidChangeActiveKeyevent
keys IAuraApiKey
groups IAuraApiGroup
statuses
rrCursors
checkLimiter
checkCts CancellationTokenSource
storageService IStorageService
secretStorage ISecretStorageService
requestService IRequestService
configurationService IConfigurationService
logService ILogService
keys IAuraApiKey
keys
groups IAuraApiGroup
groups
groupslength
groups id name priority
key legacyKey fallback
current storageServicekey StorageScope
current
current
storageServicelegacyKey StorageScope fallback
key keys
current secretStoragekeyid
current
legacy secretStorage keyid
legacy
secretStoragekeyid legacy
e
logService e
storageService keys StorageScope StorageTarget
storageService groups StorageScope StorageTarget
_onDidChange
IAuraApiKey
p AuraApiKeyPriority p p
keysa b apriority bpriority anamebname
id
id
input OmitIAuraApiKey secret IAuraApiKey
key IAuraApiKey
input
id
createdAt Date
provider inputprovider secret inputbaseUrl
weight inputweight
secretFingerprint secret
keyskey
secretStoragekeyid secret
keyid
key
text added skipped
added skipped
trimmed text
trimmed
arr trimmed Record
item arr
secret itemkey itemapiKey itemtoken
itembaseUrl itemmodel secret
name itemname itemmodel
baseUrl itembaseUrl
model itemmodel
expectedModel itemexpectedModel itemmodel
group itemgroup
priority itempriority AuraApiKeyPriority
secret
added
skipped
added skipped
line trimmed
l line
l
parts lp p
partslength
name parts baseUrl parts model parts expectedModel parts priority parts
added
partslength
name baseUrl model priority parts
added
skipped
added skipped
id
keys keysk kid id
statusesid
secretStorageid
id patch PartialIAuraApiKey
key keysk kid id
key Objectkey patch
id
secretStorageid
id secret
secretStorageid secret
id secretFingerprint secret
id IAuraApiKeyStatus
statusesid checking
id patch PartialIAuraApiKeyStatus IAuraApiKeyStatus
next id patch
statusesid next
_onDidChange
next
url init type data headers Record timeout ms status body
start Date
ctx requestService
type inittype
url
data initdata
headers initheaders
timeout inittimeout
callSite
CancellationTokenNone
body ctx
ms Date start status ctxresstatusCode body
id IAuraApiKeyStatus
key keysk kid id
key id
id checking error
base keybaseUrl
secret id
authHeaders Record
secret
modelsUrl
keyprovider
modelsUrl
secret authHeaders secret authHeaders authHeaders
keyprovider
modelsUrl
authHeaders
keyprovider
modelsUrl
probeUrl
probeHeaders authHeaders
probeData model keymodel messages role content max_tokens
parseOpenAIAnswer body
bodychoicesmessagecontent body
parseAnswer parseOpenAIAnswer
parseReturnedModel body
bodymodel
keyprovider
probeUrl
probeData model keymodel max_tokens messages role content
parseAnswer body
c bodycontent c cp text ptext
keyprovider
probeUrl
probeHeaders
probeData contents role parts text generationConfig maxOutputTokens
parseAnswer body
parts bodycandidatescontentparts parts partsp text ptext
parseReturnedModel body
bodymodelVersion
ping modelsUrl type headers authHeaders timeout
pingstatus pingstatus
id checking lastChecked Date pingMs pingms ok error
modelsUnavailable pingstatus pingstatus
modelsUnavailable pingstatus pingstatus pingstatus
id
checking lastChecked Date pingMs pingms ok
error
health pingstatus
cooldownUntil pingstatus Date pingstatus
excludedHighPing pingms
authenticityPct
securityPct
securityNotes
chatOk
chat probeUrl
type
headers probeHeaders
timeout
data probeData
chatstatus chatstatus chatstatus
chatOk
answer chatbody
expected keyexpectedModel keymodel
family expectedw wlength
answerL answer
answerLexpected authenticityPct
familylength familyw answerLw authenticityPct
familyw answerLw authenticityPct
authenticityPct answer
returnedModel chatbody
returnedModel authenticityPct keymodel returnedModel authenticityPct
securityNotes p prechatbodyp pnote
httpsPenalty base
securityPct Math securityNoteslength httpsPenalty
httpsPenalty securityNotes
e
logService e
modelsUnavailable chatOk
id
checking lastChecked Date pingMs pingms ok
error
id
checking lastChecked Date pingMs pingms ok
authenticityPct securityPct securityNotes
excludedHighPing
excludedReason excludedHighPing
health cooldownUntil
error excludedHighPing
modelsUnavailable
e
msg e emessage e
id checking lastChecked Date ok error
key keys
keyid
IAuraApiKey
healthy keysk
kenabled
s kid
sok sexcludedHighPing
healthylength
p AuraApiKeyPriority p p
healthya b
apriority bpriority
aid bid
id
s id
slatencySamples slatencyMs spingMs
keyId
keysk kid keyIdk kidlatencySamples
baseUrl model keysText group priority AuraApiKeyPriority added skipped
added skipped
url baseUrl
line keysText
secret line
secret
parts secretp p
name partslength parts
value partslength parts parts
value url model skipped
name name
baseUrl url
model model
expectedModel model
group group
priority
value
added
added skipped
baseUrl secret provider AuraProvider secret baseUrl
base baseUrl
url
headers Record
provider
url
secret headers secret headers
url
url
secret headers
url
secret headers
res url type headers timeout
resstatus resstatus resstatus
parsed resbody
data parseddata
data
data
m id name mid mname mname
id id id
IAuraApiGroup
groupsa b apriority bpriority
name priority groupslength baseUrl IAuraApiGroup
group IAuraApiGroup id name name priority baseUrl
groupsgroup
group
fp
keysk ksecretFingerprint fp
text groupName added skipped errors
parsed text
errors parsederrorse
added skipped parsederrorslength
resolveGroupId name
target groupName name
target groupsid
existing groupsg gname target
existing existingid
targetid
draft parsedkeys
fp draftkey
fp skipped
gid draftgroupName
group groupsg gid gid
name draftlabel
baseUrl draftbaseUrl groupbaseUrl draftprovider
model
expectedModel
group groupname
priority
provider draftprovider
weight draftweight
draftkey
added
added skipped errors
keyId modelId available authenticityPct error
key keysk kid keyId
key available authenticityPct error
model modelId keymodel
secret keyId
base keybaseUrl
probeUrl
headers Record secret
data model messages role content max_tokens
parseReturned body
bodymodel
keyprovider
probeUrl
headers secret secret
data model max_tokens messages role content
keyprovider
probeUrl
headers
data contents role parts text generationConfig maxOutputTokens
parseReturned body
bodymodelVersion
res probeUrl
type
headers
timeout
data
status resstatus
status
keyId health cooldownUntil Number ok error
available authenticityPct error
status status
available authenticityPct error
status
keyId health cooldownUntil Date
available authenticityPct error
status
available authenticityPct error
returned resbody
pct model returned
available authenticityPct pct error returned returned model
e
available authenticityPct error
maxParallel
checkCts
checkCts
limiter maxParallel checkLimiter maxParallel
jobs keyskey limiter
checkCtstokenisCancellationRequested
status keyidhealth
attempt
attempt checkCtstokenisCancellationRequested
keyid
status keyidhealth
status
attempt
r r attempt
jobs
modelId IAuraApiKey
now Date
eligible k IAuraApiKey
kenabled
st kid
stcooldownUntil stcooldownUntil now
sthealth sthealth
stok stexcludedHighPing
group
pool keysk k groupsg gname kgroupid groupsid groupid
poollength
poola b bweight aweight aid bid
picked pool rrCursorsgroupid
picked
rrCursorsgroupid pickednextCursor
pickedkey
id
key keysk kid id
key
keysecretFingerprint
fp keysecretFingerprint
fplength
id
key keysk kid id
key
configurationService keybaseUrl
configurationService keymodel
storageService id StorageScope StorageTarget
_onDidChange
_onDidChangeActiveKeyid
keyId httpStatus
keysk kid keyId
httpStatus
keyId health ok cooldownUntil Number error
httpStatus
keyId health ok cooldownUntil Date error
httpStatus
keyId health cooldownUntil Date httpStatus error
keyId reason
keysk kid keyId
keyId
health
ok
cooldownUntil Date
error
keyId firstTokenMs
keysk kid keyId
limits key configurationServicekey
limitsslowFirstTokenMs
status keyId
previousStreak statusslowStreak
samples statuslatencySamples firstTokenMs
bestMedianMs keyId
thresholdMs bestMedianMs limits
update previousStreak firstTokenMs thresholdMs statusexcludedReason
hasReplacement keysk kid keyId
kenabled
kidok
kidexcludedHighPing
windowFull statuslatencySampleslength
updateslowStreak previousStreak updateclearExclusion windowFull statuslatencyMs firstTokenMs
exclude updateexclude hasReplacement
keyId
latencyMs firstTokenMs
latencySamples samples
slowStreak exclude updateslowStreak MathupdateslowStreak
exclude
excludedHighPing
excludedReason
error
updateclearExclusion
excludedHighPing excludedReason error
IAuraApiKeysService AuraApiKeysService InstantiationTypeDelayed