@getforgeai/protocol 0.1.0-beta.4 → 0.1.0-beta.5
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.
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AgentType } from "./agent-type.js";
|
|
2
|
+
export type KnownModelSuggestion = {
|
|
3
|
+
/** The id to declare (what the engine's model flag/config accepts). */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Short human label for UI chips. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Optional availability caveat shown as a hint. */
|
|
8
|
+
note?: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Curated model suggestions for engines with NO headless listing command
|
|
12
|
+
* (Claude Code and Codex). OpenCode and Kilo have live catalogs
|
|
13
|
+
* (`opencode models` / `kilo models`) fetched from the device instead —
|
|
14
|
+
* see the models:catalog:request socket event.
|
|
15
|
+
*
|
|
16
|
+
* Claude Code ids are ALIASES on purpose: they resolve server-side to the
|
|
17
|
+
* current best version, so declared lists do not go stale, and demand/supply
|
|
18
|
+
* string-matching stays coherent when everyone uses the same spelling.
|
|
19
|
+
*
|
|
20
|
+
* Curated as of 2026-07; revisit when vendors ship new lineups.
|
|
21
|
+
*/
|
|
22
|
+
export declare const KNOWN_MODEL_SUGGESTIONS: Partial<Record<AgentType, KnownModelSuggestion[]>>;
|
|
23
|
+
/** Engines whose catalog can be listed live from the device. */
|
|
24
|
+
export declare const LIVE_CATALOG_ENGINES: readonly AgentType[];
|
|
25
|
+
//# sourceMappingURL=known-models.d.ts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Curated model suggestions for engines with NO headless listing command
|
|
3
|
+
* (Claude Code and Codex). OpenCode and Kilo have live catalogs
|
|
4
|
+
* (`opencode models` / `kilo models`) fetched from the device instead —
|
|
5
|
+
* see the models:catalog:request socket event.
|
|
6
|
+
*
|
|
7
|
+
* Claude Code ids are ALIASES on purpose: they resolve server-side to the
|
|
8
|
+
* current best version, so declared lists do not go stale, and demand/supply
|
|
9
|
+
* string-matching stays coherent when everyone uses the same spelling.
|
|
10
|
+
*
|
|
11
|
+
* Curated as of 2026-07; revisit when vendors ship new lineups.
|
|
12
|
+
*/
|
|
13
|
+
export const KNOWN_MODEL_SUGGESTIONS = {
|
|
14
|
+
CLAUDE_CODE: [
|
|
15
|
+
{ id: "sonnet", label: "Sonnet" },
|
|
16
|
+
{ id: "opus", label: "Opus", note: "Not available on the Pro plan" },
|
|
17
|
+
{ id: "haiku", label: "Haiku" },
|
|
18
|
+
{
|
|
19
|
+
id: "fable",
|
|
20
|
+
label: "Fable",
|
|
21
|
+
note: "Requires organization access (server-gated)",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: "sonnet[1m]",
|
|
25
|
+
label: "Sonnet 1M",
|
|
26
|
+
note: "1M context; usage credits on Pro",
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
CODEX: [
|
|
30
|
+
{ id: "gpt-5.5", label: "GPT-5.5", note: "Recommended default" },
|
|
31
|
+
{ id: "gpt-5.4", label: "GPT-5.4" },
|
|
32
|
+
{ id: "gpt-5.4-mini", label: "GPT-5.4 mini" },
|
|
33
|
+
{ id: "gpt-5.6-sol", label: "GPT-5.6 Sol", note: "Entitlement-gated" },
|
|
34
|
+
{ id: "gpt-5.6-terra", label: "GPT-5.6 Terra" },
|
|
35
|
+
],
|
|
36
|
+
};
|
|
37
|
+
/** Engines whose catalog can be listed live from the device. */
|
|
38
|
+
export const LIVE_CATALOG_ENGINES = [
|
|
39
|
+
"OPENCODE",
|
|
40
|
+
"KILO",
|
|
41
|
+
];
|
|
42
|
+
//# sourceMappingURL=known-models.js.map
|
|
@@ -475,6 +475,18 @@ export type ServerToClientEvents = {
|
|
|
475
475
|
"workflow:tool-activity": (payload: WorkflowToolActivityPayload) => void;
|
|
476
476
|
"workflow:token-usage": (payload: WorkflowTokenUsagePayload) => void;
|
|
477
477
|
"cli:config:updated": (payload: CliConfigUpdatedPayload) => void;
|
|
478
|
+
/**
|
|
479
|
+
* Cockpit → CLI: list the models the device can actually run for an engine
|
|
480
|
+
* (OpenCode/Kilo run their own catalog command in the agent image; other
|
|
481
|
+
* engines answer from the curated KNOWN_MODEL_SUGGESTIONS). Ack-based with
|
|
482
|
+
* a server-side timeout — the container run can take tens of seconds.
|
|
483
|
+
*/
|
|
484
|
+
"models:catalog:request": (payload: {
|
|
485
|
+
engine: string;
|
|
486
|
+
}, callback: (data: {
|
|
487
|
+
models: string[];
|
|
488
|
+
error?: string;
|
|
489
|
+
} | null) => void) => void;
|
|
478
490
|
error: (payload: SocketErrorPayload) => void;
|
|
479
491
|
};
|
|
480
492
|
export type ClientToServerEvents = {
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export { AGENT_TYPE, AGENT_TYPE_LABELS, DEFAULT_AGENT_TYPE, isAgentType, } from
|
|
|
5
5
|
export type { AgentType } from "./constants/agent-type.js";
|
|
6
6
|
export { EFFORT_LEVELS, EFFORT_LEVEL_LABELS, } from "./constants/effort-level.js";
|
|
7
7
|
export type { EffortLevel } from "./constants/effort-level.js";
|
|
8
|
+
export { KNOWN_MODEL_SUGGESTIONS, LIVE_CATALOG_ENGINES, } from "./constants/known-models.js";
|
|
9
|
+
export type { KnownModelSuggestion } from "./constants/known-models.js";
|
|
8
10
|
export { CLI_STATUS } from "./constants/cli-status.js";
|
|
9
11
|
export { WORKFLOW_TYPE } from "./constants/workflow-type.js";
|
|
10
12
|
export type { WorkflowType } from "./constants/workflow-type.js";
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export { KANBAN_SUB_STATUS, DEFAULT_KANBAN_COLUMNS, KANBAN_COLUMN_COLORS, DEFAUL
|
|
|
3
3
|
export { AGENT_STATUS } from "./constants/agent-status.js";
|
|
4
4
|
export { AGENT_TYPE, AGENT_TYPE_LABELS, DEFAULT_AGENT_TYPE, isAgentType, } from "./constants/agent-type.js";
|
|
5
5
|
export { EFFORT_LEVELS, EFFORT_LEVEL_LABELS, } from "./constants/effort-level.js";
|
|
6
|
+
export { KNOWN_MODEL_SUGGESTIONS, LIVE_CATALOG_ENGINES, } from "./constants/known-models.js";
|
|
6
7
|
export { CLI_STATUS } from "./constants/cli-status.js";
|
|
7
8
|
export { WORKFLOW_TYPE } from "./constants/workflow-type.js";
|
|
8
9
|
export { WORKFLOW_SCOPE } from "./constants/workflow-scope.js";
|
package/package.json
CHANGED