@celestia-island/plana-types 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/Cargo.toml +38 -0
- package/bindings/FileAnchor.ts +3 -0
- package/bindings/engine.ts +277 -0
- package/bindings/enums.ts +31 -0
- package/bindings/httpTypes.ts +197 -0
- package/bindings/index.ts +47 -0
- package/bindings/mcp/aporia.ts +61 -0
- package/bindings/mcp/eleos.ts +18 -0
- package/bindings/mcp/epieikeia.ts +48 -0
- package/bindings/mcp/haplotes.ts +47 -0
- package/bindings/mcp/hubris.ts +41 -0
- package/bindings/mcp/index.ts +13 -0
- package/bindings/mcp/kalos.ts +47 -0
- package/bindings/mcp/neikos.ts +76 -0
- package/bindings/mcp/orexis.ts +64 -0
- package/bindings/mcp/philia.ts +57 -0
- package/bindings/mcp/polemos.ts +55 -0
- package/bindings/mcp/skemma.ts +58 -0
- package/bindings/mcp/skopeo.ts +56 -0
- package/bindings/mcp/webAutomation.ts +31 -0
- package/bindings/model.ts +240 -0
- package/bindings/package.json +16 -0
- package/bindings/region.ts +3 -0
- package/bindings/serde_json/JsonValue.ts +3 -0
- package/bindings/ws/agentLifecycle.ts +41 -0
- package/bindings/ws/auth.ts +15 -0
- package/bindings/ws/baseMessages.ts +7 -0
- package/bindings/ws/bridgeNetwork.ts +71 -0
- package/bindings/ws/core.ts +51 -0
- package/bindings/ws/fileBrowsing.ts +57 -0
- package/bindings/ws/handshake.ts +23 -0
- package/bindings/ws/industrial.ts +72 -0
- package/bindings/ws/knowledgeBase.ts +10 -0
- package/bindings/ws/layer2.ts +25 -0
- package/bindings/ws/llmProvider.ts +74 -0
- package/bindings/ws/logs.ts +11 -0
- package/bindings/ws/malkuth.ts +62 -0
- package/bindings/ws/noa.ts +17 -0
- package/bindings/ws/stateSync.ts +19 -0
- package/bindings/ws/systemUi.ts +5 -0
- package/bindings/ws/tasks.ts +6 -0
- package/bindings/ws/views.ts +163 -0
- package/bindings/ws/workspace.ts +11 -0
- package/bindings/ws/yolo.ts +32 -0
- package/examples/schema_dump.rs +51 -0
- package/package.json +6 -0
- package/pnpm-workspace.yaml +2 -0
- package/src/engine.rs +602 -0
- package/src/enums.rs +334 -0
- package/src/external_mcp.rs +132 -0
- package/src/http.rs +1077 -0
- package/src/identity.rs +160 -0
- package/src/lib.rs +1215 -0
- package/src/malkuth.rs +145 -0
- package/src/mcp/aporia.rs +272 -0
- package/src/mcp/eleos.rs +210 -0
- package/src/mcp/epieikeia.rs +194 -0
- package/src/mcp/haplotes.rs +310 -0
- package/src/mcp/hubris.rs +377 -0
- package/src/mcp/kalos.rs +251 -0
- package/src/mcp/mod.rs +23 -0
- package/src/mcp/neikos.rs +533 -0
- package/src/mcp/orexis.rs +493 -0
- package/src/mcp/philia.rs +267 -0
- package/src/mcp/polemos.rs +241 -0
- package/src/mcp/skemma.rs +442 -0
- package/src/mcp/skopeo.rs +282 -0
- package/src/mcp/web_automation.rs +122 -0
- package/src/model.rs +421 -0
- package/src/protocol/base_messages.rs +125 -0
- package/src/protocol/handshake.rs +364 -0
- package/src/protocol/jsonrpc.rs +888 -0
- package/src/protocol/mod.rs +10 -0
- package/src/rbac.rs +786 -0
- package/src/region.rs +362 -0
- package/src/tracing_helpers.rs +9 -0
- package/src/ws/agent/agent_lifecycle.rs +221 -0
- package/src/ws/agent/layer2.rs +126 -0
- package/src/ws/agent/mod.rs +9 -0
- package/src/ws/agent/state_sync.rs +111 -0
- package/src/ws/agent/tasks.rs +43 -0
- package/src/ws/agent/yolo.rs +161 -0
- package/src/ws/mod.rs +10 -0
- package/src/ws/services/auth.rs +99 -0
- package/src/ws/services/industrial.rs +647 -0
- package/src/ws/services/knowledge_base.rs +59 -0
- package/src/ws/services/llm_provider.rs +371 -0
- package/src/ws/services/mod.rs +7 -0
- package/src/ws/ui/bridge_network.rs +96 -0
- package/src/ws/ui/file_browsing.rs +88 -0
- package/src/ws/ui/logs.rs +55 -0
- package/src/ws/ui/mod.rs +11 -0
- package/src/ws/ui/noa.rs +105 -0
- package/src/ws/ui/system_ui.rs +27 -0
- package/src/ws/ui/views.rs +159 -0
- package/src/ws/ui/workspace.rs +73 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { GenerationTier, HardwareRequirements, ModelCapability } from "../model";
|
|
3
|
+
import type { PeriodType } from "./core";
|
|
4
|
+
|
|
5
|
+
export type ApiKeyInfoResponseParams = { info: KeyInfo, };
|
|
6
|
+
|
|
7
|
+
export type ConfiguredProviderInfo = { provider_name: string, display_name: string, api_endpoint?: string, default_model: string, is_enabled: boolean, };
|
|
8
|
+
|
|
9
|
+
export type ConfiguredProvidersListParams = { providers: Array<ConfiguredProviderInfo>, };
|
|
10
|
+
|
|
11
|
+
export type EndpointValidatedParams = { provider_name: string, is_reachable: boolean, latency_ms?: bigint, error?: string, };
|
|
12
|
+
|
|
13
|
+
export type EntrypointApiConfigInfo = { protocol: string, base_url: string, chat_endpoint: string, models_endpoint?: string, auth_type: string, auth_header?: string, env_var: string, };
|
|
14
|
+
|
|
15
|
+
export type EntrypointConfigInfo = { id: string, name: { [key in string]: string }, type: string, billing_type: string, plan_tier: string, api: EntrypointApiConfigInfo, defaults: EntrypointDefaultsInfo, quotas: Array<QuotaInfo>, models: Array<string>, };
|
|
16
|
+
|
|
17
|
+
export type EntrypointDefaultsInfo = { deep: Array<string>, normal: Array<string>, basic: Array<string>, max_concurrent: MaxConcurrentInfo, };
|
|
18
|
+
|
|
19
|
+
export type KeyInfo = { provider: string, display_name: string, has_key: boolean, created_at: string, updated_at: string, source: string, };
|
|
20
|
+
|
|
21
|
+
export type KeysListResponseParams = { keys: Array<KeyInfo>, };
|
|
22
|
+
|
|
23
|
+
export type LlmProviderConfiguredParams = { provider_name: string, success: boolean, error?: string, };
|
|
24
|
+
|
|
25
|
+
export type MaxConcurrentInfo = { deep: number, normal: number, basic: number, };
|
|
26
|
+
|
|
27
|
+
export type ModelFsInfo = { id: string, name: string, provider_id: string, context_window: bigint, max_output_tokens: bigint, supports_vision: boolean, supports_function_calling: boolean, supports_streaming: boolean, supports_reasoning: boolean, tags: Array<string>,
|
|
28
|
+
/**
|
|
29
|
+
* Fine-grained capability flags. When non-empty, supersedes the boolean
|
|
30
|
+
* flags above for skill→model routing. See [`crate::ModelCapability`].
|
|
31
|
+
*/
|
|
32
|
+
capabilities: Array<ModelCapability>,
|
|
33
|
+
/**
|
|
34
|
+
* Generation quality tier (image / 3D generation models only).
|
|
35
|
+
* See [`crate::GenerationTier`].
|
|
36
|
+
*/
|
|
37
|
+
generation_tier?: GenerationTier,
|
|
38
|
+
/**
|
|
39
|
+
* Hardware requirements (local generative models only).
|
|
40
|
+
* See [`crate::HardwareRequirements`].
|
|
41
|
+
*/
|
|
42
|
+
hardware_requirements?: HardwareRequirements, pricing?: ModelFsPricing, rate_multiplier?: number, rate_rules: Array<RateRuleInfo>, };
|
|
43
|
+
|
|
44
|
+
export type ModelFsInfoParams = { models: Array<ModelFsInfo>, };
|
|
45
|
+
|
|
46
|
+
export type ModelFsPricing = { input_per_million?: number, output_per_million?: number, cached_per_million?: number, };
|
|
47
|
+
|
|
48
|
+
export type ModelProviderConfigUpdatedParams = { provider_name: string, success: boolean, error?: string, };
|
|
49
|
+
|
|
50
|
+
export type ProviderCapabilitiesInfo = { streaming: boolean, function_calling: boolean, vision: boolean, reasoning: boolean, };
|
|
51
|
+
|
|
52
|
+
export type ProviderDeletedParams = { provider_name: string, success: boolean, error?: string, };
|
|
53
|
+
|
|
54
|
+
export type ProviderEditedParams = { provider_name: string, success: boolean, error?: string, };
|
|
55
|
+
|
|
56
|
+
export type ProviderFsInfo = { id: string, name: { [key in string]: string }, protocol: string, category: string, base_url?: string, entry_points: Array<EntrypointConfigInfo>, models: Array<ModelFsInfo>, capabilities: ProviderCapabilitiesInfo, limits: ProviderLimitsInfo, pricing_model: string, };
|
|
57
|
+
|
|
58
|
+
export type ProviderFsInfoParams = { providers: Array<ProviderFsInfo>, };
|
|
59
|
+
|
|
60
|
+
export type ProviderLimitsInfo = { max_concurrent: number, rate_limit_per_minute?: number, timeout_seconds: bigint, };
|
|
61
|
+
|
|
62
|
+
export type ProviderRenamedParams = { provider_name: string, new_display_name: string, success: boolean, error?: string, };
|
|
63
|
+
|
|
64
|
+
export type QuotaInfo = { data_limit: bigint, period_hours?: number, period_days?: number, billing_metric: string, };
|
|
65
|
+
|
|
66
|
+
export type RateRuleInfo = { timezone_offset: number, peak_start: number, peak_end: number, peak_multiplier: number, off_peak_multiplier: number, };
|
|
67
|
+
|
|
68
|
+
export type UsagePeriodData = { user_id: string, period_type: PeriodType, used_tokens: bigint, cost: number, start_time: string, remaining_tokens?: bigint, remaining_cost?: number, };
|
|
69
|
+
|
|
70
|
+
export type UsagePeriodResponseParams = { data: Array<UsagePeriodData>, };
|
|
71
|
+
|
|
72
|
+
export type UserConfigResponseParams = { config: UserInfoConfig, };
|
|
73
|
+
|
|
74
|
+
export type UserInfoConfig = { preferred_language: string, default_models: { [key in string]: string }, enabled_providers: Array<string>, enabled_models: Array<string>, model_priorities: { [key in string]: number }, auto_import_from_env: Array<string>, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
export type ContainerLogEntryParams = { instance_uuid: string, entry: LogEntryData, };
|
|
4
|
+
|
|
5
|
+
export type LogEntryData = { source: string, instance_uuid?: string, level: string, target?: string, message: string, fields: Record<string, unknown>, created_at: string, };
|
|
6
|
+
|
|
7
|
+
export type ServerLogEntryParams = { entry: LogEntryData, };
|
|
8
|
+
|
|
9
|
+
export type SubscribeLogsResponseParams = { ok: boolean, error?: string, entries: Array<LogEntryData>, };
|
|
10
|
+
|
|
11
|
+
export type UnsubscribeLogsResponseParams = { ok: boolean, error?: string, };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Describes how clients connect to a supervised worker.
|
|
5
|
+
*/
|
|
6
|
+
export type ConnectionEndpoint = { protocol: ConnectionProtocol, address: string, port: number, };
|
|
7
|
+
|
|
8
|
+
export type ConnectionProtocol = "http" | "ws" | "ipc" | "tcp";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* External request to drain (gracefully shut down) a supervised worker.
|
|
12
|
+
* Sent to malkuth daemon after a restart proposal has been approved.
|
|
13
|
+
*/
|
|
14
|
+
export type DrainRequest = {
|
|
15
|
+
/**
|
|
16
|
+
* Which worker to drain.
|
|
17
|
+
*/
|
|
18
|
+
worker_id: string,
|
|
19
|
+
/**
|
|
20
|
+
* Authorization: must match a previously approved GateDecision.proposal_id.
|
|
21
|
+
*/
|
|
22
|
+
proposal_id: string,
|
|
23
|
+
/**
|
|
24
|
+
* Optional drain budget in seconds (default derived from worker config).
|
|
25
|
+
*/
|
|
26
|
+
drain_budget_secs: bigint | null, };
|
|
27
|
+
|
|
28
|
+
export type GateDecision = "allow" | "review" | "block";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Health probe response returned by each worker at `/healthz` or `/readyz`.
|
|
32
|
+
*/
|
|
33
|
+
export type HealthResponse = { worker_id: string, healthy: boolean, ready: boolean,
|
|
34
|
+
/**
|
|
35
|
+
* If not ready, the reason (e.g. "draining", "starting").
|
|
36
|
+
*/
|
|
37
|
+
not_ready_reason: string | null, uptime_secs: bigint, version: string, };
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* OreXis LAYER3_PREFLIGHT_GUARD gate decision for a restart proposal.
|
|
41
|
+
*/
|
|
42
|
+
export type RestartGateDecision = { proposal_id: string, decision: GateDecision, findings: Array<string>, reason: string, };
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* A rebuild has completed and restart is proposed for a supervised worker.
|
|
46
|
+
*/
|
|
47
|
+
export type RestartProposal = { proposal_id: string, worker_id: string, repo_path: string, git_diff_summary: string, affected_services: Array<string>, risk_estimate: RestartRisk, };
|
|
48
|
+
|
|
49
|
+
export type RestartRisk = "low" | "medium" | "high" | "critical";
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Registers a new worker with the malkuth supervisor.
|
|
53
|
+
* Sent by a worker at startup to announce its presence and capabilities.
|
|
54
|
+
*/
|
|
55
|
+
export type WorkerRegistration = { worker_id: string, worker_kind: string, repo_path: string, connections: Array<ConnectionEndpoint>, health_check_path: string | null, drain_budget_secs: bigint, };
|
|
56
|
+
|
|
57
|
+
export type WorkerState = "running" | "draining" | "stopped" | "crashed";
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Current status of a supervised worker returned by malkuth when queried.
|
|
61
|
+
*/
|
|
62
|
+
export type WorkerStatus = { worker_id: string, state: WorkerState, pid: number | null, restart_count: number, last_restart_at: string | null, connections: Array<ConnectionEndpoint>, };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
export type NoaAuthRequestParams = { workspace_id: string, branches: Array<string>, suggested_branch: string, reason: string, };
|
|
4
|
+
|
|
5
|
+
export type NoaAuthResponseParams = { workspace_id: string, selected_branch: string, branch_base?: string, approved: boolean, };
|
|
6
|
+
|
|
7
|
+
export type NoaEvent = { event_id: string, event_type: string, timestamp: string, file_path?: string, content_hash?: string, metadata?: Record<string, unknown>, };
|
|
8
|
+
|
|
9
|
+
export type NoaEventSyncAckParams = { workspace_id: string, last_event_id: string, };
|
|
10
|
+
|
|
11
|
+
export type NoaEventSyncParams = { workspace_id: string, events: Array<NoaEvent>, direction?: string, };
|
|
12
|
+
|
|
13
|
+
export type NoaHandshakeResponseParams = { workspace_id: string, repo_id: string, current_branch: string, noa_initialized: boolean, gitignore_updated: boolean, };
|
|
14
|
+
|
|
15
|
+
export type NoaReadyParams = { workspace_id: string, branch: string, snapshot_id: string, };
|
|
16
|
+
|
|
17
|
+
export type RequestNoaHandshakeParams = { workspace_id: string, remote_name: string, remote_path: string, };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { TuiAgentInfo } from "./agentLifecycle";
|
|
3
|
+
import type { ContainerStatus, TaskStatus } from "./core";
|
|
4
|
+
|
|
5
|
+
export type ContainerInfo = { id: string, name: string, status: ContainerStatus, cpu_usage: number, memory_mb: bigint, image: string, agent_type?: string, parent_id?: string, branch_level: number, is_cosmos: boolean, branch?: string, is_read_only: boolean, badge?: string, current_skill?: string, workspace_id?: string, workspace_path?: string, git_remote_url?: string, git_branch?: string, };
|
|
6
|
+
|
|
7
|
+
export type ContainerSnapshotData = { version: bigint, timestamp: bigint, containers: Array<ContainerInfo>, };
|
|
8
|
+
|
|
9
|
+
export type ContainerSnapshotParams = { snapshot: ContainerSnapshotData, };
|
|
10
|
+
|
|
11
|
+
export type GlobalSnapshotData = { version: bigint, timestamp: bigint, agents: Array<TuiAgentInfo>, containers: Array<ContainerInfo>, active_tasks: Array<TaskInfo>, };
|
|
12
|
+
|
|
13
|
+
export type GlobalSnapshotParams = { snapshot: GlobalSnapshotData, };
|
|
14
|
+
|
|
15
|
+
export type TaskInfo = { id: string, issue_id: string, title: string, status: TaskStatus, progress: number, assigned_agent?: string, };
|
|
16
|
+
|
|
17
|
+
export type TasksSnapshotData = { version: bigint, timestamp: bigint, tasks: Array<TaskInfo>, };
|
|
18
|
+
|
|
19
|
+
export type TasksSnapshotParams = { snapshot: TasksSnapshotData, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
export type WebUiControlResponseParams = { command: string, success: boolean, message: string, url?: string, };
|
|
4
|
+
|
|
5
|
+
export type WebUiStatusParams = { running: boolean, url?: string, container_id?: string, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { Agent, TaskStatus } from "./core";
|
|
3
|
+
|
|
4
|
+
export type TaskCreatedParams = { task_id: string, issue_id: string, title: string, description?: string, assigned_agent?: Agent, parent_task_id?: string, badge?: string, tags?: Array<string>, };
|
|
5
|
+
|
|
6
|
+
export type TaskStatusUpdateParams = { task_id: string, status: TaskStatus, progress: number, };
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Dashboard layout — a collection of views arranged in a grid.
|
|
5
|
+
*/
|
|
6
|
+
export type DashboardLayout = {
|
|
7
|
+
/**
|
|
8
|
+
* Workspace ID this dashboard belongs to.
|
|
9
|
+
*/
|
|
10
|
+
workspace_id: string,
|
|
11
|
+
/**
|
|
12
|
+
* Dashboard name.
|
|
13
|
+
*/
|
|
14
|
+
name: string,
|
|
15
|
+
/**
|
|
16
|
+
* All view instances in this dashboard.
|
|
17
|
+
*/
|
|
18
|
+
views: Array<ViewInstance>,
|
|
19
|
+
/**
|
|
20
|
+
* Grid columns count (0 = auto).
|
|
21
|
+
*/
|
|
22
|
+
grid_columns: number, };
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Push a dashboard layout update to connected clients.
|
|
26
|
+
*/
|
|
27
|
+
export type DashboardLayoutPushParams = { layout: DashboardLayout, };
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A widget inside a webui dashboard descriptor (P3#A4).
|
|
31
|
+
*
|
|
32
|
+
* Mirrors the shittim-chest `WidgetDescriptor` (dashboard.ts) so the
|
|
33
|
+
* agent-side push tool can construct widgets the webui understands
|
|
34
|
+
* without knowing its internals.
|
|
35
|
+
*/
|
|
36
|
+
export type DashboardWidget = {
|
|
37
|
+
/**
|
|
38
|
+
* Unique widget id within the layout.
|
|
39
|
+
*/
|
|
40
|
+
id: string,
|
|
41
|
+
/**
|
|
42
|
+
* Renderer discriminator ("gauge-row", "node-graph", "data-table", …).
|
|
43
|
+
*/
|
|
44
|
+
type: string,
|
|
45
|
+
/**
|
|
46
|
+
* Optional display title.
|
|
47
|
+
*/
|
|
48
|
+
title?: string,
|
|
49
|
+
/**
|
|
50
|
+
* Data-source label (free-form).
|
|
51
|
+
*/
|
|
52
|
+
source: string,
|
|
53
|
+
/**
|
|
54
|
+
* Grid span hint ("full" | "half").
|
|
55
|
+
*/
|
|
56
|
+
span?: string,
|
|
57
|
+
/**
|
|
58
|
+
* Widget-specific configuration.
|
|
59
|
+
*/
|
|
60
|
+
config?: Record<string, unknown>,
|
|
61
|
+
/**
|
|
62
|
+
* Initial data payload (shape depends on widget type).
|
|
63
|
+
*/
|
|
64
|
+
data?: Record<string, unknown>, };
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* View data update — incremental data push for a specific view.
|
|
68
|
+
*/
|
|
69
|
+
export type ViewDataPushParams = {
|
|
70
|
+
/**
|
|
71
|
+
* Target view ID.
|
|
72
|
+
*/
|
|
73
|
+
view_id: string,
|
|
74
|
+
/**
|
|
75
|
+
* Data payload (format depends on ViewKind).
|
|
76
|
+
*/
|
|
77
|
+
data: Record<string, unknown>,
|
|
78
|
+
/**
|
|
79
|
+
* Whether this is a full replacement or incremental update.
|
|
80
|
+
*/
|
|
81
|
+
full_replace: boolean, };
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* A view instance — one panel in the dashboard.
|
|
85
|
+
*/
|
|
86
|
+
export type ViewInstance = {
|
|
87
|
+
/**
|
|
88
|
+
* Unique view ID within the workspace.
|
|
89
|
+
*/
|
|
90
|
+
view_id: string,
|
|
91
|
+
/**
|
|
92
|
+
* What kind of renderer to use.
|
|
93
|
+
*/
|
|
94
|
+
kind: ViewKind,
|
|
95
|
+
/**
|
|
96
|
+
* Display title.
|
|
97
|
+
*/
|
|
98
|
+
title: string,
|
|
99
|
+
/**
|
|
100
|
+
* Data source identifier — what the view is bound to.
|
|
101
|
+
* Examples: "industrial:station:19", "chat:conversation:abc",
|
|
102
|
+
* "kanban:project:xyz", "media:flow:comfyui"
|
|
103
|
+
*/
|
|
104
|
+
data_source: string,
|
|
105
|
+
/**
|
|
106
|
+
* View-specific configuration (JSON, interpreted by the renderer).
|
|
107
|
+
*/
|
|
108
|
+
config: Record<string, unknown>,
|
|
109
|
+
/**
|
|
110
|
+
* Layout position (grid area, tab order, etc.).
|
|
111
|
+
*/
|
|
112
|
+
layout?: ViewLayout, };
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Widget create/update/delete on an existing layout (P3#A4).
|
|
116
|
+
*/
|
|
117
|
+
export type ViewInstancePushParams = {
|
|
118
|
+
/**
|
|
119
|
+
* Target layout (panel instance) id.
|
|
120
|
+
*/
|
|
121
|
+
layout_id: string,
|
|
122
|
+
/**
|
|
123
|
+
* Mutation: "create" | "update" | "delete".
|
|
124
|
+
*/
|
|
125
|
+
op: string,
|
|
126
|
+
/**
|
|
127
|
+
* Widget descriptor to create/update (ignored for delete).
|
|
128
|
+
*/
|
|
129
|
+
widget: DashboardWidget, };
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* View type identifier — determines which frontend renderer handles the view.
|
|
133
|
+
*/
|
|
134
|
+
export type ViewKind = "industrial_scada" | "chat" | "kanban" | "gantt" | "data_table" | "media_flow" | "file_explorer" | "custom";
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Layout descriptor for a view within the dashboard grid.
|
|
138
|
+
*/
|
|
139
|
+
export type ViewLayout = {
|
|
140
|
+
/**
|
|
141
|
+
* Grid column start (1-based).
|
|
142
|
+
*/
|
|
143
|
+
col: number,
|
|
144
|
+
/**
|
|
145
|
+
* Grid row start (1-based).
|
|
146
|
+
*/
|
|
147
|
+
row: number,
|
|
148
|
+
/**
|
|
149
|
+
* Column span.
|
|
150
|
+
*/
|
|
151
|
+
col_span: number,
|
|
152
|
+
/**
|
|
153
|
+
* Row span.
|
|
154
|
+
*/
|
|
155
|
+
row_span: number,
|
|
156
|
+
/**
|
|
157
|
+
* Minimum width in pixels.
|
|
158
|
+
*/
|
|
159
|
+
min_width?: number,
|
|
160
|
+
/**
|
|
161
|
+
* Minimum height in pixels.
|
|
162
|
+
*/
|
|
163
|
+
min_height?: number, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
export type PolemosDeviceInfo = { node_id: string, name: string, address: string, status: string, workspace_path?: string, ide_id?: string, };
|
|
4
|
+
|
|
5
|
+
export type PolemosDeviceListParams = { devices: Array<PolemosDeviceInfo>, };
|
|
6
|
+
|
|
7
|
+
export type RegisterPolemosDeviceResponseParams = { success: boolean, error?: string, device?: PolemosDeviceInfo, };
|
|
8
|
+
|
|
9
|
+
export type SwitchWorkspaceResponseParams = { success: boolean, workspace_id: string, error?: string, };
|
|
10
|
+
|
|
11
|
+
export type WorkspaceStatusParams = { workspace_id: string, display_name?: string, connection_kind: string, resolved_path?: string, remote_url?: string, branch?: string, host_id?: string, };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { YoloTaskTier } from "./core";
|
|
3
|
+
|
|
4
|
+
export type YoloConfigResponseParams = { tiers: Array<YoloTierConfig>, };
|
|
5
|
+
|
|
6
|
+
export type YoloCycleCompleteParams = { loop_count: bigint, duration_ms: bigint, };
|
|
7
|
+
|
|
8
|
+
export type YoloCycleStepParams = { skill: string, loop_count: bigint, status: string, token_usage?: [number, number], model_name?: string, };
|
|
9
|
+
|
|
10
|
+
export type YoloRunTierNowResponseParams = { ok: boolean, error?: string, };
|
|
11
|
+
|
|
12
|
+
export type YoloSetTierIntervalResponseParams = { ok: boolean, error?: string, };
|
|
13
|
+
|
|
14
|
+
export type YoloStartResponseParams = { ok: boolean, error?: string, };
|
|
15
|
+
|
|
16
|
+
export type YoloStatusResponseParams = { active: boolean, loop_count: bigint, started_at?: string, current_cycle?: string, tiers: Array<YoloTierStatus>, };
|
|
17
|
+
|
|
18
|
+
export type YoloStopResponseParams = { ok: boolean, error?: string, };
|
|
19
|
+
|
|
20
|
+
export type YoloTaskResult = { success: boolean, duration_ms: bigint, completed_at: string, error?: string, };
|
|
21
|
+
|
|
22
|
+
export type YoloTaskStatus = { agent: string, skill: string, enabled: boolean, last_result?: YoloTaskResult, };
|
|
23
|
+
|
|
24
|
+
export type YoloTerminateResponseParams = { ok: boolean, error?: string, };
|
|
25
|
+
|
|
26
|
+
export type YoloTierConfig = { tier: YoloTaskTier, enabled: boolean, interval_secs: bigint, tasks: Array<YoloTierTaskConfig>, };
|
|
27
|
+
|
|
28
|
+
export type YoloTierStatus = { tier: YoloTaskTier, enabled: boolean, interval_secs: bigint, last_run_at?: string, next_run_at?: string, tasks: Array<YoloTaskStatus>, };
|
|
29
|
+
|
|
30
|
+
export type YoloTierTaskConfig = { agent: string, skill: string, enabled: boolean, };
|
|
31
|
+
|
|
32
|
+
export type YoloUpdateTaskResponseParams = { ok: boolean, error?: string, };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/// Schema dump tool — exports JsonSchema from plana types as JSON.
|
|
2
|
+
/// Run: cargo run --example schema_dump > plana_schema.json
|
|
3
|
+
use schemars::schema_for;
|
|
4
|
+
|
|
5
|
+
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
6
|
+
let schemas = serde_json::json!({
|
|
7
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
8
|
+
"definitions": {
|
|
9
|
+
"Agent": schema_for!(plana_types::Agent),
|
|
10
|
+
"AgentBadge": schema_for!(plana_types::AgentBadge),
|
|
11
|
+
"AgentErrorCode": schema_for!(plana_types::AgentErrorCode),
|
|
12
|
+
"AgentStatus": schema_for!(plana_types::AgentStatus),
|
|
13
|
+
"CompletionOutcome": schema_for!(plana_types::CompletionOutcome),
|
|
14
|
+
"ContainerStatus": schema_for!(plana_types::ContainerStatus),
|
|
15
|
+
"EmbeddingModel": schema_for!(plana_types::EmbeddingModel),
|
|
16
|
+
"KnowledgeBaseStatus": schema_for!(plana_types::KnowledgeBaseStatus),
|
|
17
|
+
"LlmStream": schema_for!(plana_types::LlmStream),
|
|
18
|
+
"ModelTier": schema_for!(plana_types::ModelTier),
|
|
19
|
+
"PeriodType": schema_for!(plana_types::PeriodType),
|
|
20
|
+
"ReportSelection": schema_for!(plana_types::ReportSelection),
|
|
21
|
+
"ReportType": schema_for!(plana_types::ReportType),
|
|
22
|
+
"RequestState": schema_for!(plana_types::RequestState),
|
|
23
|
+
"RetryReason": schema_for!(plana_types::RetryReason),
|
|
24
|
+
"RouteInfo": schema_for!(plana_types::RouteInfo),
|
|
25
|
+
"SkillStage": schema_for!(plana_types::SkillStage),
|
|
26
|
+
"StreamChunkKind": schema_for!(plana_types::StreamChunkKind),
|
|
27
|
+
"StreamSegment": schema_for!(plana_types::StreamSegment),
|
|
28
|
+
"StructuredAgentError": schema_for!(plana_types::StructuredAgentError),
|
|
29
|
+
"TaskStatus": schema_for!(plana_types::TaskStatus),
|
|
30
|
+
"WorkStatus": schema_for!(plana_types::WorkStatus),
|
|
31
|
+
"YoloTaskTier": schema_for!(plana_types::YoloTaskTier),
|
|
32
|
+
"ModelCategory": schema_for!(plana_types::model::ModelCategory),
|
|
33
|
+
"ModelBackend": schema_for!(plana_types::model::ModelBackend),
|
|
34
|
+
"ModelDescriptor": schema_for!(plana_types::model::ModelDescriptor),
|
|
35
|
+
"ModelServerStatus": schema_for!(plana_types::model::ModelServerStatus),
|
|
36
|
+
"ModelServerInfo": schema_for!(plana_types::model::ModelServerInfo),
|
|
37
|
+
"ModelServerKind": schema_for!(plana_types::model::ModelServerKind),
|
|
38
|
+
"ModelServerAction": schema_for!(plana_types::model::ModelServerAction),
|
|
39
|
+
"ModelInferenceRequest": schema_for!(plana_types::model::ModelInferenceRequest),
|
|
40
|
+
"ModelInferenceResult": schema_for!(plana_types::model::ModelInferenceResult),
|
|
41
|
+
"AgentStreamingChunkParams": schema_for!(plana_types::AgentStreamingChunkParams),
|
|
42
|
+
"McpToolResultParams": schema_for!(plana_types::McpToolResultParams),
|
|
43
|
+
"TaskCreatedParams": schema_for!(plana_types::TaskCreatedParams),
|
|
44
|
+
"TaskStatusUpdateParams": schema_for!(plana_types::TaskStatusUpdateParams),
|
|
45
|
+
"TuiAgentInfo": schema_for!(plana_types::TuiAgentInfo),
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
let json = serde_json::to_string_pretty(&schemas)?;
|
|
49
|
+
println!("{json}");
|
|
50
|
+
Ok(())
|
|
51
|
+
}
|
package/package.json
ADDED