viepilot 2.1.0 → 2.12.0
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/CHANGELOG.md +220 -0
- package/README.md +32 -21
- package/bin/viepilot.cjs +12 -4
- package/docs/brainstorm/session-2026-04-11.md +194 -0
- package/docs/skills-reference.md +46 -0
- package/docs/user/features/adapters.md +74 -0
- package/docs/user/features/proposal.md +196 -0
- package/lib/adapters/antigravity.cjs +33 -0
- package/lib/adapters/claude-code.cjs +2 -2
- package/lib/adapters/codex.cjs +34 -0
- package/lib/adapters/cursor.cjs +2 -1
- package/lib/adapters/index.cjs +4 -2
- package/lib/google-slides-exporter.cjs +80 -0
- package/lib/proposal-generator.cjs +249 -0
- package/lib/screenshot-artifact.cjs +142 -0
- package/lib/viepilot-config.cjs +32 -1
- package/lib/viepilot-install.cjs +8 -10
- package/package.json +8 -3
- package/skills/vp-audit/SKILL.md +13 -2
- package/skills/vp-auto/SKILL.md +2 -2
- package/skills/vp-brainstorm/SKILL.md +2 -2
- package/skills/vp-crystallize/SKILL.md +30 -3
- package/skills/vp-debug/SKILL.md +2 -2
- package/skills/vp-docs/SKILL.md +1 -1
- package/skills/vp-evolve/SKILL.md +1 -1
- package/skills/vp-info/SKILL.md +1 -1
- package/skills/vp-pause/SKILL.md +2 -2
- package/skills/vp-proposal/SKILL.md +175 -0
- package/skills/vp-request/SKILL.md +2 -2
- package/skills/vp-resume/SKILL.md +2 -2
- package/skills/vp-rollback/SKILL.md +1 -1
- package/skills/vp-ui-components/SKILL.md +2 -2
- package/skills/vp-update/SKILL.md +1 -1
- package/templates/proposal/docx/project-detail.docx +0 -0
- package/templates/proposal/pptx/general.pptx +0 -0
- package/templates/proposal/pptx/product-pitch.pptx +0 -0
- package/templates/proposal/pptx/project-proposal-creative.pptx +0 -0
- package/templates/proposal/pptx/project-proposal-enterprise.pptx +0 -0
- package/templates/proposal/pptx/project-proposal-modern-tech.pptx +0 -0
- package/templates/proposal/pptx/project-proposal.pptx +0 -0
- package/templates/proposal/pptx/tech-architecture.pptx +0 -0
- package/workflows/autonomous.md +32 -0
- package/workflows/brainstorm.md +1 -1
- package/workflows/crystallize.md +519 -0
- package/workflows/evolve.md +2 -0
- package/workflows/proposal.md +807 -0
- package/dev-install.sh +0 -171
- package/install.sh +0 -125
package/docs/skills-reference.md
CHANGED
|
@@ -467,3 +467,49 @@ CHANGELOG.md (updated)
|
|
|
467
467
|
### Lưu ý
|
|
468
468
|
- Trong repo **application** có `node_modules/viepilot`, update mặc định có thể target **local** — dùng **`--global`** nếu chỉ muốn global.
|
|
469
469
|
- Luồng an toàn: `vp-tools update --dry-run` → sau đó `vp-tools update --yes` (hoặc `--global --yes`).
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
## /vp-proposal
|
|
474
|
+
|
|
475
|
+
**Purpose**: Generate professional proposal packages (.pptx + .docx + .md) from brainstorm sessions or direct briefs.
|
|
476
|
+
|
|
477
|
+
**Triggers**: "proposal", "pitch deck", "presentation", "tài liệu đề xuất"
|
|
478
|
+
|
|
479
|
+
### Proposal Types
|
|
480
|
+
| Type | Slides | Use case |
|
|
481
|
+
|------|--------|----------|
|
|
482
|
+
| `project-proposal` | 10 | Client delivery — scope, timeline, budget |
|
|
483
|
+
| `tech-architecture` | 12 | Technical partners — system design |
|
|
484
|
+
| `product-pitch` | 12 | Investors / partners — pitch |
|
|
485
|
+
| `general` | 8 | Any audience — flexible |
|
|
486
|
+
|
|
487
|
+
### Flags
|
|
488
|
+
| Flag | Description |
|
|
489
|
+
|------|-------------|
|
|
490
|
+
| `--type <id>` | Proposal type ID. If omitted: guided menu. |
|
|
491
|
+
| `--from <file>` | Explicit brainstorm session file to use |
|
|
492
|
+
| `--slides` | Upload to Google Slides after generation (requires service account) |
|
|
493
|
+
| `--dry-run` | Print slide manifest; no files written |
|
|
494
|
+
|
|
495
|
+
### Output
|
|
496
|
+
```
|
|
497
|
+
docs/proposals/
|
|
498
|
+
├── {slug}-{date}.md Markdown source
|
|
499
|
+
├── {slug}-{date}.pptx Presentation
|
|
500
|
+
├── {slug}-{date}.docx Detailed document
|
|
501
|
+
└── {slug}-{date}-slides.txt Google Slides URL (--slides only)
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
### Template Override
|
|
505
|
+
Place custom `.pptx`/`.docx` files in `.viepilot/proposal-templates/` to override stock ViePilot templates for a specific project.
|
|
506
|
+
|
|
507
|
+
### Examples
|
|
508
|
+
```
|
|
509
|
+
/vp-proposal Auto-detect session + guided type selection
|
|
510
|
+
/vp-proposal --type product-pitch 12-slide investor pitch
|
|
511
|
+
/vp-proposal --type project-proposal --slides + upload to Google Slides
|
|
512
|
+
/vp-proposal --dry-run Preview manifest only
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
Full guide: `docs/user/features/proposal.md`
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Supported Adapters
|
|
2
|
+
|
|
3
|
+
ViePilot supports multiple AI coding platforms via its adapter system (FEAT-013). Each adapter defines where skills and workflows are installed on your machine.
|
|
4
|
+
|
|
5
|
+
## Supported Platforms
|
|
6
|
+
|
|
7
|
+
| Adapter ID | Platform | Skills dir | ViePilot dir | Hooks | Skill syntax |
|
|
8
|
+
|------------|----------|------------|--------------|-------|--------------|
|
|
9
|
+
| `claude-code` | Claude Code *(default)* | `~/.claude/skills/` | `~/.claude/viepilot/` | ✅ Stop, PreToolUse, … | `/vp-status` |
|
|
10
|
+
| `cursor-agent` / `cursor-ide` | Cursor | `~/.cursor/skills/` | `~/.cursor/viepilot/` | — | `/vp-status` |
|
|
11
|
+
| `antigravity` | Google Antigravity | `~/.antigravity/skills/` | `~/.antigravity/viepilot/` | — | `/vp-status` |
|
|
12
|
+
| `codex` | OpenAI Codex CLI | `~/.codex/skills/` | `~/.codex/viepilot/` | — | `$vp-status` |
|
|
13
|
+
|
|
14
|
+
> **Note — Codex invocation syntax:** OpenAI Codex CLI uses `$skill-name` to invoke skills (e.g. `$vp-status`, `$vp-brainstorm`). The `/command` prefix is reserved for Codex built-in controls (`/plan`, `/clear`, `/diff`, etc.). SKILL.md file format is fully compatible — no changes needed to skill content.
|
|
15
|
+
|
|
16
|
+
## Install for a specific platform
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Claude Code (default)
|
|
20
|
+
viepilot install
|
|
21
|
+
|
|
22
|
+
# Cursor Agent
|
|
23
|
+
viepilot install --target cursor-agent
|
|
24
|
+
|
|
25
|
+
# Google Antigravity
|
|
26
|
+
viepilot install --target antigravity
|
|
27
|
+
|
|
28
|
+
# OpenAI Codex CLI
|
|
29
|
+
viepilot install --target codex
|
|
30
|
+
|
|
31
|
+
# Multiple targets at once
|
|
32
|
+
viepilot install --target claude-code,antigravity
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## How path resolution works (ENH-035)
|
|
36
|
+
|
|
37
|
+
Skill source files use the neutral placeholder `{envToolDir}` in `execution_context` blocks:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
@$HOME/{envToolDir}/workflows/autonomous.md
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
At install time, `{envToolDir}` is replaced with each adapter's `executionContextBase`:
|
|
44
|
+
- `claude-code` → `.claude/viepilot`
|
|
45
|
+
- `cursor` → `.cursor/viepilot`
|
|
46
|
+
- `antigravity` → `.antigravity/viepilot`
|
|
47
|
+
- `codex` → `.codex/viepilot`
|
|
48
|
+
|
|
49
|
+
## Adding a new adapter
|
|
50
|
+
|
|
51
|
+
Create `lib/adapters/{name}.cjs`:
|
|
52
|
+
|
|
53
|
+
```js
|
|
54
|
+
module.exports = {
|
|
55
|
+
id: 'myplatform',
|
|
56
|
+
name: 'My Platform',
|
|
57
|
+
skillsDir: (home) => path.join(home, '.myplatform', 'skills'),
|
|
58
|
+
viepilotDir: (home) => path.join(home, '.myplatform', 'viepilot'),
|
|
59
|
+
executionContextBase: '.myplatform/viepilot', // {envToolDir} resolves to this
|
|
60
|
+
postInstallHint: 'Open project and run /vp-status', // or $vp-status if platform uses $ prefix
|
|
61
|
+
hooks: { configFile: null, schema: 'myplatform', supportedEvents: [] },
|
|
62
|
+
installSubdirs: ['workflows', 'templates/project', 'templates/phase',
|
|
63
|
+
'templates/architect', 'bin', 'lib', 'ui-components'],
|
|
64
|
+
isAvailable: (home) => fs.existsSync(path.join(home, '.myplatform'))
|
|
65
|
+
};
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Register in `lib/adapters/index.cjs`:
|
|
69
|
+
|
|
70
|
+
```js
|
|
71
|
+
'myplatform': require('./myplatform.cjs'),
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
No `pathRewrite` field needed — `{envToolDir}` substitution is handled automatically.
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
# vp-proposal — Proposal Package Generator
|
|
2
|
+
|
|
3
|
+
Generate professional proposal packages directly from your ViePilot brainstorm sessions.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
`/vp-proposal` converts a brainstorm session (or a direct brief) into three synchronized files:
|
|
10
|
+
|
|
11
|
+
| File | Format | Purpose |
|
|
12
|
+
|------|--------|---------|
|
|
13
|
+
| `{slug}-{date}.md` | Markdown | Source of truth, version-controlled |
|
|
14
|
+
| `{slug}-{date}.pptx` | PowerPoint | Presentation (direct delivery) |
|
|
15
|
+
| `{slug}-{date}.docx` | Word | Detailed supporting document |
|
|
16
|
+
| `{slug}-{date}-slides.txt` | Text | Google Slides URL (with `--slides` flag) |
|
|
17
|
+
|
|
18
|
+
All files are written to `docs/proposals/` in your project.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Quick Start
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Auto-detects latest brainstorm session
|
|
26
|
+
/vp-proposal
|
|
27
|
+
|
|
28
|
+
# Specify type directly
|
|
29
|
+
/vp-proposal --type product-pitch
|
|
30
|
+
|
|
31
|
+
# With Google Slides upload
|
|
32
|
+
/vp-proposal --type project-proposal --slides
|
|
33
|
+
|
|
34
|
+
# Preview slide manifest without writing files
|
|
35
|
+
/vp-proposal --dry-run
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Proposal Types
|
|
41
|
+
|
|
42
|
+
| Type ID | Name | Slides | Best for |
|
|
43
|
+
|---------|------|--------|----------|
|
|
44
|
+
| `project-proposal` | Project Proposal | 10 | Client delivery — scope, timeline, budget |
|
|
45
|
+
| `tech-architecture` | Technical Architecture | 12 | Technical partners — system design |
|
|
46
|
+
| `product-pitch` | Product Pitch Deck | 12 | Investors / partners — pitch |
|
|
47
|
+
| `general` | General Proposal | 8 | Any audience — flexible structure |
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Flags
|
|
52
|
+
|
|
53
|
+
| Flag | Description |
|
|
54
|
+
|------|-------------|
|
|
55
|
+
| `--type <id>` | Proposal type (see table above). If omitted: guided menu. |
|
|
56
|
+
| `--from <file>` | Explicit brainstorm session: `--from docs/brainstorm/session-2026-04-11.md` |
|
|
57
|
+
| `--slides` | Upload generated .pptx to Google Slides after generation |
|
|
58
|
+
| `--dry-run` | Show slide manifest (JSON) without writing any files |
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Context Detection
|
|
63
|
+
|
|
64
|
+
`/vp-proposal` automatically loads the most recent brainstorm session:
|
|
65
|
+
|
|
66
|
+
1. Scans `docs/brainstorm/session-*.md`
|
|
67
|
+
2. Sorts descending by filename (ISO date format)
|
|
68
|
+
3. Loads the latest session as proposal content
|
|
69
|
+
|
|
70
|
+
**Override:** use `--from <session-file>` to specify a different session.
|
|
71
|
+
|
|
72
|
+
**Standalone mode:** if no session exists, you'll be prompted for a brief:
|
|
73
|
+
- Project name
|
|
74
|
+
- One-line description
|
|
75
|
+
- Target audience
|
|
76
|
+
- 3–5 key points
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Template Override
|
|
81
|
+
|
|
82
|
+
ViePilot ships stock templates (dark navy/charcoal, ViePilot branded).
|
|
83
|
+
To use your own branded templates for a specific project:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
your-project/
|
|
87
|
+
└── .viepilot/
|
|
88
|
+
└── proposal-templates/
|
|
89
|
+
├── project-proposal.pptx ← overrides stock
|
|
90
|
+
├── tech-architecture.pptx
|
|
91
|
+
├── product-pitch.pptx
|
|
92
|
+
├── general.pptx
|
|
93
|
+
└── project-detail.docx
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Resolution order:**
|
|
97
|
+
1. `.viepilot/proposal-templates/{type}.pptx` (project-level override)
|
|
98
|
+
2. `{viepilot-install}/templates/proposal/pptx/{type}.pptx` (ViePilot stock)
|
|
99
|
+
|
|
100
|
+
The override only applies to the project where the file is placed.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Output Structure
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
docs/proposals/
|
|
108
|
+
├── my-project-2026-04-11.md # Markdown source of truth
|
|
109
|
+
├── my-project-2026-04-11.pptx # Presentation
|
|
110
|
+
├── my-project-2026-04-11.docx # Detailed document
|
|
111
|
+
└── my-project-2026-04-11-slides.txt # Google Slides URL (if --slides)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
The `.md` file is the diff-friendly source. The `.pptx` and `.docx` are generated from it and can be regenerated at any time.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Google Slides Export
|
|
119
|
+
|
|
120
|
+
Use the `--slides` flag to automatically upload the generated `.pptx` to Google Slides.
|
|
121
|
+
|
|
122
|
+
### Setup (one-time)
|
|
123
|
+
|
|
124
|
+
**Step 1: Create a Google Cloud project**
|
|
125
|
+
1. Go to [console.cloud.google.com](https://console.cloud.google.com)
|
|
126
|
+
2. Create a new project (or select an existing one)
|
|
127
|
+
|
|
128
|
+
**Step 2: Enable APIs**
|
|
129
|
+
1. Navigate to **APIs & Services → Library**
|
|
130
|
+
2. Enable **Google Drive API**
|
|
131
|
+
3. Enable **Google Slides API**
|
|
132
|
+
|
|
133
|
+
**Step 3: Create a Service Account**
|
|
134
|
+
1. Go to **APIs & Services → Credentials**
|
|
135
|
+
2. Click **Create Credentials → Service Account**
|
|
136
|
+
3. Fill in name (e.g., `viepilot-proposal`)
|
|
137
|
+
4. Click **Done**
|
|
138
|
+
5. Click the new service account → **Keys** tab → **Add Key → Create new key (JSON)**
|
|
139
|
+
6. Save the downloaded JSON file securely (e.g., `~/.config/viepilot-gcp-key.json`)
|
|
140
|
+
|
|
141
|
+
**Step 4: Set environment variable**
|
|
142
|
+
```bash
|
|
143
|
+
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your-service-account-key.json
|
|
144
|
+
|
|
145
|
+
# Add to ~/.zshrc or ~/.bashrc to persist:
|
|
146
|
+
echo 'export GOOGLE_APPLICATION_CREDENTIALS=~/.config/viepilot-gcp-key.json' >> ~/.zshrc
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**Step 5: Install the optional dependency**
|
|
150
|
+
```bash
|
|
151
|
+
npm install @googleapis/slides
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Usage
|
|
155
|
+
```bash
|
|
156
|
+
/vp-proposal --type product-pitch --slides
|
|
157
|
+
# Output: docs/proposals/my-project-2026-04-11-slides.txt
|
|
158
|
+
# Content: https://docs.google.com/presentation/d/{id}/edit
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Notes
|
|
162
|
+
- The uploaded presentation retains the `.pptx` layout (converted by Google Drive)
|
|
163
|
+
- Upload failures are non-fatal — the `.pptx`, `.docx`, and `.md` files are always written first
|
|
164
|
+
- The service account needs no special permissions beyond the API scopes
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Examples
|
|
169
|
+
|
|
170
|
+
### Client proposal from brainstorm session
|
|
171
|
+
```
|
|
172
|
+
/vp-proposal --type project-proposal
|
|
173
|
+
→ Auto-loads docs/brainstorm/session-2026-04-11.md
|
|
174
|
+
→ Generates 10-slide project proposal
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Investor pitch standalone
|
|
178
|
+
```
|
|
179
|
+
/vp-proposal --type product-pitch
|
|
180
|
+
→ No session found — prompts for brief
|
|
181
|
+
→ Generates 12-slide pitch deck
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Architecture review with Google Slides
|
|
185
|
+
```
|
|
186
|
+
/vp-proposal --type tech-architecture --slides
|
|
187
|
+
→ Generates 12-slide architecture proposal + uploads to Google Slides
|
|
188
|
+
→ Writes URL to docs/proposals/*-slides.txt
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Preview without writing files
|
|
192
|
+
```
|
|
193
|
+
/vp-proposal --dry-run
|
|
194
|
+
→ Prints JSON slide manifest to console
|
|
195
|
+
→ No files written
|
|
196
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const os = require('os');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
id: 'antigravity',
|
|
8
|
+
name: 'Antigravity',
|
|
9
|
+
skillsDir: (home) => path.join(home, '.antigravity', 'skills'),
|
|
10
|
+
viepilotDir: (home) => path.join(home, '.antigravity', 'viepilot'),
|
|
11
|
+
// {envToolDir} in SKILL.md files resolves to this value at install time (ENH-035)
|
|
12
|
+
executionContextBase: '.antigravity/viepilot',
|
|
13
|
+
// Post-install hint shown in "Next actions" after viepilot install
|
|
14
|
+
postInstallHint: 'Open project and run /vp-status',
|
|
15
|
+
hooks: {
|
|
16
|
+
configFile: null, // Antigravity has no programmatic hooks system
|
|
17
|
+
schema: 'antigravity',
|
|
18
|
+
supportedEvents: []
|
|
19
|
+
},
|
|
20
|
+
installSubdirs: [
|
|
21
|
+
'workflows',
|
|
22
|
+
path.join('templates', 'project'),
|
|
23
|
+
path.join('templates', 'phase'),
|
|
24
|
+
path.join('templates', 'architect'),
|
|
25
|
+
'bin',
|
|
26
|
+
'lib',
|
|
27
|
+
'ui-components'
|
|
28
|
+
],
|
|
29
|
+
isAvailable: (home) => {
|
|
30
|
+
const h = home || os.homedir();
|
|
31
|
+
return fs.existsSync(path.join(h, '.antigravity'));
|
|
32
|
+
}
|
|
33
|
+
};
|
|
@@ -11,8 +11,8 @@ module.exports = {
|
|
|
11
11
|
viepilotDir: (home) => path.join(home, '.claude', 'viepilot'),
|
|
12
12
|
// execution_context base for skill .md files
|
|
13
13
|
executionContextBase: '.claude/viepilot',
|
|
14
|
-
//
|
|
15
|
-
|
|
14
|
+
// Post-install hint shown in "Next actions" after viepilot install
|
|
15
|
+
postInstallHint: 'Restart session so ~/.claude/skills/vp-* is picked up; then /vp-status',
|
|
16
16
|
// Hooks configuration (Claude Code settings.json)
|
|
17
17
|
hooks: {
|
|
18
18
|
configFile: (home) => path.join(home, '.claude', 'settings.json'),
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const os = require('os');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
id: 'codex',
|
|
8
|
+
name: 'Codex',
|
|
9
|
+
skillsDir: (home) => path.join(home, '.codex', 'skills'),
|
|
10
|
+
viepilotDir: (home) => path.join(home, '.codex', 'viepilot'),
|
|
11
|
+
// {envToolDir} in SKILL.md files resolves to this value at install time (ENH-035)
|
|
12
|
+
executionContextBase: '.codex/viepilot',
|
|
13
|
+
// NOTE: Codex uses $skill-name syntax (not /skill-name like other adapters)
|
|
14
|
+
// Codex reserves /command for built-in system controls (/plan, /clear, /diff, etc.)
|
|
15
|
+
postInstallHint: 'Open project and type $vp-status to get started',
|
|
16
|
+
hooks: {
|
|
17
|
+
configFile: null, // Codex uses AGENTS.md convention, not programmatic hooks
|
|
18
|
+
schema: 'codex',
|
|
19
|
+
supportedEvents: []
|
|
20
|
+
},
|
|
21
|
+
installSubdirs: [
|
|
22
|
+
'workflows',
|
|
23
|
+
path.join('templates', 'project'),
|
|
24
|
+
path.join('templates', 'phase'),
|
|
25
|
+
path.join('templates', 'architect'),
|
|
26
|
+
'bin',
|
|
27
|
+
'lib',
|
|
28
|
+
'ui-components'
|
|
29
|
+
],
|
|
30
|
+
isAvailable: (home) => {
|
|
31
|
+
const h = home || os.homedir();
|
|
32
|
+
return fs.existsSync(path.join(h, '.codex'));
|
|
33
|
+
}
|
|
34
|
+
};
|
package/lib/adapters/cursor.cjs
CHANGED
|
@@ -9,7 +9,8 @@ module.exports = {
|
|
|
9
9
|
skillsDir: (home) => path.join(home, '.cursor', 'skills'),
|
|
10
10
|
viepilotDir: (home) => path.join(home, '.cursor', 'viepilot'),
|
|
11
11
|
executionContextBase: '.cursor/viepilot',
|
|
12
|
-
|
|
12
|
+
// Post-install hint shown in "Next actions" after viepilot install
|
|
13
|
+
postInstallHint: 'Open project and run /vp-status',
|
|
13
14
|
hooks: {
|
|
14
15
|
configFile: null, // Cursor uses .cursorrules/MDC, not settings.json hooks
|
|
15
16
|
schema: 'cursor',
|
package/lib/adapters/index.cjs
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
const adapters = {
|
|
3
3
|
'claude-code': require('./claude-code.cjs'),
|
|
4
4
|
'cursor': require('./cursor.cjs'),
|
|
5
|
-
'cursor-agent': require('./cursor.cjs'),
|
|
6
|
-
'cursor-ide': require('./cursor.cjs'),
|
|
5
|
+
'cursor-agent': require('./cursor.cjs'), // alias
|
|
6
|
+
'cursor-ide': require('./cursor.cjs'), // alias
|
|
7
|
+
'antigravity': require('./antigravity.cjs'),
|
|
8
|
+
'codex': require('./codex.cjs'),
|
|
7
9
|
};
|
|
8
10
|
|
|
9
11
|
/**
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/**
|
|
3
|
+
* google-slides-exporter.cjs
|
|
4
|
+
* Uploads a .pptx file to Google Drive and converts it to a Google Slides presentation.
|
|
5
|
+
*
|
|
6
|
+
* Requirements (optional — only needed when --slides flag is used):
|
|
7
|
+
* npm install @googleapis/slides
|
|
8
|
+
* export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json
|
|
9
|
+
*
|
|
10
|
+
* See docs/user/features/proposal.md → "Google Slides Export" for setup guide.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const fs = require('fs');
|
|
14
|
+
const path = require('path');
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Upload a local .pptx file to Google Drive and convert to Google Slides.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} pptxPath Absolute path to the .pptx file
|
|
20
|
+
* @param {string} title Title for the Google Slides presentation
|
|
21
|
+
* @returns {Promise<string>} Public edit URL of the created presentation
|
|
22
|
+
*/
|
|
23
|
+
async function uploadToSlides(pptxPath, title) {
|
|
24
|
+
// Lazy-load @googleapis/slides — it is an optionalDependency.
|
|
25
|
+
// Provide a clear, actionable error when the package is not installed.
|
|
26
|
+
let googleApis;
|
|
27
|
+
try {
|
|
28
|
+
googleApis = require('googleapis');
|
|
29
|
+
} catch {
|
|
30
|
+
throw new Error(
|
|
31
|
+
'Google Slides export requires the @googleapis/slides package.\n\n' +
|
|
32
|
+
'Install it:\n' +
|
|
33
|
+
' npm install @googleapis/slides\n\n' +
|
|
34
|
+
'Then set your service account credentials:\n' +
|
|
35
|
+
' export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json\n\n' +
|
|
36
|
+
'See: docs/user/features/proposal.md → "Google Slides Export"'
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const { google } = googleApis;
|
|
41
|
+
|
|
42
|
+
// Verify credentials env var is set before attempting auth
|
|
43
|
+
if (!process.env.GOOGLE_APPLICATION_CREDENTIALS) {
|
|
44
|
+
throw new Error(
|
|
45
|
+
'GOOGLE_APPLICATION_CREDENTIALS environment variable is not set.\n\n' +
|
|
46
|
+
'Set it to the path of your Google service account JSON key:\n' +
|
|
47
|
+
' export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json\n\n' +
|
|
48
|
+
'See: docs/user/features/proposal.md → "Google Slides Export"'
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Authenticate via service account (no browser interaction required)
|
|
53
|
+
const auth = new google.auth.GoogleAuth({
|
|
54
|
+
scopes: [
|
|
55
|
+
'https://www.googleapis.com/auth/drive',
|
|
56
|
+
'https://www.googleapis.com/auth/presentations',
|
|
57
|
+
],
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
const authClient = await auth.getClient();
|
|
61
|
+
const drive = google.drive({ version: 'v3', auth: authClient });
|
|
62
|
+
|
|
63
|
+
// Upload .pptx and request conversion to Google Slides format
|
|
64
|
+
const { data: file } = await drive.files.create({
|
|
65
|
+
requestBody: {
|
|
66
|
+
name: title,
|
|
67
|
+
mimeType: 'application/vnd.google-apps.presentation',
|
|
68
|
+
},
|
|
69
|
+
media: {
|
|
70
|
+
mimeType:
|
|
71
|
+
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
|
72
|
+
body: fs.createReadStream(pptxPath),
|
|
73
|
+
},
|
|
74
|
+
fields: 'id',
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
return `https://docs.google.com/presentation/d/${file.id}/edit`;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
module.exports = { uploadToSlides };
|