cdeops 12.0.1-alpha.21 → 12.0.3-alpha.80
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/client.d.ts +176 -10
- package/package.json +2 -2
- package/src/cdeops.d.ts +1209 -1235
- package/src/cdeops.proposed.d.ts +1 -4
- package/src/subscription.d.ts +20 -25
package/client.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/* eslint-disable no-use-before-define */
|
|
2
|
+
/* eslint-disable import/export */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
4
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
1
5
|
/// <reference path="./src/cdeops.d.ts"/>
|
|
2
6
|
/// <reference path="./src/cdeops.proposed.d.ts"/>
|
|
3
7
|
|
|
@@ -15,7 +19,6 @@ declare module 'cdeops/client' {
|
|
|
15
19
|
OrganizationConfiguration,
|
|
16
20
|
configuration,
|
|
17
21
|
organization,
|
|
18
|
-
commands,
|
|
19
22
|
} from 'cdeops';
|
|
20
23
|
|
|
21
24
|
export {
|
|
@@ -34,6 +37,67 @@ declare module 'cdeops/client' {
|
|
|
34
37
|
commands,
|
|
35
38
|
};
|
|
36
39
|
|
|
40
|
+
// AI Service Interfaces
|
|
41
|
+
export interface IAISocketContribution {
|
|
42
|
+
key: string;
|
|
43
|
+
name: string;
|
|
44
|
+
type: string;
|
|
45
|
+
required?: boolean;
|
|
46
|
+
enum?: string[];
|
|
47
|
+
default?: any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface IAIWorkerRequest {
|
|
51
|
+
script: string;
|
|
52
|
+
args: any[];
|
|
53
|
+
timeout?: number;
|
|
54
|
+
context?: Record<string, any>;
|
|
55
|
+
}
|
|
56
|
+
export interface IAIWorkflowNode {
|
|
57
|
+
id: string;
|
|
58
|
+
type: string;
|
|
59
|
+
position: { x: number; y: number };
|
|
60
|
+
data: Record<string, any>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface IAIWorkflowEdge {
|
|
64
|
+
id: string;
|
|
65
|
+
source: string;
|
|
66
|
+
target: string;
|
|
67
|
+
sourceOutput: string;
|
|
68
|
+
targetInput: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface IAIWorkerResponse {
|
|
72
|
+
result: any;
|
|
73
|
+
error?: string;
|
|
74
|
+
executionTime: number;
|
|
75
|
+
memoryUsage?: number;
|
|
76
|
+
}
|
|
77
|
+
export interface IAIWorkflowConfig {
|
|
78
|
+
id: string;
|
|
79
|
+
name: string;
|
|
80
|
+
description?: string;
|
|
81
|
+
nodes: IAIWorkflowNode[];
|
|
82
|
+
edges: IAIWorkflowEdge[];
|
|
83
|
+
metadata: {
|
|
84
|
+
organizationId: string;
|
|
85
|
+
workflowId: string;
|
|
86
|
+
workflowVersionId: string;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface IAINodeContribution {
|
|
91
|
+
id: string;
|
|
92
|
+
label: string;
|
|
93
|
+
description: string;
|
|
94
|
+
icon: string;
|
|
95
|
+
category: string;
|
|
96
|
+
inputs: IAISocketContribution[];
|
|
97
|
+
outputs: IAISocketContribution[];
|
|
98
|
+
machine: any; // XState machine
|
|
99
|
+
}
|
|
100
|
+
|
|
37
101
|
export interface DocumentFilter {
|
|
38
102
|
/** A language id, such as `typescript` or `*`. */
|
|
39
103
|
language?: string;
|
|
@@ -57,15 +121,6 @@ declare module 'cdeops/client' {
|
|
|
57
121
|
*/
|
|
58
122
|
export type DocumentSelector = (string | DocumentFilter)[];
|
|
59
123
|
|
|
60
|
-
/**
|
|
61
|
-
* A document selector is the combination of one or many document filters.
|
|
62
|
-
* A document matches the selector if any of the given filters matches.
|
|
63
|
-
* If the filter is a string and not a {@link DocumentFilter}, it will be treated as a language id.
|
|
64
|
-
*
|
|
65
|
-
* @example let sel: DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }];
|
|
66
|
-
*/
|
|
67
|
-
export type DocumentSelector = (string | DocumentFilter)[];
|
|
68
|
-
|
|
69
124
|
/**
|
|
70
125
|
* A panel view created by {@link sourcegraph.app.createPanelView}.
|
|
71
126
|
*/
|
|
@@ -409,4 +464,115 @@ declare module 'cdeops/client' {
|
|
|
409
464
|
*/
|
|
410
465
|
export function getCommands(filterInternal?: boolean): Promise<string[]>;
|
|
411
466
|
}
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Namespace for AI services. Provides access to AI worker, workflow, and node registry functionality.
|
|
470
|
+
*/
|
|
471
|
+
export namespace ai {
|
|
472
|
+
/**
|
|
473
|
+
* AI Worker service for executing scripts and managing libraries.
|
|
474
|
+
*/
|
|
475
|
+
export namespace worker {
|
|
476
|
+
/**
|
|
477
|
+
* Executes a script in the AI worker.
|
|
478
|
+
* @param request The script execution request.
|
|
479
|
+
* @returns Promise that resolves to the execution result.
|
|
480
|
+
*/
|
|
481
|
+
export function executeScript(request: IAIWorkerRequest): Promise<IAIWorkerResponse>;
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Installs a library in the AI worker.
|
|
485
|
+
* @param url The URL of the library to install.
|
|
486
|
+
* @param accessors The accessor names for the library.
|
|
487
|
+
* @returns Promise that resolves when the library is installed.
|
|
488
|
+
*/
|
|
489
|
+
export function installLibrary(url: string, accessors: string[]): Promise<any>;
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Uninstalls libraries from the AI worker.
|
|
493
|
+
* @param accessors The accessor names to uninstall.
|
|
494
|
+
* @returns Promise that resolves to the uninstall result.
|
|
495
|
+
*/
|
|
496
|
+
export function uninstallLibrary(accessors: string[]): Promise<{ success: boolean; error?: string }>;
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* Resets the AI worker context.
|
|
500
|
+
* @returns Promise that resolves when the context is reset.
|
|
501
|
+
*/
|
|
502
|
+
export function resetContext(): Promise<void>;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* AI Workflow service for managing and executing workflows.
|
|
507
|
+
*/
|
|
508
|
+
export namespace workflow {
|
|
509
|
+
/**
|
|
510
|
+
* Creates a new AI workflow.
|
|
511
|
+
* @param config The workflow configuration.
|
|
512
|
+
* @returns Promise that resolves to the workflow ID.
|
|
513
|
+
*/
|
|
514
|
+
export function createWorkflow(config: IAIWorkflowConfig): Promise<string>;
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Runs an AI workflow.
|
|
518
|
+
* @param workflowId The ID of the workflow to run.
|
|
519
|
+
* @param inputId The ID of the input node.
|
|
520
|
+
* @param inputs Optional input data.
|
|
521
|
+
* @returns Promise that resolves to the workflow result.
|
|
522
|
+
*/
|
|
523
|
+
export function runWorkflow(
|
|
524
|
+
workflowId: string,
|
|
525
|
+
inputId: string,
|
|
526
|
+
inputs?: Record<string, any>,
|
|
527
|
+
): Promise<any>;
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Stops a running AI workflow.
|
|
531
|
+
* @param workflowId The ID of the workflow to stop.
|
|
532
|
+
* @returns Promise that resolves when the workflow is stopped.
|
|
533
|
+
*/
|
|
534
|
+
export function stopWorkflow(workflowId: string): Promise<void>;
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* Gets the state of an AI workflow.
|
|
538
|
+
* @param workflowId The ID of the workflow.
|
|
539
|
+
* @returns Promise that resolves to the workflow state.
|
|
540
|
+
*/
|
|
541
|
+
export function getWorkflowState(workflowId: string): Promise<any>;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* AI Node Registry service for managing AI node contributions.
|
|
546
|
+
*/
|
|
547
|
+
export namespace nodeRegistry {
|
|
548
|
+
/**
|
|
549
|
+
* Registers an AI node.
|
|
550
|
+
* @param node The node contribution to register.
|
|
551
|
+
* @param extensionId The ID of the extension registering the node.
|
|
552
|
+
* @returns Promise that resolves when the node is registered.
|
|
553
|
+
*/
|
|
554
|
+
export function registerNode(node: IAINodeContribution, extensionId: string): Promise<void>;
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* Unregisters an AI node.
|
|
558
|
+
* @param nodeId The ID of the node to unregister.
|
|
559
|
+
* @param extensionId The ID of the extension that registered the node.
|
|
560
|
+
* @returns Promise that resolves when the node is unregistered.
|
|
561
|
+
*/
|
|
562
|
+
export function unregisterNode(nodeId: string, extensionId: string): Promise<void>;
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Gets all registered AI nodes.
|
|
566
|
+
* @returns Promise that resolves to an array of registered nodes.
|
|
567
|
+
*/
|
|
568
|
+
export function getNodes(): Promise<IAINodeContribution[]>;
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* Gets a specific AI node by ID.
|
|
572
|
+
* @param nodeId The ID of the node to retrieve.
|
|
573
|
+
* @returns Promise that resolves to the node or undefined if not found.
|
|
574
|
+
*/
|
|
575
|
+
export function getNodeById(nodeId: string): Promise<IAINodeContribution | undefined>;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
412
578
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cdeops",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.3-alpha.80",
|
|
4
4
|
"description": "Cdecode - Extension API: build extensions that enhance coding experience in your cdeops editor",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "46976440a1dc6993033074c22bbb3736d36d7de8"
|
|
33
33
|
}
|