@rigkit/provider-vscode 0.2.2 → 0.2.4
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/dist/extension.cjs +6 -45
- package/package.json +2 -2
- package/src/extension.ts +2 -24
- package/src/input.test.ts +1 -6
- package/src/version.ts +1 -1
package/dist/extension.cjs
CHANGED
|
@@ -30205,14 +30205,6 @@ var RuntimeControlProjectInfoEffectSchema = exports_Schema.Struct({
|
|
|
30205
30205
|
workflow: exports_Schema.optional(RuntimeControlWorkflowSummaryEffectSchema),
|
|
30206
30206
|
workflows: exports_Schema.Array(RuntimeControlWorkflowSummaryEffectSchema)
|
|
30207
30207
|
}).annotations({ identifier: "ProjectInfo" });
|
|
30208
|
-
var RuntimeControlHostMethodRequirementEffectSchema = exports_Schema.Struct({
|
|
30209
|
-
id: exports_Schema.String,
|
|
30210
|
-
modes: exports_Schema.optional(exports_Schema.Array(exports_Schema.String))
|
|
30211
|
-
}).annotations({ identifier: "HostMethodRequirement" });
|
|
30212
|
-
var RuntimeControlHostCapabilityRequirementEffectSchema = exports_Schema.Struct({
|
|
30213
|
-
id: exports_Schema.String,
|
|
30214
|
-
schemaHash: OptionalString
|
|
30215
|
-
}).annotations({ identifier: "HostCapabilityRequirement" });
|
|
30216
30208
|
var RuntimeControlOperationCliEffectSchema = exports_Schema.Struct({
|
|
30217
30209
|
positionals: exports_Schema.optional(exports_Schema.Array(exports_Schema.Struct({
|
|
30218
30210
|
name: exports_Schema.String,
|
|
@@ -30235,21 +30227,12 @@ var RuntimeControlOperationEffectSchema = exports_Schema.Struct({
|
|
|
30235
30227
|
title: exports_Schema.String,
|
|
30236
30228
|
description: exports_Schema.String,
|
|
30237
30229
|
createsWorkspace: exports_Schema.optional(exports_Schema.Boolean),
|
|
30238
|
-
requiredHostMethods: exports_Schema.optional(exports_Schema.Array(RuntimeControlHostMethodRequirementEffectSchema)),
|
|
30239
|
-
requiredHostCapabilities: exports_Schema.optional(exports_Schema.Array(RuntimeControlHostCapabilityRequirementEffectSchema)),
|
|
30240
30230
|
cli: exports_Schema.optional(RuntimeControlOperationCliEffectSchema),
|
|
30241
30231
|
inputSchema: UnknownRecord
|
|
30242
30232
|
}).annotations({ identifier: "RuntimeOperation" });
|
|
30243
30233
|
var RuntimeControlOperationsManifestEffectSchema = exports_Schema.Struct({
|
|
30244
|
-
|
|
30245
|
-
|
|
30246
|
-
requiredByOperations: exports_Schema.Record({ key: exports_Schema.String, value: exports_Schema.Array(exports_Schema.String) })
|
|
30247
|
-
}),
|
|
30248
|
-
hostCapabilities: exports_Schema.Struct({
|
|
30249
|
-
optional: exports_Schema.Array(RuntimeControlHostCapabilityRequirementEffectSchema),
|
|
30250
|
-
requiredByOperations: exports_Schema.Record({ key: exports_Schema.String, value: exports_Schema.Array(exports_Schema.String) })
|
|
30251
|
-
}),
|
|
30252
|
-
operations: exports_Schema.Array(RuntimeControlOperationEffectSchema)
|
|
30234
|
+
operations: exports_Schema.Array(RuntimeControlOperationEffectSchema),
|
|
30235
|
+
workspaceOperations: exports_Schema.Array(RuntimeControlOperationEffectSchema)
|
|
30253
30236
|
}).annotations({ identifier: "OperationsManifest" });
|
|
30254
30237
|
var RuntimeControlWorkflowsResponseEffectSchema = exports_Schema.Struct({
|
|
30255
30238
|
workflows: exports_Schema.Array(RuntimeControlWorkflowSummaryEffectSchema)
|
|
@@ -30257,14 +30240,8 @@ var RuntimeControlWorkflowsResponseEffectSchema = exports_Schema.Struct({
|
|
|
30257
30240
|
var RuntimeControlWorkspaceEffectSchema = exports_Schema.Struct({
|
|
30258
30241
|
id: exports_Schema.String,
|
|
30259
30242
|
name: exports_Schema.String,
|
|
30260
|
-
providerId: exports_Schema.String,
|
|
30261
30243
|
workflow: exports_Schema.String,
|
|
30262
|
-
|
|
30263
|
-
snapshotId: OptionalString,
|
|
30264
|
-
sourceRef: exports_Schema.Unknown,
|
|
30265
|
-
context: UnknownRecord,
|
|
30266
|
-
metadata: UnknownRecord,
|
|
30267
|
-
data: UnknownRecord,
|
|
30244
|
+
ctx: UnknownRecord,
|
|
30268
30245
|
createdAt: exports_Schema.String,
|
|
30269
30246
|
updatedAt: exports_Schema.String
|
|
30270
30247
|
}).annotations({ identifier: "Workspace" });
|
|
@@ -31108,7 +31085,7 @@ function findConfigUp(startDir, fileExists = import_node_fs2.existsSync) {
|
|
|
31108
31085
|
}
|
|
31109
31086
|
|
|
31110
31087
|
// src/version.ts
|
|
31111
|
-
var RIGKIT_PROVIDER_VSCODE_VERSION = "0.2.
|
|
31088
|
+
var RIGKIT_PROVIDER_VSCODE_VERSION = "0.2.4";
|
|
31112
31089
|
|
|
31113
31090
|
// src/extension.ts
|
|
31114
31091
|
var VSCODE_HOST_METHODS = [
|
|
@@ -31157,11 +31134,6 @@ class RigkitVsCodeHost {
|
|
|
31157
31134
|
const selected = operation ?? await pickOperation(operations);
|
|
31158
31135
|
if (!selected)
|
|
31159
31136
|
return;
|
|
31160
|
-
const unsupported = unsupportedRequirements(selected);
|
|
31161
|
-
if (unsupported) {
|
|
31162
|
-
await vscode.window.showErrorMessage(unsupported);
|
|
31163
|
-
return;
|
|
31164
|
-
}
|
|
31165
31137
|
const workspaces = await this.listWorkspaces();
|
|
31166
31138
|
const input = await collectOperationInput(selected, workspaces, operationPrompt(presetWorkspace));
|
|
31167
31139
|
if (!input)
|
|
@@ -31283,7 +31255,7 @@ class WorkspacesProvider {
|
|
|
31283
31255
|
getTreeItem(workspace2) {
|
|
31284
31256
|
const item = new vscode.TreeItem(workspace2.name, vscode.TreeItemCollapsibleState.None);
|
|
31285
31257
|
item.description = workspace2.workflow;
|
|
31286
|
-
item.tooltip = workspace2.
|
|
31258
|
+
item.tooltip = workspace2.name;
|
|
31287
31259
|
item.iconPath = new vscode.ThemeIcon("server");
|
|
31288
31260
|
item.contextValue = "rigkitWorkspace";
|
|
31289
31261
|
item.command = {
|
|
@@ -31347,7 +31319,7 @@ async function pickWorkspace(title, workspaces) {
|
|
|
31347
31319
|
const items = workspaces.map((workspace2) => ({
|
|
31348
31320
|
label: workspace2.name,
|
|
31349
31321
|
description: workspace2.workflow,
|
|
31350
|
-
detail: workspace2.
|
|
31322
|
+
detail: workspace2.createdAt,
|
|
31351
31323
|
workspace: workspace2
|
|
31352
31324
|
}));
|
|
31353
31325
|
const picked = await vscode.window.showQuickPick(items, { title, ignoreFocusOut: true });
|
|
@@ -31436,17 +31408,6 @@ async function openExternal(params2) {
|
|
|
31436
31408
|
await vscode.env.openExternal(vscode.Uri.parse(target));
|
|
31437
31409
|
return null;
|
|
31438
31410
|
}
|
|
31439
|
-
function unsupportedRequirements(operation) {
|
|
31440
|
-
const unsupportedCapability = operation.requiredHostCapabilities?.[0];
|
|
31441
|
-
if (unsupportedCapability) {
|
|
31442
|
-
return `Operation "${operation.id}" requires host capability "${unsupportedCapability.id}". VS Code does not support that capability.`;
|
|
31443
|
-
}
|
|
31444
|
-
const unsupportedMethod = operation.requiredHostMethods?.find((method) => !VSCODE_HOST_METHODS.some((supported) => supported.id === method.id && (!method.modes?.length || method.modes.every((mode) => supported.modes?.includes(mode)))));
|
|
31445
|
-
if (unsupportedMethod) {
|
|
31446
|
-
return `Operation "${operation.id}" requires host method "${unsupportedMethod.id}".`;
|
|
31447
|
-
}
|
|
31448
|
-
return;
|
|
31449
|
-
}
|
|
31450
31411
|
function isHostRequestMessage(value3) {
|
|
31451
31412
|
return isRecord3(value3) && value3.type === "host.request" && typeof value3.id === "string" && typeof value3.method === "string";
|
|
31452
31413
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rigkit/provider-vscode",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"README.md"
|
|
58
58
|
],
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@rigkit/runtime-client": "0.2.
|
|
60
|
+
"@rigkit/runtime-client": "0.2.4"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@types/bun": "latest",
|
package/src/extension.ts
CHANGED
|
@@ -82,12 +82,6 @@ class RigkitVsCodeHost {
|
|
|
82
82
|
const selected = operation ?? await pickOperation(operations);
|
|
83
83
|
if (!selected) return;
|
|
84
84
|
|
|
85
|
-
const unsupported = unsupportedRequirements(selected);
|
|
86
|
-
if (unsupported) {
|
|
87
|
-
await vscode.window.showErrorMessage(unsupported);
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
85
|
const workspaces = await this.listWorkspaces();
|
|
92
86
|
const input = await collectOperationInput(selected, workspaces, operationPrompt(presetWorkspace));
|
|
93
87
|
if (!input) return;
|
|
@@ -213,7 +207,7 @@ class WorkspacesProvider implements vscode.TreeDataProvider<RuntimeControlWorksp
|
|
|
213
207
|
getTreeItem(workspace: RuntimeControlWorkspace): vscode.TreeItem {
|
|
214
208
|
const item = new vscode.TreeItem(workspace.name, vscode.TreeItemCollapsibleState.None);
|
|
215
209
|
item.description = workspace.workflow;
|
|
216
|
-
item.tooltip = workspace.
|
|
210
|
+
item.tooltip = workspace.name;
|
|
217
211
|
item.iconPath = new vscode.ThemeIcon("server");
|
|
218
212
|
item.contextValue = "rigkitWorkspace";
|
|
219
213
|
item.command = {
|
|
@@ -286,7 +280,7 @@ async function pickWorkspace(
|
|
|
286
280
|
const items = workspaces.map((workspace) => ({
|
|
287
281
|
label: workspace.name,
|
|
288
282
|
description: workspace.workflow,
|
|
289
|
-
detail: workspace.
|
|
283
|
+
detail: workspace.createdAt,
|
|
290
284
|
workspace,
|
|
291
285
|
}));
|
|
292
286
|
const picked = await vscode.window.showQuickPick(items, { title, ignoreFocusOut: true });
|
|
@@ -381,22 +375,6 @@ async function openExternal(params: unknown): Promise<null> {
|
|
|
381
375
|
return null;
|
|
382
376
|
}
|
|
383
377
|
|
|
384
|
-
function unsupportedRequirements(operation: RuntimeControlOperation): string | undefined {
|
|
385
|
-
const unsupportedCapability = operation.requiredHostCapabilities?.[0];
|
|
386
|
-
if (unsupportedCapability) {
|
|
387
|
-
return `Operation "${operation.id}" requires host capability "${unsupportedCapability.id}". VS Code does not support that capability.`;
|
|
388
|
-
}
|
|
389
|
-
const unsupportedMethod = operation.requiredHostMethods?.find((method) =>
|
|
390
|
-
!VSCODE_HOST_METHODS.some((supported) =>
|
|
391
|
-
supported.id === method.id && (!method.modes?.length || method.modes.every((mode) => supported.modes?.includes(mode)))
|
|
392
|
-
)
|
|
393
|
-
);
|
|
394
|
-
if (unsupportedMethod) {
|
|
395
|
-
return `Operation "${operation.id}" requires host method "${unsupportedMethod.id}".`;
|
|
396
|
-
}
|
|
397
|
-
return undefined;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
378
|
function isHostRequestMessage(value: unknown): value is HostRequestMessage {
|
|
401
379
|
return isRecord(value) &&
|
|
402
380
|
value.type === "host.request" &&
|
package/src/input.test.ts
CHANGED
|
@@ -71,13 +71,8 @@ function workspaceRecord(name: string): RuntimeControlWorkspace {
|
|
|
71
71
|
return {
|
|
72
72
|
id: `ws-${name}`,
|
|
73
73
|
name,
|
|
74
|
-
providerId: "test",
|
|
75
74
|
workflow: "test",
|
|
76
|
-
|
|
77
|
-
sourceRef: null,
|
|
78
|
-
context: {},
|
|
79
|
-
metadata: {},
|
|
80
|
-
data: {},
|
|
75
|
+
ctx: {},
|
|
81
76
|
createdAt: "2026-05-10T00:00:00.000Z",
|
|
82
77
|
updatedAt: "2026-05-10T00:00:00.000Z",
|
|
83
78
|
};
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const RIGKIT_PROVIDER_VSCODE_VERSION = "0.2.
|
|
1
|
+
export const RIGKIT_PROVIDER_VSCODE_VERSION = "0.2.4";
|