agentuity-vscode 0.0.94 → 0.0.96
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 -1
- package/package.json +174 -3
- package/src/core/cliClient.ts +17 -4
- package/src/core/index.ts +1 -0
- package/src/core/logger.ts +24 -0
- package/src/extension.ts +16 -10
- package/src/features/chat/agentTools.ts +529 -0
- package/src/features/chat/agentuityParticipant.ts +4 -2
- package/src/features/chat/contextProvider.ts +374 -0
- package/src/features/chat/index.ts +2 -0
- package/src/features/codeLens/index.ts +63 -2
- package/src/features/customAgents/index.ts +252 -0
- package/src/features/devServer/devServerManager.ts +33 -15
- package/src/features/workbench/index.ts +1 -1
- package/src/vscode.proposed.chatContextProvider.d.ts +96 -0
- package/tsconfig.json +6 -4
- package/tsconfig.test.json +19 -0
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "agentuity-vscode",
|
|
3
3
|
"displayName": "Agentuity VSCode Extension",
|
|
4
4
|
"description": "Build, deploy, and manage AI agents with Agentuity",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.96",
|
|
6
6
|
"publisher": "agentuity",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"repository": {
|
|
@@ -10,8 +10,11 @@
|
|
|
10
10
|
"url": "https://github.com/agentuity/sdk"
|
|
11
11
|
},
|
|
12
12
|
"engines": {
|
|
13
|
-
"vscode": "^1.
|
|
13
|
+
"vscode": "^1.107.0"
|
|
14
14
|
},
|
|
15
|
+
"enabledApiProposals": [
|
|
16
|
+
"chatContextProvider"
|
|
17
|
+
],
|
|
15
18
|
"categories": [
|
|
16
19
|
"Other",
|
|
17
20
|
"Snippets"
|
|
@@ -24,7 +27,8 @@
|
|
|
24
27
|
],
|
|
25
28
|
"icon": "resources/icon.png",
|
|
26
29
|
"activationEvents": [
|
|
27
|
-
"onStartupFinished"
|
|
30
|
+
"onStartupFinished",
|
|
31
|
+
"onChatContextProvider:agentuity.context"
|
|
28
32
|
],
|
|
29
33
|
"main": "./dist/extension.js",
|
|
30
34
|
"contributes": {
|
|
@@ -187,6 +191,11 @@
|
|
|
187
191
|
"command": "agentuity.codeLens.viewSessions",
|
|
188
192
|
"title": "View Agent Sessions",
|
|
189
193
|
"category": "Agentuity"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"command": "agentuity.createCustomAgents",
|
|
197
|
+
"title": "Create Custom Agents for Background Use",
|
|
198
|
+
"category": "Agentuity"
|
|
190
199
|
}
|
|
191
200
|
],
|
|
192
201
|
"viewsContainers": {
|
|
@@ -404,6 +413,168 @@
|
|
|
404
413
|
"command"
|
|
405
414
|
]
|
|
406
415
|
}
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"name": "agentuity_get_agents",
|
|
419
|
+
"displayName": "Get Agentuity Agents",
|
|
420
|
+
"toolReferenceName": "agentuity-agents",
|
|
421
|
+
"icon": "$(hubot)",
|
|
422
|
+
"userDescription": "List all AI agents in the current Agentuity project",
|
|
423
|
+
"modelDescription": "Get a list of all AI agents defined in the current Agentuity project. Returns agent names, IDs, identifiers, descriptions, and source files. Use this to understand what agents exist in the project before performing operations on them.",
|
|
424
|
+
"canBeReferencedInPrompt": true,
|
|
425
|
+
"when": "agentuity.hasProject",
|
|
426
|
+
"inputSchema": {
|
|
427
|
+
"type": "object",
|
|
428
|
+
"properties": {
|
|
429
|
+
"includeDetails": {
|
|
430
|
+
"type": "boolean",
|
|
431
|
+
"description": "Whether to include detailed information about each agent",
|
|
432
|
+
"default": false
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"name": "agentuity_get_project_status",
|
|
439
|
+
"displayName": "Get Agentuity Project Status",
|
|
440
|
+
"toolReferenceName": "agentuity-status",
|
|
441
|
+
"icon": "$(info)",
|
|
442
|
+
"userDescription": "Get the current status of the Agentuity project",
|
|
443
|
+
"modelDescription": "Get comprehensive status information about the Agentuity project including: authentication state, project configuration, dev server state, agent count, and active deployment info. Use this to understand the current state before suggesting actions.",
|
|
444
|
+
"canBeReferencedInPrompt": true,
|
|
445
|
+
"inputSchema": {
|
|
446
|
+
"type": "object",
|
|
447
|
+
"properties": {}
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"name": "agentuity_get_sessions",
|
|
452
|
+
"displayName": "Get Agent Sessions",
|
|
453
|
+
"toolReferenceName": "agentuity-sessions",
|
|
454
|
+
"icon": "$(pulse)",
|
|
455
|
+
"userDescription": "List recent agent execution sessions",
|
|
456
|
+
"modelDescription": "Get a list of recent agent execution sessions. Each session represents one invocation of an agent and includes success/failure status, duration, trigger type, and environment. Use this to diagnose issues or understand agent usage patterns.",
|
|
457
|
+
"canBeReferencedInPrompt": true,
|
|
458
|
+
"when": "agentuity.hasProject",
|
|
459
|
+
"inputSchema": {
|
|
460
|
+
"type": "object",
|
|
461
|
+
"properties": {
|
|
462
|
+
"count": {
|
|
463
|
+
"type": "number",
|
|
464
|
+
"description": "Number of sessions to retrieve (default: 10, max: 100)",
|
|
465
|
+
"default": 10
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"name": "agentuity_get_session_logs",
|
|
472
|
+
"displayName": "Get Session Logs",
|
|
473
|
+
"toolReferenceName": "agentuity-logs",
|
|
474
|
+
"icon": "$(output)",
|
|
475
|
+
"userDescription": "Get logs for a specific agent session",
|
|
476
|
+
"modelDescription": "Retrieve detailed logs for a specific agent execution session. Logs include timestamps, severity levels, and messages. Use this to debug agent behavior or diagnose failures. Requires a session ID which can be obtained from agentuity_get_sessions.",
|
|
477
|
+
"canBeReferencedInPrompt": true,
|
|
478
|
+
"when": "agentuity.hasProject",
|
|
479
|
+
"inputSchema": {
|
|
480
|
+
"type": "object",
|
|
481
|
+
"properties": {
|
|
482
|
+
"sessionId": {
|
|
483
|
+
"type": "string",
|
|
484
|
+
"description": "The session ID to get logs for (UUID format)"
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
"required": [
|
|
488
|
+
"sessionId"
|
|
489
|
+
]
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"name": "agentuity_control_dev_server",
|
|
494
|
+
"displayName": "Control Dev Server",
|
|
495
|
+
"toolReferenceName": "agentuity-dev",
|
|
496
|
+
"icon": "$(server-process)",
|
|
497
|
+
"userDescription": "Start, stop, or check the Agentuity dev server",
|
|
498
|
+
"modelDescription": "Control the Agentuity development server for local agent testing. Actions: 'start' launches the server, 'stop' terminates it, 'restart' cycles it, 'status' returns current state. The dev server must be running to test agents locally via the Workbench.",
|
|
499
|
+
"canBeReferencedInPrompt": true,
|
|
500
|
+
"when": "agentuity.hasProject",
|
|
501
|
+
"inputSchema": {
|
|
502
|
+
"type": "object",
|
|
503
|
+
"properties": {
|
|
504
|
+
"action": {
|
|
505
|
+
"type": "string",
|
|
506
|
+
"enum": [
|
|
507
|
+
"start",
|
|
508
|
+
"stop",
|
|
509
|
+
"restart",
|
|
510
|
+
"status"
|
|
511
|
+
],
|
|
512
|
+
"description": "The action to perform: start, stop, restart, or status"
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
"required": [
|
|
516
|
+
"action"
|
|
517
|
+
]
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
"name": "agentuity_get_deployments",
|
|
522
|
+
"displayName": "Get Deployments",
|
|
523
|
+
"toolReferenceName": "agentuity-deployments",
|
|
524
|
+
"icon": "$(cloud-upload)",
|
|
525
|
+
"userDescription": "List deployments for the Agentuity project",
|
|
526
|
+
"modelDescription": "Get a list of deployments for the current Agentuity project. Shows deployment IDs, active status, state, creation time, and tags. Use this to understand deployment history and identify the currently active deployment.",
|
|
527
|
+
"canBeReferencedInPrompt": true,
|
|
528
|
+
"when": "agentuity.hasProject",
|
|
529
|
+
"inputSchema": {
|
|
530
|
+
"type": "object",
|
|
531
|
+
"properties": {
|
|
532
|
+
"limit": {
|
|
533
|
+
"type": "number",
|
|
534
|
+
"description": "Maximum number of deployments to return (default: 10)",
|
|
535
|
+
"default": 10
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"name": "agentuity_deploy_project",
|
|
542
|
+
"displayName": "Deploy Project",
|
|
543
|
+
"toolReferenceName": "agentuity-deploy",
|
|
544
|
+
"icon": "$(rocket)",
|
|
545
|
+
"userDescription": "Deploy the Agentuity project to the cloud",
|
|
546
|
+
"modelDescription": "Deploy the current Agentuity project to Agentuity Cloud. This makes the agents publicly accessible. The deployment runs in a terminal and requires user confirmation. Use agentuity_get_project_status first to verify the user is authenticated.",
|
|
547
|
+
"canBeReferencedInPrompt": true,
|
|
548
|
+
"when": "agentuity.hasProject && agentuity.authenticated",
|
|
549
|
+
"inputSchema": {
|
|
550
|
+
"type": "object",
|
|
551
|
+
"properties": {
|
|
552
|
+
"message": {
|
|
553
|
+
"type": "string",
|
|
554
|
+
"description": "Optional deployment message or description"
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"name": "agentuity_get_health_summary",
|
|
561
|
+
"displayName": "Get Health Summary",
|
|
562
|
+
"toolReferenceName": "agentuity-health",
|
|
563
|
+
"icon": "$(heart)",
|
|
564
|
+
"userDescription": "Get a health summary of the Agentuity project",
|
|
565
|
+
"modelDescription": "Get a comprehensive health summary of the Agentuity project including: session success/failure rates, performance metrics (avg/min/max duration), recent failures, deployment status, and dev server state. Use this for monitoring and diagnostics.",
|
|
566
|
+
"canBeReferencedInPrompt": true,
|
|
567
|
+
"when": "agentuity.hasProject",
|
|
568
|
+
"inputSchema": {
|
|
569
|
+
"type": "object",
|
|
570
|
+
"properties": {
|
|
571
|
+
"sessionCount": {
|
|
572
|
+
"type": "number",
|
|
573
|
+
"description": "Number of recent sessions to analyze (default: 20)",
|
|
574
|
+
"default": 20
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
407
578
|
}
|
|
408
579
|
],
|
|
409
580
|
"walkthroughs": [
|
package/src/core/cliClient.ts
CHANGED
|
@@ -34,7 +34,7 @@ export class CliClient {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* Get the CLI executable path from settings, common install locations, or PATH.
|
|
37
|
+
* Get the CLI executable path from settings, local project, common install locations, or PATH.
|
|
38
38
|
*/
|
|
39
39
|
getCliPath(): string {
|
|
40
40
|
const config = vscode.workspace.getConfiguration('agentuity');
|
|
@@ -43,6 +43,15 @@ export class CliClient {
|
|
|
43
43
|
return customPath;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
// Check for local CLI in project's node_modules/.bin first
|
|
47
|
+
const projectDir = this.getProjectCwd();
|
|
48
|
+
if (projectDir) {
|
|
49
|
+
const localCliPath = path.join(projectDir, 'node_modules', '.bin', 'agentuity');
|
|
50
|
+
if (fs.existsSync(localCliPath)) {
|
|
51
|
+
return localCliPath;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
46
55
|
// Check common install location: ~/.agentuity/bin/agentuity
|
|
47
56
|
const homeDir = os.homedir();
|
|
48
57
|
const defaultInstallPath = path.join(homeDir, '.agentuity', 'bin', 'agentuity');
|
|
@@ -505,9 +514,13 @@ export class CliClient {
|
|
|
505
514
|
|
|
506
515
|
// Auth types
|
|
507
516
|
export interface WhoamiResponse {
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
517
|
+
userId: string;
|
|
518
|
+
firstName: string;
|
|
519
|
+
lastName: string;
|
|
520
|
+
organizations: Array<{
|
|
521
|
+
id: string;
|
|
522
|
+
name: string;
|
|
523
|
+
}>;
|
|
511
524
|
}
|
|
512
525
|
|
|
513
526
|
// Agent types
|
package/src/core/index.ts
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as vscode from 'vscode';
|
|
2
|
+
|
|
3
|
+
let _outputChannel: vscode.OutputChannel | undefined;
|
|
4
|
+
|
|
5
|
+
export function getOutputChannel(): vscode.OutputChannel {
|
|
6
|
+
if (!_outputChannel) {
|
|
7
|
+
_outputChannel = vscode.window.createOutputChannel('Agentuity');
|
|
8
|
+
}
|
|
9
|
+
return _outputChannel;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function log(message: string): void {
|
|
13
|
+
const channel = getOutputChannel();
|
|
14
|
+
channel.appendLine(`[${new Date().toISOString()}] ${message}`);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function showLogs(): void {
|
|
18
|
+
getOutputChannel().show();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function disposeLogger(): void {
|
|
22
|
+
_outputChannel?.dispose();
|
|
23
|
+
_outputChannel = undefined;
|
|
24
|
+
}
|
package/src/extension.ts
CHANGED
|
@@ -10,20 +10,21 @@ import {
|
|
|
10
10
|
disposeProject,
|
|
11
11
|
requireAuth,
|
|
12
12
|
} from './core';
|
|
13
|
+
import { log, disposeLogger } from './core/logger';
|
|
13
14
|
import { registerReadonlyDocumentProvider } from './core/readonlyDocument';
|
|
14
15
|
import { registerAgentExplorer } from './features/agentExplorer';
|
|
15
16
|
import { registerDataExplorer } from './features/dataExplorer';
|
|
16
17
|
import { registerDeploymentExplorer } from './features/deploymentExplorer';
|
|
17
18
|
import { registerDevServerCommands } from './features/devServer';
|
|
18
19
|
import { registerWorkbenchCommands } from './features/workbench';
|
|
19
|
-
import {
|
|
20
|
+
import {
|
|
21
|
+
registerChatParticipant,
|
|
22
|
+
registerCliTool,
|
|
23
|
+
registerChatContextProvider,
|
|
24
|
+
registerAgentTools,
|
|
25
|
+
} from './features/chat';
|
|
20
26
|
import { registerCodeLens } from './features/codeLens';
|
|
21
|
-
|
|
22
|
-
const outputChannel = vscode.window.createOutputChannel('Agentuity');
|
|
23
|
-
|
|
24
|
-
function log(message: string): void {
|
|
25
|
-
outputChannel.appendLine(`[${new Date().toISOString()}] ${message}`);
|
|
26
|
-
}
|
|
27
|
+
import { registerCustomAgentCommands } from './features/customAgents';
|
|
27
28
|
|
|
28
29
|
export async function activate(context: vscode.ExtensionContext): Promise<void> {
|
|
29
30
|
log('Extension activating...');
|
|
@@ -35,7 +36,9 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
|
|
|
35
36
|
log(`Project: ${project ? project.projectId : 'none'}`);
|
|
36
37
|
|
|
37
38
|
const authStatus = await checkAuth();
|
|
38
|
-
log(
|
|
39
|
+
log(
|
|
40
|
+
`Auth: ${authStatus.state}${authStatus.user ? ` (${authStatus.user.firstName} ${authStatus.user.lastName})` : ''}`
|
|
41
|
+
);
|
|
39
42
|
|
|
40
43
|
if (authStatus.state === 'cli-missing' || authStatus.state === 'unauthenticated') {
|
|
41
44
|
void promptLogin();
|
|
@@ -78,6 +81,9 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
|
|
|
78
81
|
registerWorkbenchCommands(context);
|
|
79
82
|
registerChatParticipant(context);
|
|
80
83
|
registerCliTool(context);
|
|
84
|
+
registerChatContextProvider(context);
|
|
85
|
+
registerAgentTools(context);
|
|
86
|
+
registerCustomAgentCommands(context);
|
|
81
87
|
registerCodeLens(context);
|
|
82
88
|
|
|
83
89
|
log('Extension activated');
|
|
@@ -125,7 +131,7 @@ function registerAuthCommands(context: vscode.ExtensionContext): void {
|
|
|
125
131
|
if (result.success && result.data) {
|
|
126
132
|
const user = result.data;
|
|
127
133
|
vscode.window.showInformationMessage(
|
|
128
|
-
`Logged in as: ${user.
|
|
134
|
+
`Logged in as: ${user.firstName} ${user.lastName}`
|
|
129
135
|
);
|
|
130
136
|
} else {
|
|
131
137
|
vscode.window.showWarningMessage('Not logged in to Agentuity');
|
|
@@ -256,5 +262,5 @@ export function deactivate(): void {
|
|
|
256
262
|
disposeCliClient();
|
|
257
263
|
disposeAuth();
|
|
258
264
|
disposeProject();
|
|
259
|
-
|
|
265
|
+
disposeLogger();
|
|
260
266
|
}
|