@pulse-editor/cli 0.1.1-beta.30 → 0.1.1-beta.31
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/lib/webpack/dist/pregistered-actions.d.ts +2 -0
- package/dist/lib/webpack/dist/pulse.config.d.ts +7 -0
- package/dist/lib/webpack/dist/src/lib/agents/code-modifier-agent.d.ts +2 -0
- package/dist/lib/webpack/dist/src/lib/agents/vibe-coding-agent.d.ts +3 -0
- package/dist/lib/webpack/dist/src/lib/mcp/utils.d.ts +3 -0
- package/dist/lib/webpack/dist/src/lib/streaming/message-stream-controller.d.ts +10 -0
- package/dist/lib/webpack/dist/src/lib/types.d.ts +58 -0
- package/dist/lib/webpack/dist/src/server-function/generate-code/v1/generate.d.ts +5 -0
- package/dist/lib/webpack/dist/src/server-function/generate-code/v2/generate.d.ts +1 -0
- package/dist/lib/webpack/tsconfig.server.json +19 -0
- package/dist/lib/webpack/webpack.config.js +31 -1
- package/package.json +1 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { MultiServerMCPClient } from "@langchain/mcp-adapters";
|
|
2
|
+
import { MessageStreamController } from "../streaming/message-stream-controller";
|
|
3
|
+
export declare function runVibeCoding(mcpClient: MultiServerMCPClient, userPrompt: string, controller: MessageStreamController): Promise<void>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { MultiServerMCPClient } from "@langchain/mcp-adapters";
|
|
2
|
+
export declare function writeFileToFS(mcpClient: MultiServerMCPClient, uri: string, content: string): Promise<string>;
|
|
3
|
+
export declare function callTerminal(mcpClient: MultiServerMCPClient, command: string): Promise<string>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AgentTaskMessageData } from "../types";
|
|
2
|
+
export declare class MessageStreamController {
|
|
3
|
+
private controller;
|
|
4
|
+
private msgCounter;
|
|
5
|
+
private messages;
|
|
6
|
+
private timeCountMap;
|
|
7
|
+
constructor(controller: ReadableStreamDefaultController);
|
|
8
|
+
enqueueNew(data: AgentTaskMessageData, isFinal: boolean): number;
|
|
9
|
+
enqueueUpdate(data: AgentTaskMessageData, isFinal: boolean): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export type VibeDevFlowNode = {
|
|
2
|
+
id: string;
|
|
3
|
+
children: VibeDevFlowNode[];
|
|
4
|
+
};
|
|
5
|
+
export declare enum AgentTaskMessageType {
|
|
6
|
+
Creation = "creation",
|
|
7
|
+
Update = "update"
|
|
8
|
+
}
|
|
9
|
+
export declare enum AgentTaskMessageDataType {
|
|
10
|
+
Notification = "notification",
|
|
11
|
+
ToolCall = "toolCall",
|
|
12
|
+
ArtifactOutput = "artifactOutput"
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Data associated with an AgentTaskItem.
|
|
16
|
+
* The fields included depend on the type of the task item.
|
|
17
|
+
*
|
|
18
|
+
* @property type - The type of the task item, defined by the AgentTaskItemType enum.
|
|
19
|
+
* @property title - (Optional) A brief title or summary of the task item.
|
|
20
|
+
* @property description - (Optional) A detailed description of the task item.
|
|
21
|
+
* @property toolName - (Optional) The name of the tool being called (if applicable).
|
|
22
|
+
* @property parameters - (Optional) A record of parameters associated with the tool call (if applicable).
|
|
23
|
+
* @property error - (Optional) An error message if the task item represents an error.
|
|
24
|
+
* @property result - (Optional) The result or output of the task item (if applicable).
|
|
25
|
+
*/
|
|
26
|
+
export type AgentTaskMessageData = {
|
|
27
|
+
type?: AgentTaskMessageDataType;
|
|
28
|
+
title?: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
toolName?: string;
|
|
31
|
+
parameters?: Record<string, unknown>;
|
|
32
|
+
error?: string;
|
|
33
|
+
result?: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Represents a single task item generated by the agent.
|
|
37
|
+
* Each task item can be of different types such as tool calls, notifications, or errors.
|
|
38
|
+
*
|
|
39
|
+
* @property type - The type of the task item, defined by the AgentTaskItemType enum.
|
|
40
|
+
* @property messageId - The unique identifier for the task item.
|
|
41
|
+
* This is an incremental number representing the n-th task item.
|
|
42
|
+
* @property data - The data associated with the task item, which varies based on the type.
|
|
43
|
+
* @property isFinal - (Optional) Indicates if the task item is final and no further updates are expected.
|
|
44
|
+
*/
|
|
45
|
+
export type AgentTaskMessage = {
|
|
46
|
+
type: AgentTaskMessageType;
|
|
47
|
+
messageId: number;
|
|
48
|
+
data: AgentTaskMessageData;
|
|
49
|
+
isFinal?: boolean;
|
|
50
|
+
};
|
|
51
|
+
export type AgentTaskMessageUpdate = {
|
|
52
|
+
type: AgentTaskMessageType;
|
|
53
|
+
messageId: number;
|
|
54
|
+
updateType: "append";
|
|
55
|
+
delta: AgentTaskMessageData;
|
|
56
|
+
isFinal?: boolean;
|
|
57
|
+
timeUsedSec?: string;
|
|
58
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function handler(req: Request): Promise<Response>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"declaration": true,
|
|
8
|
+
"outDir": "dist",
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"../../../../../../src/server-function/**/*",
|
|
12
|
+
"../../../../../../pulse.config.ts",
|
|
13
|
+
"../../../../../../global.d.ts",
|
|
14
|
+
],
|
|
15
|
+
"exclude": [
|
|
16
|
+
"../../../../../../node_modules",
|
|
17
|
+
"../../../../../../dist",
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -137,6 +137,31 @@ ${Object.entries(funcs)
|
|
|
137
137
|
console.error('Error removing dist/server:', e);
|
|
138
138
|
console.log('Continuing...');
|
|
139
139
|
}
|
|
140
|
+
// Generate tsconfig for server functions
|
|
141
|
+
function generateTempTsConfig() {
|
|
142
|
+
const tempTsConfigPath = path.join(process.cwd(), 'node_modules/.pulse/tsconfig.server.json');
|
|
143
|
+
const tsConfig = {
|
|
144
|
+
compilerOptions: {
|
|
145
|
+
target: 'ES2020',
|
|
146
|
+
module: 'esnext',
|
|
147
|
+
moduleResolution: 'bundler',
|
|
148
|
+
strict: true,
|
|
149
|
+
declaration: true,
|
|
150
|
+
outDir: path.join(process.cwd(), 'dist'),
|
|
151
|
+
},
|
|
152
|
+
include: [
|
|
153
|
+
path.join(process.cwd(), 'src/server-function/**/*'),
|
|
154
|
+
path.join(process.cwd(), 'pulse.config.ts'),
|
|
155
|
+
path.join(process.cwd(), 'global.d.ts'),
|
|
156
|
+
],
|
|
157
|
+
exclude: [
|
|
158
|
+
path.join(process.cwd(), 'node_modules'),
|
|
159
|
+
path.join(process.cwd(), 'dist'),
|
|
160
|
+
],
|
|
161
|
+
};
|
|
162
|
+
fs.writeFileSync(tempTsConfigPath, JSON.stringify(tsConfig, null, 2));
|
|
163
|
+
}
|
|
164
|
+
generateTempTsConfig();
|
|
140
165
|
// Run a new webpack compilation to pick up new server functions
|
|
141
166
|
const options = {
|
|
142
167
|
...compiler.options,
|
|
@@ -465,7 +490,12 @@ ${Object.entries(funcs)
|
|
|
465
490
|
rules: [
|
|
466
491
|
{
|
|
467
492
|
test: /\.tsx?$/,
|
|
468
|
-
use:
|
|
493
|
+
use: {
|
|
494
|
+
loader: 'ts-loader',
|
|
495
|
+
options: {
|
|
496
|
+
configFile: 'node_modules/.pulse/tsconfig.server.json',
|
|
497
|
+
},
|
|
498
|
+
},
|
|
469
499
|
exclude: [/node_modules/, /dist/],
|
|
470
500
|
},
|
|
471
501
|
],
|