release: dsh-infstarapi 0.2.0
CI / test (push) Canceled after 0s

This commit is contained in:
Coldsmile_7 committed 2026-11-26 08:24:56 +08:00
1 parent a8f689e39c
commit c340aec110
59 files changed
+1108 -1590

No files matched your search

+8 -8
View File
@@ -61,19 +61,19 @@ test('registers one route and one directory entry, and defers the browser surfac
const { ctx, registered } = stubContext()
apply(ctx)
assert.equal(name, 'geek2api')
assert.equal(name, 'infstarapi')
// A profile without a browser surface must still boot: only the route is mandatory.
assert.deepEqual(inject, ['llm', 'credentials'])
assert.equal(registered.adapters.length, 1)
assert.deepEqual(registered.adapters[0].providers, ['geek2api'])
const models = await registered.adapters[0].adapter.listModels('geek2api')
assert.deepEqual(registered.adapters[0].providers, ['infstarapi'])
const models = await registered.adapters[0].adapter.listModels('infstarapi')
assert.deepEqual(models.map(model => model.id), [...GEEK2API_MODEL_IDS])
assert.deepEqual(registered.directories[0], [{
provider: 'geek2api',
displayName: 'Geek2API',
settingsNs: 'geek2api',
provider: 'infstarapi',
displayName: 'InfStarAPI',
settingsNs: 'infstarapi',
settingsPath: [],
}])
@@ -83,7 +83,7 @@ test('registers one route and one directory entry, and defers the browser surfac
// `web` carries the search providers; a profile without it still boots.
assert.deepEqual(ctx.injected, [['settings'], ['web'], ['connection', 'webServer'], ['tools']])
assert.equal(registered.rpc.length, 1)
assert.equal(registered.rpc[0].channel, '/geek2api')
assert.equal(registered.rpc[0].channel, '/infstarapi')
assert.ok(registered.effects.some(label => label.includes('loopback')))
// The Claude Code bridge registers one tool with a bounded schema.
@@ -138,7 +138,7 @@ test('the RPC surface refuses key material and answers status without one', asyn
const listed = await handler('keys/status')
assert.equal(listed.ok, false)
assert.match(listed.error.message, /Unknown Geek2API endpoint/u)
assert.match(listed.error.message, /Unknown InfStarAPI endpoint/u)
const rejected = await handler('keys/add', { key: 'nope' })
assert.equal(rejected.ok, false)