@prompts-gpt/client 0.2.2 → 0.2.4
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/LICENSE +75 -21
- package/README.md +106 -279
- package/dist/cli.js +1513 -144
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +276 -47
- package/dist/index.js.map +1 -1
- package/dist/runtime.d.ts +223 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +1444 -0
- package/dist/runtime.js.map +1 -0
- package/dist/sweep.d.ts +180 -0
- package/dist/sweep.d.ts.map +1 -0
- package/dist/sweep.js +606 -0
- package/dist/sweep.js.map +1 -0
- package/package.json +4 -5
- package/CHANGELOG.md +0 -110
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prompts-gpt/client",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "CLI and SDK for
|
|
3
|
+
"version": "0.2.4",
|
|
4
|
+
"description": "CLI and SDK for syncing AI prompt packs and running multi-iteration sweeps — integrates with Codex, Claude Code, Cursor, Copilot, Gemini CLI, Windsurf, Cline, Continue, Junie, and Amp.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://prompts-gpt.com",
|
|
7
7
|
"bugs": {
|
|
8
8
|
"email": "support@prompts-gpt.com"
|
|
9
9
|
},
|
|
10
|
-
"license": "
|
|
10
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
11
11
|
"author": "Prompts-GPT <support@prompts-gpt.com> (https://prompts-gpt.com)",
|
|
12
12
|
"sideEffects": false,
|
|
13
13
|
"keywords": [
|
|
@@ -46,8 +46,7 @@
|
|
|
46
46
|
"files": [
|
|
47
47
|
"dist",
|
|
48
48
|
"README.md",
|
|
49
|
-
"LICENSE"
|
|
50
|
-
"CHANGELOG.md"
|
|
49
|
+
"LICENSE"
|
|
51
50
|
],
|
|
52
51
|
"engines": {
|
|
53
52
|
"node": ">=18.18"
|
package/CHANGELOG.md
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## Unreleased
|
|
4
|
-
|
|
5
|
-
### Security
|
|
6
|
-
|
|
7
|
-
- Validate `constraints` and `desiredOutput` length (max 1600 chars) client-side before network requests
|
|
8
|
-
- Validate token prefix (`pgpt_`) in `saveLocalCredentials` to reject malformed tokens at save time
|
|
9
|
-
- Sanitize Copilot prompt-file variable names to strip `$`, `{`, `}` injection characters
|
|
10
|
-
- Sanitize managed-block content to prevent marker injection via prompt content
|
|
11
|
-
- Validate API URL scheme (must be `https` or `http`) in `normalizeApiUrl`
|
|
12
|
-
- Auto-generate client-side request IDs (`pgcli_*`) when caller doesn't provide one for correlation
|
|
13
|
-
|
|
14
|
-
### Fixed
|
|
15
|
-
|
|
16
|
-
- Fix package version mismatch between `package.json` (0.2.1) and CHANGELOG (0.2.2)
|
|
17
|
-
- Fix npm publish failure on unsupported CI providers by removing forced provenance from package metadata
|
|
18
|
-
- Fix race condition in file writes: use atomic `wx` flag with `EEXIST` catch instead of `existsSync` + `wx`
|
|
19
|
-
- Fix `formatPromptMarkdown` producing double blank lines when both `usageNotes` and `variables` are empty
|
|
20
|
-
- Fix `normalizeAgentTargets` deduplication when `all` is mixed with explicit targets (e.g. `all,codex`)
|
|
21
|
-
- Fix `normalizeAgentTargets` returning empty array for empty string input
|
|
22
|
-
- Fix `loadLocalCredentials` returning empty-string token instead of `null` for whitespace-only stored tokens
|
|
23
|
-
- Fix `safeSlug` for unicode-only input by normalizing NFKD and stripping combining marks
|
|
24
|
-
- Fix `ensureGitignoreEntry` to preserve CRLF line endings on Windows-style `.gitignore` files
|
|
25
|
-
- Fix `parseRetryAfterHeader` to cap parsed values at 10 minutes, preventing unbounded waits
|
|
26
|
-
- Fix `assertInside` / `assertSafeOutputDir` boundary comparison for paths at the project root
|
|
27
|
-
- Fix `writePromptIndex` to escape `[` and `]` in Markdown link text to prevent broken rendering
|
|
28
|
-
- Fix `yamlScalar` to handle multi-line strings by normalizing `\r\n` before quoting
|
|
29
|
-
- Serialize agent file writes sequentially to prevent concurrent write races on shared files
|
|
30
|
-
|
|
31
|
-
### Improvements
|
|
32
|
-
|
|
33
|
-
- Add `--dry-run` flag to `sync` and `install-agents` commands for previewing changes
|
|
34
|
-
- Add dedicated CLI exit code `4` for rate-limit errors (HTTP 429)
|
|
35
|
-
- Use longer default timeout (60s) for prompt generation requests
|
|
36
|
-
- Add `DEFAULT_GENERATE_TIMEOUT_MS` constant for prompt generation timeout
|
|
37
|
-
|
|
38
|
-
### Packaging
|
|
39
|
-
|
|
40
|
-
- Add npm `homepage` and `bugs.email` metadata so package consumers have a first-party support path from the registry page
|
|
41
|
-
- Clarify the project-local CLI install path and pre-publish `npm pack --dry-run` verification flow in the README
|
|
42
|
-
|
|
43
|
-
## 0.2.2 (2026-05-16)
|
|
44
|
-
|
|
45
|
-
### Local Sync
|
|
46
|
-
|
|
47
|
-
- Reject prompt filename collisions after slug normalization before writing local artifacts
|
|
48
|
-
- Respect each prompt pack's declared `agentTargets` when generating Codex, Cursor, VS Code, and Copilot files
|
|
49
|
-
- Skip existing non-managed agent files unless `--overwrite` is explicitly passed
|
|
50
|
-
- Expand `manifest.json` with agent targets, recommended path, and generated file locations for downstream discovery
|
|
51
|
-
- Emit GitHub Copilot prompt files in prompt-file format instead of generic prompt-pack Markdown
|
|
52
|
-
- Add `.github/instructions/prompts-gpt.instructions.md` so Copilot treats synced agent artifacts as generated files
|
|
53
|
-
|
|
54
|
-
## 0.2.1 (2026-05-16)
|
|
55
|
-
|
|
56
|
-
### Packaging
|
|
57
|
-
|
|
58
|
-
- Add an explicit `default` export target for better ESM consumer and bundler compatibility
|
|
59
|
-
- Enable npm provenance on publish for stronger package registry attestation
|
|
60
|
-
- Remove the redundant `typesVersions` entry and rely on the package `types` field plus export metadata
|
|
61
|
-
|
|
62
|
-
### Documentation
|
|
63
|
-
|
|
64
|
-
- Replace stale `npx`-only examples with `npm exec` flows that pin to the latest published package
|
|
65
|
-
- Clarify that the importable SDK does not read `process.env` and requires explicit `fetch`
|
|
66
|
-
- Align CI/CD examples with the real CLI contract of passing tokens as flags instead of ambient env reads
|
|
67
|
-
- Document the packed artifact contents shipped to npm
|
|
68
|
-
|
|
69
|
-
## 0.2.0 (2026-05-16)
|
|
70
|
-
|
|
71
|
-
### Security
|
|
72
|
-
|
|
73
|
-
- Token prefix validation now enforced client-side before any network request
|
|
74
|
-
- Response content-type validation prevents processing non-JSON responses
|
|
75
|
-
- Retry delay capped at 30 seconds to prevent retry-after abuse
|
|
76
|
-
- Token length validation on `saveLocalCredentials` prevents oversized storage
|
|
77
|
-
- Control characters stripped from shell-quoted CLI output
|
|
78
|
-
|
|
79
|
-
### Improvements
|
|
80
|
-
|
|
81
|
-
- Add `accept: application/json` header to all API requests
|
|
82
|
-
- Validate response `content-type` before parsing JSON
|
|
83
|
-
- Cap retry sleep to prevent unbounded waits from malicious `retry-after` headers
|
|
84
|
-
- Improved error messages with structured `code` and `recovery` fields
|
|
85
|
-
- Added `package.json` subpath export for bundler compatibility
|
|
86
|
-
- Extended npm keywords for better discoverability
|
|
87
|
-
- Added `typesVersions` for legacy TypeScript resolution
|
|
88
|
-
|
|
89
|
-
### Fixed
|
|
90
|
-
|
|
91
|
-
- Fixed potential timeout leak when retries re-create AbortControllers
|
|
92
|
-
|
|
93
|
-
## 0.1.1 (2026-05-16)
|
|
94
|
-
|
|
95
|
-
- Remove public GitHub repository metadata from the npm package manifest while the source repository remains non-public.
|
|
96
|
-
- Preserve executable permissions for the `prompts-gpt` CLI after package builds.
|
|
97
|
-
|
|
98
|
-
## 0.1.0 (2026-05-16)
|
|
99
|
-
|
|
100
|
-
Initial release.
|
|
101
|
-
|
|
102
|
-
- **CLI commands:** `init`, `pull`, `generate`, `sync`, `install-agents`, `project`, `version`, `help`
|
|
103
|
-
- **SDK client:** `PromptsGptClient` with `getProject()`, `pullPrompts()`, `generatePrompt()`
|
|
104
|
-
- **Agent sync:** Writes agent-readable files for Codex (`AGENTS.md`), Cursor (`.cursor/rules/`), VS Code (`.github/copilot-instructions.md`, `.vscode/`), and Copilot (`.github/prompts/`)
|
|
105
|
-
- **Prompt Markdown files:** Written to `.prompts-gpt/` with YAML frontmatter
|
|
106
|
-
- **Manifest:** `manifest.json` for local agent discovery
|
|
107
|
-
- **Credentials:** Saved to `.prompts-gpt/.credentials.json` with `0600` permissions, auto-added to `.gitignore`
|
|
108
|
-
- **Retry logic:** Automatic retries with jitter for 429/502/503/504 responses and network errors
|
|
109
|
-
- **Input validation:** Client-side validation for `goal` length, `context` length, and `tool` values
|
|
110
|
-
- **Security:** Token prefix validation, HTTPS enforcement, path traversal protection
|