@holdpoint/engine-cursor 0.1.0-alpha.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/dist/index.d.ts +11 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/package.json +60 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HoldpointConfig } from '@holdpoint/types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Generate .cursorrules additions from a HoldpointConfig.
|
|
5
|
+
*
|
|
6
|
+
* Cursor has no programmatic hooks, so we inject natural-language rules that
|
|
7
|
+
* instruct the agent to run and respect Holdpoint checks before completing work.
|
|
8
|
+
*/
|
|
9
|
+
declare function buildEngine(config: HoldpointConfig): string;
|
|
10
|
+
|
|
11
|
+
export { buildEngine };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// src/engine.ts
|
|
2
|
+
function buildEngine(config) {
|
|
3
|
+
const deterministicList = config.checks.filter((c) => c.cmd !== void 0).map((c) => ` - [${c.when ?? "always"}] ${c.label}: \`${c.cmd ?? "(no cmd)"}\``).join("\n");
|
|
4
|
+
const promptList = config.checks.filter((c) => c.prompt !== void 0).map((c) => ` - [${c.when ?? "always"}] ${c.label}: ${c.prompt ?? ""}`).join("\n");
|
|
5
|
+
return `
|
|
6
|
+
# \u2500\u2500\u2500 Holdpoint Rules (auto-generated) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
7
|
+
# DO NOT EDIT this block manually. Re-generate with: npx holdpoint update
|
|
8
|
+
|
|
9
|
+
## Mandatory pre-completion checks
|
|
10
|
+
|
|
11
|
+
Before marking ANY task as done or making a final commit, you MUST:
|
|
12
|
+
|
|
13
|
+
1. Run all Holdpoint tasks and confirm they pass:
|
|
14
|
+
${deterministicList || " (no tasks configured)"}
|
|
15
|
+
|
|
16
|
+
2. Act on all matching agent prompts:
|
|
17
|
+
${promptList || " (no prompt checks configured)"}
|
|
18
|
+
|
|
19
|
+
3. If any task exits non-zero, fix the underlying issue before
|
|
20
|
+
proceeding. Do NOT suppress errors or skip tasks.
|
|
21
|
+
|
|
22
|
+
4. For prompt checks, explicitly state in your response that you have acted on
|
|
23
|
+
each item before marking the task complete.
|
|
24
|
+
|
|
25
|
+
## Running checks
|
|
26
|
+
Run: \`npx holdpoint check --staged\` to execute all tasks.
|
|
27
|
+
Fix all failures before proceeding.
|
|
28
|
+
|
|
29
|
+
# \u2500\u2500\u2500 End Holdpoint Rules \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
30
|
+
`;
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
buildEngine
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/engine.ts"],"sourcesContent":["import type { HoldpointConfig } from \"@holdpoint/types\";\n\n/**\n * Generate .cursorrules additions from a HoldpointConfig.\n *\n * Cursor has no programmatic hooks, so we inject natural-language rules that\n * instruct the agent to run and respect Holdpoint checks before completing work.\n */\nexport function buildEngine(config: HoldpointConfig): string {\n const deterministicList = config.checks\n .filter((c) => c.cmd !== undefined)\n .map((c) => ` - [${c.when ?? \"always\"}] ${c.label}: \\`${c.cmd ?? \"(no cmd)\"}\\``)\n .join(\"\\n\");\n\n const promptList = config.checks\n .filter((c) => c.prompt !== undefined)\n .map((c) => ` - [${c.when ?? \"always\"}] ${c.label}: ${c.prompt ?? \"\"}`)\n .join(\"\\n\");\n\n return `\n# ─── Holdpoint Rules (auto-generated) ─────────────────────────────────────────\n# DO NOT EDIT this block manually. Re-generate with: npx holdpoint update\n\n## Mandatory pre-completion checks\n\nBefore marking ANY task as done or making a final commit, you MUST:\n\n1. Run all Holdpoint tasks and confirm they pass:\n${deterministicList || \" (no tasks configured)\"}\n\n2. Act on all matching agent prompts:\n${promptList || \" (no prompt checks configured)\"}\n\n3. If any task exits non-zero, fix the underlying issue before\n proceeding. Do NOT suppress errors or skip tasks.\n\n4. For prompt checks, explicitly state in your response that you have acted on\n each item before marking the task complete.\n\n## Running checks\n Run: \\`npx holdpoint check --staged\\` to execute all tasks.\n Fix all failures before proceeding.\n\n# ─── End Holdpoint Rules ───────────────────────────────────────────────────────\n`;\n}\n"],"mappings":";AAQO,SAAS,YAAY,QAAiC;AAC3D,QAAM,oBAAoB,OAAO,OAC9B,OAAO,CAAC,MAAM,EAAE,QAAQ,MAAS,EACjC,IAAI,CAAC,MAAM,QAAQ,EAAE,QAAQ,QAAQ,KAAK,EAAE,KAAK,OAAO,EAAE,OAAO,UAAU,IAAI,EAC/E,KAAK,IAAI;AAEZ,QAAM,aAAa,OAAO,OACvB,OAAO,CAAC,MAAM,EAAE,WAAW,MAAS,EACpC,IAAI,CAAC,MAAM,QAAQ,EAAE,QAAQ,QAAQ,KAAK,EAAE,KAAK,KAAK,EAAE,UAAU,EAAE,EAAE,EACtE,KAAK,IAAI;AAEZ,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASP,qBAAqB,yBAAyB;AAAA;AAAA;AAAA,EAG9C,cAAc,iCAAiC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcjD;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@holdpoint/engine-cursor",
|
|
3
|
+
"version": "0.1.0-alpha.0",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public",
|
|
6
|
+
"tag": "alpha"
|
|
7
|
+
},
|
|
8
|
+
"description": "Holdpoint engine adapter for Cursor",
|
|
9
|
+
"homepage": "https://holdpoint.dev",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/holdpoint-dev/holdpoint/issues"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/holdpoint-dev/holdpoint.git",
|
|
16
|
+
"directory": "packages/engine-cursor"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"keywords": [
|
|
20
|
+
"holdpoint",
|
|
21
|
+
"ai",
|
|
22
|
+
"agents",
|
|
23
|
+
"claude-code",
|
|
24
|
+
"github-copilot",
|
|
25
|
+
"cursor",
|
|
26
|
+
"eval",
|
|
27
|
+
"checkpoints",
|
|
28
|
+
"ci",
|
|
29
|
+
"yaml"
|
|
30
|
+
],
|
|
31
|
+
"type": "module",
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"import": "./dist/index.js"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"main": "./dist/index.js",
|
|
39
|
+
"types": "./dist/index.d.ts",
|
|
40
|
+
"files": [
|
|
41
|
+
"dist",
|
|
42
|
+
"README.md",
|
|
43
|
+
"LICENSE"
|
|
44
|
+
],
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "tsup",
|
|
47
|
+
"typecheck": "tsc --noEmit",
|
|
48
|
+
"test": "vitest run",
|
|
49
|
+
"test:watch": "vitest",
|
|
50
|
+
"clean": "rm -rf dist *.tsbuildinfo"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@holdpoint/types": "workspace:*"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"tsup": "^8.3.5",
|
|
57
|
+
"typescript": "^5.7.2",
|
|
58
|
+
"vitest": "^2.1.8"
|
|
59
|
+
}
|
|
60
|
+
}
|