safepropel 1.0.6 → 1.0.8
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.
|
@@ -11,9 +11,15 @@ applyTo: '**'
|
|
|
11
11
|
**Upon workspace load, you MUST immediately load the SafePropel bundle:**
|
|
12
12
|
|
|
13
13
|
```javascript
|
|
14
|
-
const { PromptRuntime } = require('./engine/runtime.js');
|
|
14
|
+
const { PromptRuntime } = require('./safepropel/engine/runtime.js');
|
|
15
15
|
const runtime = new PromptRuntime();
|
|
16
|
-
|
|
16
|
+
const licenseKey = process.env.SAFEPROPEL_LICENSE_KEY;
|
|
17
|
+
|
|
18
|
+
if (!licenseKey) {
|
|
19
|
+
throw new Error('SAFEPROPEL_LICENSE_KEY environment variable is required');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
runtime.load('./safepropel/engine/prompt_bundle.enc', licenseKey);
|
|
17
23
|
|
|
18
24
|
console.log('✅ SafePropel Bundle Loaded');
|
|
19
25
|
console.log(`📦 Total Entries: ${runtime.info().totalEntries}`);
|
|
@@ -21,6 +27,8 @@ console.log(`📦 Total Entries: ${runtime.info().totalEntries}`);
|
|
|
21
27
|
|
|
22
28
|
**This is NOT optional. Load the bundle BEFORE processing ANY user query.**
|
|
23
29
|
|
|
30
|
+
**CRITICAL:** The bundle path is `./safepropel/engine/prompt_bundle.enc` (encrypted file, requires license key).
|
|
31
|
+
|
|
24
32
|
---
|
|
25
33
|
|
|
26
34
|
## Framework Enforcement Policy
|
|
@@ -65,7 +73,7 @@ This framework contains **ALL** specifications in the binary bundle:
|
|
|
65
73
|
|
|
66
74
|
**Ask yourself these questions BEFORE you create ANY file:**
|
|
67
75
|
|
|
68
|
-
1. ❓ Did I load the bundle using `runtime.load('./engine/prompt_bundle.
|
|
76
|
+
1. ❓ Did I load the bundle using `runtime.load('./safepropel/engine/prompt_bundle.enc', licenseKey)`?
|
|
69
77
|
- ❌ NO → **STOP! Load bundle first**
|
|
70
78
|
- ✅ YES → Continue to question 2
|
|
71
79
|
|
|
@@ -135,9 +143,15 @@ This framework contains **ALL** specifications in the binary bundle:
|
|
|
135
143
|
|
|
136
144
|
**Step 0: Initialize Bundle (MANDATORY - Do this FIRST when workspace loads)**
|
|
137
145
|
```javascript
|
|
138
|
-
const { PromptRuntime } = require('./engine/runtime.js');
|
|
146
|
+
const { PromptRuntime } = require('./safepropel/engine/runtime.js');
|
|
139
147
|
const runtime = new PromptRuntime();
|
|
140
|
-
|
|
148
|
+
const licenseKey = process.env.SAFEPROPEL_LICENSE_KEY;
|
|
149
|
+
|
|
150
|
+
if (!licenseKey) {
|
|
151
|
+
throw new Error('SAFEPROPEL_LICENSE_KEY environment variable is required');
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
runtime.load('./safepropel/engine/prompt_bundle.enc', licenseKey);
|
|
141
155
|
|
|
142
156
|
// Verify bundle loaded
|
|
143
157
|
const info = runtime.info();
|
package/.windsurfrules
CHANGED
|
@@ -13,9 +13,15 @@ User says: "create spec for BRD.txt"
|
|
|
13
13
|
|
|
14
14
|
**STEP 2: Load Bundle Internally**
|
|
15
15
|
```javascript
|
|
16
|
-
const { PromptRuntime } = require('./engine/runtime.js');
|
|
16
|
+
const { PromptRuntime } = require('./safepropel/engine/runtime.js');
|
|
17
17
|
const runtime = new PromptRuntime();
|
|
18
|
-
|
|
18
|
+
const licenseKey = process.env.SAFEPROPEL_LICENSE_KEY;
|
|
19
|
+
|
|
20
|
+
if (!licenseKey) {
|
|
21
|
+
throw new Error('SAFEPROPEL_LICENSE_KEY environment variable is required');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
runtime.load('./safepropel/engine/prompt_bundle.enc', licenseKey);
|
|
19
25
|
```
|
|
20
26
|
|
|
21
27
|
**STEP 3: Get Workflow Metadata from Bundle**
|
|
@@ -57,7 +63,7 @@ const output = executeWorkflow(workflowContent, inputContent, rulesContent, temp
|
|
|
57
63
|
```
|
|
58
64
|
User Request
|
|
59
65
|
↓
|
|
60
|
-
Load engine/prompt_bundle.
|
|
66
|
+
Load safepropel/engine/prompt_bundle.enc (in memory, requires license key)
|
|
61
67
|
↓
|
|
62
68
|
Get workflow from bundle (in memory)
|
|
63
69
|
↓
|
|
@@ -104,7 +110,7 @@ discovery-agent, backlog-agent, build-feature-agent, bug-fixing-agent
|
|
|
104
110
|
User: "Create a spec for health_brd.txt"
|
|
105
111
|
|
|
106
112
|
Cascade:
|
|
107
|
-
1. Loads engine/prompt_bundle.enc (requires SAFEPROPEL_LICENSE_KEY)
|
|
113
|
+
1. Loads safepropel/engine/prompt_bundle.enc (requires SAFEPROPEL_LICENSE_KEY)
|
|
108
114
|
2. Gets create-spec workflow from bundle
|
|
109
115
|
3. Reads health_brd.txt
|
|
110
116
|
4. Executes workflow
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "safepropel",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "SafePropel Framework - Unified Protection System for AI Workflow Execution with 4-layer security (Compilation, Encryption, Runtime Engine, Firewall)",
|
|
5
5
|
"main": "engine/workflow-executor.js",
|
|
6
6
|
"scripts": {
|
package/postinstall.js
CHANGED
|
@@ -19,14 +19,14 @@ console.log(` Source: ${packageDir}`);
|
|
|
19
19
|
console.log(` Target: ${projectRoot}`);
|
|
20
20
|
|
|
21
21
|
try {
|
|
22
|
-
// Step 1: Copy safepropel folder (engine + safepropel.js)
|
|
22
|
+
// Step 1: Copy safepropel folder (ONLY engine + safepropel.js - no .windsurf!)
|
|
23
23
|
if (fs.existsSync(safepropelDir)) {
|
|
24
24
|
console.log(`⚠️ safepropel/ folder already exists - skipping`);
|
|
25
25
|
} else {
|
|
26
26
|
fs.mkdirSync(safepropelDir, { recursive: true });
|
|
27
27
|
|
|
28
|
-
// Copy engine
|
|
29
|
-
const safepropelItems = ['engine', 'safepropel.js'
|
|
28
|
+
// Copy ONLY engine and safepropel.js (not .windsurf or .windsurfrules)
|
|
29
|
+
const safepropelItems = ['engine', 'safepropel.js'];
|
|
30
30
|
safepropelItems.forEach(item => {
|
|
31
31
|
const src = path.join(packageDir, item);
|
|
32
32
|
const dest = path.join(safepropelDir, item);
|
|
@@ -40,7 +40,7 @@ try {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
-
console.log(`✅ Copied safepropel/ folder`);
|
|
43
|
+
console.log(`✅ Copied safepropel/ folder (engine + safepropel.js)`);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
// Step 2: Copy .windsurf to PROJECT ROOT (so Cascade can find it)
|
|
@@ -76,16 +76,16 @@ try {
|
|
|
76
76
|
console.log(`
|
|
77
77
|
📁 Project structure:
|
|
78
78
|
your-project/
|
|
79
|
-
├── .windsurf/
|
|
79
|
+
├── .windsurf/ (Cascade integration - at root)
|
|
80
80
|
│ └── rules/
|
|
81
81
|
│ └── safepropel-framework-autoload.md
|
|
82
|
-
├── .windsurfrules
|
|
83
|
-
├── safepropel/
|
|
82
|
+
├── .windsurfrules (Cascade integration - at root)
|
|
83
|
+
├── safepropel/ (Framework files only)
|
|
84
84
|
│ ├── engine/
|
|
85
85
|
│ │ └── prompt_bundle.enc
|
|
86
86
|
│ └── safepropel.js
|
|
87
87
|
└── node_modules/
|
|
88
|
-
└── safepropel/
|
|
88
|
+
└── safepropel/ (npm package - not used directly)
|
|
89
89
|
|
|
90
90
|
📋 REQUIRED SETUP - Set License Key:
|
|
91
91
|
|