@fa-software/semi2-dsh 0.0.10-preview.20260920042705
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/cordis.patch.yml +5 -0
- package/lib/client.js +351 -0
- package/lib/client.js.map +1 -0
- package/lib/codegraph/cli.js +142 -0
- package/lib/codegraph/config.js +22 -0
- package/lib/codegraph/ensure.js +25 -0
- package/lib/codegraph/guide.js +21 -0
- package/lib/codegraph/index.js +97 -0
- package/lib/codegraph/tools.js +227 -0
- package/lib/codegraph/workspace.js +52 -0
- package/lib/configuration/compile.js +177 -0
- package/lib/configuration/credentials.js +104 -0
- package/lib/configuration/generated/graphql.js +1 -0
- package/lib/configuration/generated/schema.js +95 -0
- package/lib/configuration/graphql.js +193 -0
- package/lib/configuration/index.js +29 -0
- package/lib/configuration/login.js +96 -0
- package/lib/configuration/runtime.js +1100 -0
- package/lib/configuration/skill-resources.js +218 -0
- package/lib/configuration/skills.js +185 -0
- package/lib/configuration/status.js +57 -0
- package/lib/configuration/workspace.js +55 -0
- package/lib/configuration/workspaces.js +169 -0
- package/lib/contract.js +42 -0
- package/lib/index.js +14 -0
- package/lib/types/codegraph/cli.d.ts +20 -0
- package/lib/types/codegraph/config.d.ts +10 -0
- package/lib/types/codegraph/ensure.d.ts +3 -0
- package/lib/types/codegraph/guide.d.ts +4 -0
- package/lib/types/codegraph/index.d.ts +5 -0
- package/lib/types/codegraph/tools.d.ts +17 -0
- package/lib/types/codegraph/workspace.d.ts +8 -0
- package/lib/types/configuration/compile.d.ts +81 -0
- package/lib/types/configuration/credentials.d.ts +35 -0
- package/lib/types/configuration/generated/graphql.d.ts +100 -0
- package/lib/types/configuration/generated/schema.d.ts +1003 -0
- package/lib/types/configuration/graphql.d.ts +46 -0
- package/lib/types/configuration/index.d.ts +9 -0
- package/lib/types/configuration/login.d.ts +22 -0
- package/lib/types/configuration/runtime.d.ts +320 -0
- package/lib/types/configuration/skill-resources.d.ts +14 -0
- package/lib/types/configuration/skills.d.ts +8 -0
- package/lib/types/configuration/status.d.ts +9 -0
- package/lib/types/configuration/workspace.d.ts +7 -0
- package/lib/types/configuration/workspaces.d.ts +96 -0
- package/lib/types/contract.d.ts +32 -0
- package/lib/types/index.d.ts +11 -0
- package/lib/types/web/index.d.ts +2 -0
- package/lib/types/web/login.d.ts +2 -0
- package/lib/types/web/loopback-bridge.d.ts +8 -0
- package/lib/types/web/preview-proxy.d.ts +17 -0
- package/lib/types/web/runtime.d.ts +8 -0
- package/lib/types/web/welcome-ack.d.ts +33 -0
- package/lib/web/index.js +38 -0
- package/lib/web/login.js +79 -0
- package/lib/web/loopback-bridge.js +12 -0
- package/lib/web/preview-proxy.js +201 -0
- package/lib/web/runtime.js +19 -0
- package/lib/web/welcome-ack.js +51 -0
- package/package.json +81 -0
package/lib/contract.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// @fa-software/semi2-dsh/contract —— 运行面契约(本包定义,三个运行面各自 provide)。
|
|
2
|
+
// 适配器在 apply 里同步 provide(插件在首次领取前等它,见 runtime.ts),服务缺席 = 宿主直跑;headless/web 轴由 dsh 服务存在性决定,提示词段由适配器注入。
|
|
3
|
+
/** cordis 服务名(适配器 provide / 插件 get 共用同一常量)。 */
|
|
4
|
+
export const SEMI2_RUNTIME_SERVICE = 'semi2Runtime';
|
|
5
|
+
function text(value) {
|
|
6
|
+
const trimmed = value?.trim();
|
|
7
|
+
return trimmed === undefined || trimmed === '' ? undefined : trimmed;
|
|
8
|
+
}
|
|
9
|
+
function credentialsFromEnv(env) {
|
|
10
|
+
const configUrl = text(env.SEMI2_CONFIG_URL);
|
|
11
|
+
// Hub 签发的 CNB 接入密钥(经 secret import 注入 SEMI2_ACCESS_TOKEN)优先:它由 Hub 自己校验,
|
|
12
|
+
// 直接作为 Bearer 使用。缺失时才回退平台短期 CNB_TOKEN(换用户密钥)。
|
|
13
|
+
const accessToken = text(env.SEMI2_ACCESS_TOKEN) === undefined ? text(env.CNB_TOKEN) : undefined;
|
|
14
|
+
return configUrl === undefined && accessToken === undefined
|
|
15
|
+
? undefined
|
|
16
|
+
: {
|
|
17
|
+
...(configUrl === undefined ? {} : { configUrl }),
|
|
18
|
+
...(accessToken === undefined ? {} : { accessToken }),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function runtime(platform, fields) {
|
|
22
|
+
const contract = { platform };
|
|
23
|
+
if (fields.credentials !== undefined)
|
|
24
|
+
contract.credentials = fields.credentials;
|
|
25
|
+
return contract;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* CNB 运行面:优先用 secret import 注入的 hub 接入密钥(`SEMI2_ACCESS_TOKEN`),
|
|
29
|
+
* 缺失时才回退平台短期 `CNB_TOKEN`(插件启动时换成 hub 用户密钥)。
|
|
30
|
+
*/
|
|
31
|
+
export function runtimeFromCnbEnv(env) {
|
|
32
|
+
return runtime('cnb', { credentials: credentialsFromEnv(env) });
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* 容器运行面:**只盖章,不给凭据也不给身份**——本地容器靠登录(设置页账号密码换用户密钥)。
|
|
36
|
+
* 契约一旦提供 `credentials`,插件的 `login()` 会以 `CREDENTIAL_SOURCE_READONLY` 拒绝登录
|
|
37
|
+
* (部署面地址不可被交互改写),所以这里刻意留空。
|
|
38
|
+
* CNB 面相反:身份取平台注入的触发 env、凭据取 secret 注入的 env,见 `runtimeFromCnbEnv`。
|
|
39
|
+
*/
|
|
40
|
+
export function runtimeFromContainerEnv(_env) {
|
|
41
|
+
return runtime('container', {});
|
|
42
|
+
}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import z from '@deepseek-ai/schemastery';
|
|
2
|
+
import { installCodegraph } from "./codegraph/index.js";
|
|
3
|
+
import { installConfiguration } from './configuration/index.js';
|
|
4
|
+
import { installWebSurface } from './web/index.js';
|
|
5
|
+
export { SEMI2_RUNTIME_SERVICE, runtimeFromCnbEnv, runtimeFromContainerEnv, } from './contract.js';
|
|
6
|
+
export const name = 'semi2-dsh';
|
|
7
|
+
/** 三个运行面都存在(dsh-base 的 tools / skills 行);其它服务一律走作用域注入。 */
|
|
8
|
+
export const inject = ['tools', 'skills'];
|
|
9
|
+
export const Config = z.object({});
|
|
10
|
+
export function apply(ctx, _config) {
|
|
11
|
+
installConfiguration(ctx);
|
|
12
|
+
installWebSurface(ctx);
|
|
13
|
+
ctx.inject(['subprocess'], codegraphCtx => installCodegraph(codegraphCtx));
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { SubprocessRuntime } from '@deepseek-ai/dsh-subprocess';
|
|
2
|
+
export declare class CodegraphCliError extends Error {
|
|
3
|
+
readonly exitCode: number | null;
|
|
4
|
+
constructor(message: string, exitCode: number | null, options?: ErrorOptions);
|
|
5
|
+
}
|
|
6
|
+
export declare function stripAnsi(text: string): string;
|
|
7
|
+
/** 仅供短诊断文本使用;模型结果不在插件内截断,交给 dsh spill policy。 */
|
|
8
|
+
export declare function truncateText(text: string, max: number): string;
|
|
9
|
+
/** 测试与诊断只判断显式覆盖或依赖自带 bin;PATH 由 subprocess 执行世界解析。 */
|
|
10
|
+
export declare function resolveCodegraphBin(): string | undefined;
|
|
11
|
+
export declare const CODEGRAPH_MISSING_HINT: string;
|
|
12
|
+
export interface RunOptions {
|
|
13
|
+
cwd?: string;
|
|
14
|
+
signal?: AbortSignal;
|
|
15
|
+
/** 容器/一次性进程传 true:禁后台 daemon,保证进程随会话收口;宿主保留官方 watcher。 */
|
|
16
|
+
noDaemon?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export type CodegraphRunner = (argv: readonly string[], options?: RunOptions) => Promise<string>;
|
|
19
|
+
/** 创建绑定到 dsh 执行世界的 runner;取消和插件卸载均由 subprocess provider 管理进程范围。 */
|
|
20
|
+
export declare function createCodegraphRunner(subprocess: SubprocessRuntime): CodegraphRunner;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import { type Semi2Platform } from '../contract.ts';
|
|
3
|
+
/** 插件自己认的平台:契约缺席(宿主直跑)= host。 */
|
|
4
|
+
export type CodegraphPlatform = Semi2Platform | 'host';
|
|
5
|
+
/** 契约平台**懒取**:apply 期适配器可能还没 provide(配置轮询同理),只在决策点读。 */
|
|
6
|
+
export declare function platformOf(ctx: Context): CodegraphPlatform;
|
|
7
|
+
/** 总开关:SEMI2_CODEGRAPH=0 整块能力 no-op(宿主不想用时的退出阀)。 */
|
|
8
|
+
export declare function moduleDisabled(env: NodeJS.ProcessEnv): boolean;
|
|
9
|
+
/** 自动索引默认值:运行面容器(cnb/container)= 开(无人可替它决定);宿主 = 关(索引是用户的决定)。 */
|
|
10
|
+
export declare function autoIndexEnabled(platform: CodegraphPlatform, env: NodeJS.ProcessEnv): boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import { type CodegraphPlatform } from './config.ts';
|
|
3
|
+
/** 自动索引面 + 未索引 + git 仓库才预热;目标保持会话工作区 cwd。 */
|
|
4
|
+
export declare function prewarmTarget(platform: CodegraphPlatform, cwd: string | undefined, env: NodeJS.ProcessEnv): string | null;
|
|
5
|
+
export declare function installCodegraph(ctx: Context): () => void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import { HarnessError } from '@deepseek-ai/dsh-llm';
|
|
3
|
+
import type { CodegraphRunner } from './cli.ts';
|
|
4
|
+
export type CodegraphToolErrorCode = 'CODEGRAPH_CWD_REQUIRED' | 'CODEGRAPH_NOT_INDEXED' | 'CODEGRAPH_FAILED';
|
|
5
|
+
export declare class CodegraphToolError extends HarnessError {
|
|
6
|
+
readonly code: CodegraphToolErrorCode;
|
|
7
|
+
}
|
|
8
|
+
export interface ToolsDeps {
|
|
9
|
+
run: CodegraphRunner;
|
|
10
|
+
lifecycleSignal: AbortSignal;
|
|
11
|
+
/** 自动索引开(运行面容器):查询类工具在未索引项目上先 init 再执行。 */
|
|
12
|
+
autoIndex: () => boolean;
|
|
13
|
+
/** 容器面 true:spawn 禁 daemon,进程随会话收口;宿主保留官方 watcher。 */
|
|
14
|
+
noDaemon: () => boolean;
|
|
15
|
+
warn: (message: string) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function installTools(ctx: Context, deps: ToolsDeps): () => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** 工作区 cwd 自身已建立索引时返回该目录;不向祖先目录借用索引。 */
|
|
2
|
+
export declare function findIndexRoot(cwd: string): string | undefined;
|
|
3
|
+
/** 最近的 git 根:自动索引只在 git 仓库里做,防止在任意目录(如 ~)建索引。 */
|
|
4
|
+
export declare function findGitRoot(cwd: string): string | undefined;
|
|
5
|
+
/** 显式绝对路径原样使用;相对路径按当前会话工作区解析,与 dsh 文件工具一致。 */
|
|
6
|
+
export declare function resolveProjectTarget(path: string, sessionCwd?: string): string;
|
|
7
|
+
/** `.codegraph/` 进 `.git/info/exclude`(本地忽略,不动已跟踪文件,`git status` 保持干净);幂等、best-effort。 */
|
|
8
|
+
export declare function ensureGitExclude(root: string): void;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { InputModality, ModelProtocol, ReasoningLevel, RuntimeBootQuery, RuntimeWorkspaceProjectsQuery } from './generated/graphql.js';
|
|
2
|
+
/**
|
|
3
|
+
* 生效可用目录的一条(连接启用 ∧ 模型启用 ∧ 存在性 ∧ 密钥齐备)。
|
|
4
|
+
* 根字段可空:取数失败只让该字段为 null,故取 NonNullable 元素类型,null 由 runtime.ts 归一为空集合。
|
|
5
|
+
*/
|
|
6
|
+
export type RuntimeModel = NonNullable<RuntimeBootQuery['runtimeModels']>[number];
|
|
7
|
+
export type RuntimeConnection = RuntimeModel['connection'];
|
|
8
|
+
/** 本次可读项目 + 其生效绑定(模型引用已按可用目录校验,失效为 null)。 */
|
|
9
|
+
export type RuntimeProject = NonNullable<RuntimeWorkspaceProjectsQuery['runtimeProjects']>[number];
|
|
10
|
+
export type RuntimeModelCredential = NonNullable<RuntimeBootQuery['runtimeModelCredentials']>[number];
|
|
11
|
+
export type { InputModality, ModelProtocol, ReasoningLevel };
|
|
12
|
+
/** dsh 通用 provider 的 api 适配器(`llm-pi-ai.providers[].api`)。 */
|
|
13
|
+
export type ProviderApi = 'openai-completions' | 'openai-responses' | 'anthropic-messages';
|
|
14
|
+
/** 路由键 hex 对人无意义:用 `displayName` 覆盖显示名(`llm-pi-ai` 语义:`displayName ?? 路由键`)。 */
|
|
15
|
+
export declare const CONSOLE_PROVIDER_DISPLAY_NAME = "semi2-hub";
|
|
16
|
+
/** 路由键必须留 hex——协议路由与 `agent-default-model` 都引用它。 */
|
|
17
|
+
export declare function connectionRoute(connectionId: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* 一条连接在 dsh 里的路由键。
|
|
20
|
+
*
|
|
21
|
+
* 预设连接直接用**预设 id**(= dsh 的提供方路由 id):`llm-pi-ai` 只在路由名能对上已装目录时
|
|
22
|
+
* 才复用那份目录条目(compat / headers / cost / thinkingLevelMap),换个名字这些全丢。
|
|
23
|
+
* 自定义连接没有可对应的目录条目,用自铸的 hex 路由 + 显式 `api` / `baseURL`。
|
|
24
|
+
*
|
|
25
|
+
* DEEPSEEK 协议走内置原生适配器(独立于 pi-ai 目录),与预设/自定义无关。
|
|
26
|
+
*/
|
|
27
|
+
export declare function connectionProviderName(connection: RuntimeConnection): string;
|
|
28
|
+
/** 密钥的进程 env 名(= dsh credentials 引用名)。 */
|
|
29
|
+
export declare function connectionApiKeyEnv(connectionId: string): string;
|
|
30
|
+
export declare function protocolApi(protocol: ModelProtocol): ProviderApi;
|
|
31
|
+
export declare function modelName(model: RuntimeModel): string;
|
|
32
|
+
/** provider = 路由键、model = 上游模型 id。 */
|
|
33
|
+
export interface ModelSelection {
|
|
34
|
+
provider: string;
|
|
35
|
+
model: string;
|
|
36
|
+
}
|
|
37
|
+
/** `llm-pi-ai` 的单个 provider。 */
|
|
38
|
+
export interface CompiledProvider {
|
|
39
|
+
/**
|
|
40
|
+
* true = 路由键是 dsh 的提供方 id,profile 交给目录 provider 解析
|
|
41
|
+
* (`api` / `baseURL` 留空,让目录逐模型给)。false = 自铸路由,必须自带这两项。
|
|
42
|
+
*/
|
|
43
|
+
preset: boolean;
|
|
44
|
+
/** 来源连接:路由被本地配置占用时,用它的 id 生成自铸路由名。 */
|
|
45
|
+
connectionId: string;
|
|
46
|
+
api: ProviderApi;
|
|
47
|
+
baseURL: string;
|
|
48
|
+
apiKeyEnv: string;
|
|
49
|
+
displayName: string;
|
|
50
|
+
models: Array<Record<string, unknown>>;
|
|
51
|
+
}
|
|
52
|
+
/** 写入 settings 的 profile:预设路由省略 `api` / `baseURL`,其余按需带上。 */
|
|
53
|
+
export declare function providerProfile(compiled: CompiledProvider): object;
|
|
54
|
+
/**
|
|
55
|
+
* 按实际落地的路由表改写选择。路由让位(同名用户 profile)后,编译期算出的
|
|
56
|
+
* 路由键已不是最终值,默认模型与项目 plan/execute 都必须跟着换。
|
|
57
|
+
*/
|
|
58
|
+
export declare function remapSelections(compiled: CompiledConfiguration, routes: ReadonlyMap<string, string>): CompiledConfiguration;
|
|
59
|
+
/** `llm-deepseek` settings 段(覆盖内置 deepseek-official 的连接事实)。 */
|
|
60
|
+
export interface CompiledDeepSeek {
|
|
61
|
+
apiKeyEnv: string;
|
|
62
|
+
baseURL: string;
|
|
63
|
+
models: Array<{
|
|
64
|
+
id: string;
|
|
65
|
+
name: string;
|
|
66
|
+
contextWindow?: number;
|
|
67
|
+
maxTokens?: number;
|
|
68
|
+
inputModalities?: Array<'text' | 'image'>;
|
|
69
|
+
}>;
|
|
70
|
+
}
|
|
71
|
+
export interface CompiledConfiguration {
|
|
72
|
+
/** 非 DEEPSEEK 协议:注册到 llm-pi-ai 的 provider(键 = 路由 id)。 */
|
|
73
|
+
providers: Record<string, CompiledProvider>;
|
|
74
|
+
/** DEEPSEEK 协议:覆盖内置 llm-deepseek 的段(无 DEEPSEEK 连接为 null)。 */
|
|
75
|
+
deepseek: CompiledDeepSeek | null;
|
|
76
|
+
/** 全局默认模型的生效选择;未配/失效为 null。 */
|
|
77
|
+
defaultModel: ModelSelection | null;
|
|
78
|
+
/** semi2-hub 模型 id → 生效选择(项目 CNB 的 plan/execute 按它解析)。 */
|
|
79
|
+
selections: Map<string, ModelSelection>;
|
|
80
|
+
}
|
|
81
|
+
export declare function compileBoot(models: readonly RuntimeModel[], defaultModelId: string | null): CompiledConfiguration;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { Semi2Runtime } from '../contract.js';
|
|
3
|
+
export declare const CONFIG_URL_REF = "SEMI2_CONFIG_URL";
|
|
4
|
+
export declare const ACCESS_TOKEN_REF = "SEMI2_ACCESS_TOKEN";
|
|
5
|
+
/** 连接 semi2-hub 的凭据;两项齐备才算可连。 */
|
|
6
|
+
export interface ConnectionCredentials {
|
|
7
|
+
url: string;
|
|
8
|
+
token: string;
|
|
9
|
+
/** 凭据来源层:`runtime`(运行面契约)/ dsh 提供的 `env`/`user-env`/`file` 等。 */
|
|
10
|
+
source: string;
|
|
11
|
+
}
|
|
12
|
+
/** 一条腿的解析结果。 */
|
|
13
|
+
interface ResolvedField {
|
|
14
|
+
value: string;
|
|
15
|
+
source: string;
|
|
16
|
+
}
|
|
17
|
+
/** 连接凭据两条腿各自的解析结果:**可能只知道地址而还没有令牌**(本地容器未登录时就是这样)。 */
|
|
18
|
+
export interface ConnectionFields {
|
|
19
|
+
url?: ResolvedField;
|
|
20
|
+
token?: ResolvedField;
|
|
21
|
+
}
|
|
22
|
+
/** 两条腿齐备才算可连;只有地址时调用方用 `url.value` 预填登录表单。 */
|
|
23
|
+
export declare function connectionOf(fields: ConnectionFields): ConnectionCredentials | null;
|
|
24
|
+
/** 分别解析地址与令牌(不做齐备性判定):`resolveConnection` 与状态回报共用这条路。 */
|
|
25
|
+
export declare function resolveConnectionFields(ctx: Context, runtimeContract: Semi2Runtime | undefined, environment?: NodeJS.ProcessEnv): Promise<ConnectionFields>;
|
|
26
|
+
/** 解析当前连接凭据;缺任一项返回 null(调用方据此不注入)。 */
|
|
27
|
+
export declare function resolveConnection(ctx: Context, runtimeContract: Semi2Runtime | undefined, environment?: NodeJS.ProcessEnv): Promise<ConnectionCredentials | null>;
|
|
28
|
+
/** 写入登录凭据;env 遮蔽 token 时 dsh 会拒绝——由调用方转成可读错误。 */
|
|
29
|
+
export declare function storeConnection(ctx: Context, input: {
|
|
30
|
+
url: string;
|
|
31
|
+
token: string;
|
|
32
|
+
}): Promise<void>;
|
|
33
|
+
/** 清除登录凭据(不触碰运行面契约/env 提供的凭据)。 */
|
|
34
|
+
export declare function clearConnection(ctx: Context): Promise<void>;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/** Internal type. DO NOT USE DIRECTLY. */
|
|
2
|
+
type Exact<T extends {
|
|
3
|
+
[key: string]: unknown;
|
|
4
|
+
}> = {
|
|
5
|
+
[K in keyof T]: T[K];
|
|
6
|
+
};
|
|
7
|
+
/** Internal type. DO NOT USE DIRECTLY. */
|
|
8
|
+
export type Incremental<T> = T | {
|
|
9
|
+
[P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
|
|
10
|
+
};
|
|
11
|
+
export type InputModality = 'IMAGE' | 'TEXT';
|
|
12
|
+
export type ModelProtocol = 'ANTHROPIC' | 'DEEPSEEK' | 'OPENAI_CHAT' | 'OPENAI_RESPONSES';
|
|
13
|
+
export type ReasoningLevel = 'HIGH' | 'LOW' | 'MAX' | 'MEDIUM' | 'MINIMAL' | 'OFF' | 'XHIGH';
|
|
14
|
+
/** 技能附件内容的编码:文本类用 UTF8,其余(图片 / 二进制)用 BASE64。 */
|
|
15
|
+
export type SkillFileEncoding = 'BASE64' | 'UTF8';
|
|
16
|
+
export type RuntimeBootQueryVariables = Exact<{
|
|
17
|
+
[key: string]: never;
|
|
18
|
+
}>;
|
|
19
|
+
export type RuntimeBootQuery = {
|
|
20
|
+
runtimeDefaultModelId: string | null;
|
|
21
|
+
runtimeViewer: {
|
|
22
|
+
id: string;
|
|
23
|
+
username: string;
|
|
24
|
+
displayName: string;
|
|
25
|
+
} | null;
|
|
26
|
+
runtimeModels: Array<{
|
|
27
|
+
id: string;
|
|
28
|
+
upstreamId: string;
|
|
29
|
+
displayName: string | null;
|
|
30
|
+
metadata: {
|
|
31
|
+
contextWindow: number | null;
|
|
32
|
+
maxTokens: number | null;
|
|
33
|
+
input: Array<InputModality> | null;
|
|
34
|
+
reasoningLevels: Array<ReasoningLevel> | null;
|
|
35
|
+
};
|
|
36
|
+
connection: {
|
|
37
|
+
id: string;
|
|
38
|
+
provider: string | null;
|
|
39
|
+
protocol: ModelProtocol;
|
|
40
|
+
baseUrl: string;
|
|
41
|
+
};
|
|
42
|
+
}> | null;
|
|
43
|
+
runtimeModelCredentials: Array<{
|
|
44
|
+
connectionId: string;
|
|
45
|
+
value: string;
|
|
46
|
+
}> | null;
|
|
47
|
+
runtimeSkills: Array<{
|
|
48
|
+
id: string;
|
|
49
|
+
projectId: string | null;
|
|
50
|
+
name: string;
|
|
51
|
+
description: string;
|
|
52
|
+
whenToUse: string | null;
|
|
53
|
+
content: string;
|
|
54
|
+
version: number;
|
|
55
|
+
fileCount: number;
|
|
56
|
+
filesBytes: number;
|
|
57
|
+
files: Array<{
|
|
58
|
+
path: string;
|
|
59
|
+
sizeBytes: number;
|
|
60
|
+
mimeType: string;
|
|
61
|
+
isExecutable: boolean;
|
|
62
|
+
}>;
|
|
63
|
+
}> | null;
|
|
64
|
+
};
|
|
65
|
+
export type RuntimeSkillFilesQueryVariables = Exact<{
|
|
66
|
+
skillId: string | number;
|
|
67
|
+
}>;
|
|
68
|
+
export type RuntimeSkillFilesQuery = {
|
|
69
|
+
runtimeSkillFiles: Array<{
|
|
70
|
+
path: string;
|
|
71
|
+
content: string;
|
|
72
|
+
encoding: SkillFileEncoding;
|
|
73
|
+
sizeBytes: number;
|
|
74
|
+
mimeType: string;
|
|
75
|
+
isExecutable: boolean;
|
|
76
|
+
}> | null;
|
|
77
|
+
};
|
|
78
|
+
export type RuntimeWorkspaceProjectsQueryVariables = Exact<{
|
|
79
|
+
slugs?: Array<string> | string | null | undefined;
|
|
80
|
+
}>;
|
|
81
|
+
export type RuntimeWorkspaceProjectsQuery = {
|
|
82
|
+
runtimeProjects: Array<{
|
|
83
|
+
id: string;
|
|
84
|
+
slug: string;
|
|
85
|
+
name: string;
|
|
86
|
+
enabled: boolean;
|
|
87
|
+
planModelId: string | null;
|
|
88
|
+
executeModelId: string | null;
|
|
89
|
+
}> | null;
|
|
90
|
+
};
|
|
91
|
+
export type RuntimeModelCredentialsQueryVariables = Exact<{
|
|
92
|
+
connectionIds?: Array<string | number> | string | number | null | undefined;
|
|
93
|
+
}>;
|
|
94
|
+
export type RuntimeModelCredentialsQuery = {
|
|
95
|
+
runtimeModelCredentials: Array<{
|
|
96
|
+
connectionId: string;
|
|
97
|
+
value: string;
|
|
98
|
+
}> | null;
|
|
99
|
+
};
|
|
100
|
+
export {};
|