@h-rig/omp-extension-plugin 0.0.6-alpha.186
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/README.md +1 -0
- package/dist/src/cockpit/board-views.d.ts +100 -0
- package/dist/src/cockpit/board-views.js +298 -0
- package/dist/src/cockpit/cockpit-product.d.ts +12 -0
- package/dist/src/cockpit/cockpit-product.js +55 -0
- package/dist/src/cockpit/drone-preloader.d.ts +11 -0
- package/dist/src/cockpit/drone-preloader.js +220 -0
- package/dist/src/cockpit/extension.d.ts +85 -0
- package/dist/src/cockpit/extension.js +2222 -0
- package/dist/src/cockpit/plugin.d.ts +14 -0
- package/dist/src/cockpit/plugin.js +2277 -0
- package/dist/src/cockpit/screen-catalog.d.ts +55 -0
- package/dist/src/cockpit/screen-catalog.js +65 -0
- package/dist/src/plugin.d.ts +4 -0
- package/dist/src/plugin.js +2596 -0
- package/dist/src/product-entrypoint/contributions.d.ts +3 -0
- package/dist/src/product-entrypoint/contributions.js +215 -0
- package/dist/src/product-entrypoint/metadata.d.ts +17 -0
- package/dist/src/product-entrypoint/metadata.js +29 -0
- package/dist/src/product-entrypoint/plugin.d.ts +4 -0
- package/dist/src/product-entrypoint/plugin.js +300 -0
- package/dist/src/product-entrypoint/product-entrypoint.d.ts +14 -0
- package/dist/src/product-entrypoint/product-entrypoint.js +136 -0
- package/dist/src/product-entrypoint/product-help.d.ts +6 -0
- package/dist/src/product-entrypoint/product-help.js +57 -0
- package/package.json +39 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { type ExtensionAPI, type ExtensionContext } from "@oh-my-pi/pi-coding-agent";
|
|
2
|
+
import { type Placement, type RigSetupStatus, type RigTask, type RunReadModelInboxRecord as InboxRecord, type RunReadModelRunClassification, type RunReadModelStageRow, type RunRecord } from "@rig/contracts";
|
|
3
|
+
import { type PanelRegistration, type RigCockpitBoard, type RigCockpitRow } from "@rig/contracts";
|
|
4
|
+
import { type DetailModel } from "./board-views";
|
|
5
|
+
import { type SettingItem } from "@oh-my-pi/pi-tui";
|
|
6
|
+
import { type RigScreen, type ScreenDescriptor } from "./screen-catalog";
|
|
7
|
+
import { type TaskProjectionCapability } from "./cockpit-product";
|
|
8
|
+
type ActionProgress = (message: string) => void;
|
|
9
|
+
type RigFlowActions = {
|
|
10
|
+
act(id: string, input?: string, onProgress?: ActionProgress): Promise<void>;
|
|
11
|
+
};
|
|
12
|
+
type RigServerState = Placement & {
|
|
13
|
+
readonly detail?: string | null;
|
|
14
|
+
/** V50: transport-projected dispatch-target readiness (PLACEMENT_SERVICE.isDispatchReady). */
|
|
15
|
+
readonly dispatchReady?: boolean;
|
|
16
|
+
};
|
|
17
|
+
type RigTaskView = RigTask;
|
|
18
|
+
interface RigFlowState {
|
|
19
|
+
readonly projectRoot?: string;
|
|
20
|
+
readonly server?: RigServerState | null;
|
|
21
|
+
readonly selectedTask?: RigTaskView | null;
|
|
22
|
+
readonly selectedTaskId?: string | null;
|
|
23
|
+
/**
|
|
24
|
+
* Rows for the CURRENT screen, produced generically by whichever plugin owns
|
|
25
|
+
* that screen's cockpit panel (config/doctor/setup/inspect/stats/server/remote
|
|
26
|
+
* and any future contributed screen). The host does not know which plugin owns
|
|
27
|
+
* which screen — it resolves the panel whose id equals the current screen and
|
|
28
|
+
* renders whatever rows it returns. `undefined` when the screen is a host-frame
|
|
29
|
+
* or board screen the host renders itself (cockpit/runs/tasks/inbox).
|
|
30
|
+
*/
|
|
31
|
+
readonly panelRows?: readonly RigCockpitRow[];
|
|
32
|
+
/**
|
|
33
|
+
* Live board content for the CURRENT screen (runs/tasks/inbox), produced by
|
|
34
|
+
* the owning plugin's `produceBoard`. The host renders the matching generic
|
|
35
|
+
* board component and knows no domain record shape. `undefined` when the
|
|
36
|
+
* current screen has no board producer.
|
|
37
|
+
*/
|
|
38
|
+
readonly board?: RigCockpitBoard;
|
|
39
|
+
/** Pending inbox counts, `"error"` when the count load failed (render as indeterminate, not 0), or absent when not loaded. */
|
|
40
|
+
readonly runClassifications?: ReadonlyMap<string, RunClassification>;
|
|
41
|
+
readonly runStageRows?: ReadonlyMap<string, readonly RunReadModelStageRow[]>;
|
|
42
|
+
readonly runActionAffordances?: ReadonlyMap<string, RunActionAffordance>;
|
|
43
|
+
readonly error?: string | null;
|
|
44
|
+
}
|
|
45
|
+
type RunClassification = RunReadModelRunClassification;
|
|
46
|
+
type RunClassificationSource = RigFlowState | RunClassification | null | undefined;
|
|
47
|
+
type RunActionAffordance = {
|
|
48
|
+
readonly attach: boolean;
|
|
49
|
+
readonly steer: boolean;
|
|
50
|
+
readonly stop: boolean;
|
|
51
|
+
readonly pause: boolean;
|
|
52
|
+
readonly resume: boolean;
|
|
53
|
+
};
|
|
54
|
+
declare function detectRigStartupStatus(ctx: ExtensionContext): Promise<RigSetupStatus>;
|
|
55
|
+
declare function loadRigFlowState(ctx: ExtensionContext, screen: RigScreen, selectedTaskId: string | null, api?: ExtensionAPI, runs?: readonly RunRecord[], actionRowsEnabled?: boolean): Promise<RigFlowState>;
|
|
56
|
+
type InboxActionTarget = {
|
|
57
|
+
runId: string;
|
|
58
|
+
requestId: string;
|
|
59
|
+
decision: "approved" | "rejected" | "answered" | null;
|
|
60
|
+
};
|
|
61
|
+
declare function inboxActionId(request: Pick<InboxRecord, "runId" | "requestId">, decision?: "approved" | "rejected" | "answered"): string;
|
|
62
|
+
declare function parseInboxActionTarget(id: string): InboxActionTarget | null;
|
|
63
|
+
declare function defaultFlowActions(api: ExtensionAPI, ctx: ExtensionContext): RigFlowActions;
|
|
64
|
+
declare function runListActionHints(run: RunRecord, source?: RunClassificationSource): readonly {
|
|
65
|
+
key: string;
|
|
66
|
+
label: string;
|
|
67
|
+
id: string;
|
|
68
|
+
}[];
|
|
69
|
+
declare function taskDetailModel(state: RigFlowState, server: RigServerState | null, projection: TaskProjectionCapability): DetailModel;
|
|
70
|
+
declare function runDetailModel(run: RunRecord, source?: RunClassificationSource): DetailModel;
|
|
71
|
+
declare function itemsFor(screen: RigScreen, runs: readonly RunRecord[], actionRowsEnabled: boolean, _selectedRunId: string | null, state?: RigFlowState, catalog?: readonly ScreenDescriptor[], projection?: TaskProjectionCapability): SettingItem[];
|
|
72
|
+
export declare const __rigExtensionTest: {
|
|
73
|
+
itemsFor: typeof itemsFor;
|
|
74
|
+
taskDetailModel: typeof taskDetailModel;
|
|
75
|
+
runDetailModel: typeof runDetailModel;
|
|
76
|
+
defaultFlowActions: typeof defaultFlowActions;
|
|
77
|
+
commandFlowActions: typeof defaultFlowActions;
|
|
78
|
+
loadRigFlowState: typeof loadRigFlowState;
|
|
79
|
+
detectRigStartupStatus: typeof detectRigStartupStatus;
|
|
80
|
+
inboxActionId: typeof inboxActionId;
|
|
81
|
+
parseInboxActionTarget: typeof parseInboxActionTarget;
|
|
82
|
+
runListActionHints: typeof runListActionHints;
|
|
83
|
+
};
|
|
84
|
+
export default function rigExtension(api: ExtensionAPI, panels?: readonly PanelRegistration[]): void;
|
|
85
|
+
export {};
|