Skip to content

Commit e7e87f7

Browse files
authored
Merge pull request #118 from ClayPulse/dev
Fix npm lib bugs & support MCP client
2 parents 590e0b0 + 50506b1 commit e7e87f7

File tree

23 files changed

+118
-34
lines changed

23 files changed

+118
-34
lines changed

.changeset/afraid-rockets-camp.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@pulse-editor/shared-utils": patch
3+
"@pulse-editor/react-api": patch
4+
---
5+
6+
Allow optional args for workflow handler

.changeset/pre.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"changesets": [
1212
"afraid-moments-punch",
13+
"afraid-rockets-camp",
1314
"angry-llamas-smash",
1415
"beige-pandas-rhyme",
1516
"beige-pumas-run",
@@ -50,6 +51,7 @@
5051
"real-knives-rest",
5152
"rude-ducks-design",
5253
"sad-tables-join",
54+
"shaggy-geckos-bow",
5355
"sharp-memes-give",
5456
"shiny-doodles-jump",
5557
"silent-glasses-kick",

.changeset/shaggy-geckos-bow.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@pulse-editor/shared-utils": patch
3+
"@pulse-editor/react-api": patch
4+
---
5+
6+
Fix object type issue in typed variable

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,16 @@ Running vibe coding workflow in canvas view allows you to develop software on an
6060
### Vibe Coding agent -- code modification
6161

6262
![VibeCoding_CodeEditorControl](https://cdn.pulse-editor.com/assets/VibeCode_CodeEditorControlAgent.gif)
63+
## 2. MCP client
6364

64-
## 2. Serverless ComfyUI Image/Video Generation (WIP)
65+
You can connect MCP servers and Pulse full-stack apps to agentic chat. e.g. installation-free browser agent with chrome-devtools-mcp and chrome remote debugging:
66+
![Browser_Controller](https://cdn.pulse-editor.com/assets/MCP_Agent.png)
67+
68+
## 3. Serverless ComfyUI Image/Video Generation (WIP)
6569

6670
You can run workflows with [Pulse App ComfyUI Workflow](https://github.com/Shellishack/pulse-app-comfyui-workflow).
6771

68-
## 3. Video Editing (WIP)
72+
## 4. Video Editing (WIP)
6973

7074
## Remote or local workspace
7175

npm-packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pulse-editor/cli",
3-
"version": "0.1.1-beta.0",
3+
"version": "0.1.1-beta.1",
44
"license": "MIT",
55
"bin": {
66
"pulse": "dist/cli.js"

npm-packages/cli/source/components/commands/create.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,23 @@ export default function Create({cli}: {cli: Result<Flags>}) {
125125
<Text> Initializing project...</Text>
126126
</Box>,
127127
);
128+
129+
/* Setup pulse.config.ts */
130+
const pulseConfigPath = path.join(process.cwd(), name, 'pulse.config.ts');
131+
let pulseConfig = fs.readFileSync(pulseConfigPath, 'utf8');
132+
// Modify visibility by matching the block that starts with 'visibility:',
133+
// and replacing the entire line with the new visibility value.
134+
pulseConfig = pulseConfig.replace(
135+
/visibility:\s*['"`](public|unlisted|private)['"`],?/,
136+
`visibility: '${visibility}',`,
137+
);
138+
fs.writeFileSync(pulseConfigPath, pulseConfig);
139+
140+
/* Setup packages.json */
128141
const packageJsonPath = path.join(process.cwd(), name, 'package.json');
129142
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
130143
packageJson.name = name.replaceAll('-', '_');
131144

132-
// Modify the visibility
133-
packageJson['pulse-editor-marketplace'] = {
134-
visibility,
135-
};
136-
137145
// Write the modified package.json back to the file
138146
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
139147

npm-packages/react-api/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# @pulse-editor/react-api
22

3+
## 0.1.1-beta.59
4+
5+
### Patch Changes
6+
7+
- Fix object type issue in typed variable
8+
- Updated dependencies
9+
- @pulse-editor/shared-utils@0.1.1-beta.59
10+
11+
## 0.1.1-beta.58
12+
13+
### Patch Changes
14+
15+
- Allow optional args for workflow handler
16+
- Updated dependencies
17+
- @pulse-editor/shared-utils@0.1.1-beta.58
18+
319
## 0.1.1-beta.57
420

521
### Patch Changes

npm-packages/react-api/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pulse-editor/react-api",
3-
"version": "0.1.1-beta.57",
3+
"version": "0.1.1-beta.59",
44
"main": "dist/main.js",
55
"files": [
66
"dist"
@@ -37,7 +37,7 @@
3737
"typescript-eslint": "^8.30.1"
3838
},
3939
"peerDependencies": {
40-
"@pulse-editor/shared-utils": "0.1.1-beta.57",
40+
"@pulse-editor/shared-utils": "0.1.1-beta.59",
4141
"react": "^19.0.0",
4242
"react-dom": "^19.0.0"
4343
},

npm-packages/react-api/src/hooks/editor/use-register-action.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,14 @@ export default function useRegisterAction(
123123
}
124124
// Validate parameters
125125
const actionParams = actionInfo.parameters ?? {};
126-
if (Object.keys(args).length !== Object.keys(actionParams).length) {
126+
127+
const requiredParamCount = Object.entries(actionParams).filter(
128+
([, paramInfo]) => !(paramInfo as TypedVariable).optional,
129+
).length;
130+
131+
if (Object.keys(args).length < requiredParamCount) {
127132
throw new Error(
128-
`Invalid number of parameters: expected ${
133+
`Invalid number of parameters: expected at least${
129134
Object.keys(actionParams).length
130135
}, got ${Object.keys(args).length}`,
131136
);

npm-packages/shared-utils/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# @pulse-editor/shared-utils
22

3+
## 0.1.1-beta.59
4+
5+
### Patch Changes
6+
7+
- Fix object type issue in typed variable
8+
9+
## 0.1.1-beta.58
10+
11+
### Patch Changes
12+
13+
- Allow optional args for workflow handler
14+
315
## 0.1.1-beta.57
416

517
### Patch Changes

0 commit comments

Comments
 (0)