agentics-shield 0.1.10 → 0.2.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.
@@ -1,15 +1,3 @@
1
- /**
2
- * @license Agentics Shield
3
-
4
- * ▄▀▀▀▀▀▄ ▄▀▀▀▀▀▀ █▀▀▀▀▀▀ █▀▄ █ ▀▀▀█▀▀▀ ▀▀▀█▀▀▀ ▄▀▀▀▀▀▀ ▄▀▀▀▀▀▀ ™
5
- * █▀▀▀▀▀█ █ ▀█▀ █▀▀▀▀▀ █ ▀▄ █ █ █ █ ▀▀▀▀▀▄
6
- * ▀ ▀ ▀▀▀▀▀▀ ▀▀▀▀▀▀▀ ▀ ▀▀ ▀ ▀▀▀▀▀▀▀ ▀▀▀▀▀▀ ▀▀▀▀▀▀
7
- * This source code is licensed and governed by a Proprietary License.
8
- * Permissions may be found in the LICENSE file located in the root directory.
9
-
10
- * © Agentics (Pty) Ltd - All Rights Reserved
11
- * https://agentics.co.za <-> info@agentics.co.za
12
- */
13
1
  const express = require('express');
14
2
  const path = require('path');
15
3
  const shield = require('agentics-shield');
@@ -17,19 +5,17 @@ const shield = require('agentics-shield');
17
5
  const app = express();
18
6
 
19
7
  const shieldInstance = shield.create({
20
- apiKey: process.env.AGENTICS_API_KEY,
21
- keysPath: path.resolve(__dirname, 'shield', 'shield.keys'),
22
- wasmPath: path.resolve(__dirname, 'shield', 'shield.wasm'),
8
+ keys: path.resolve(__dirname, 'node_modules', 'agentics-shield', 'wasm', 'shield.server.bin'),
23
9
  domains: ['localhost', 'yourdomain.com'],
24
- protectedFiles: {
25
- 'index.html': path.resolve(__dirname, 'public', 'index.html'),
10
+ prefix: '/shield',
11
+ cors: ['*'],
12
+ protected: {
26
13
  'app.js': path.resolve(__dirname, 'public', 'app.js'),
27
14
  'style.css': path.resolve(__dirname, 'public', 'style.css'),
28
15
  },
29
16
  });
30
17
 
31
18
  app.use(shieldInstance.router());
32
-
33
19
  app.use(express.static(path.join(__dirname, 'public')));
34
20
 
35
21
  app.listen(4821, () => {
@@ -1,15 +1,3 @@
1
- /**
2
- * @license Agentics Shield
3
-
4
- * ▄▀▀▀▀▀▄ ▄▀▀▀▀▀▀ █▀▀▀▀▀▀ █▀▄ █ ▀▀▀█▀▀▀ ▀▀▀█▀▀▀ ▄▀▀▀▀▀▀ ▄▀▀▀▀▀▀ ™
5
- * █▀▀▀▀▀█ █ ▀█▀ █▀▀▀▀▀ █ ▀▄ █ █ █ █ ▀▀▀▀▀▄
6
- * ▀ ▀ ▀▀▀▀▀▀ ▀▀▀▀▀▀▀ ▀ ▀▀ ▀ ▀▀▀▀▀▀▀ ▀▀▀▀▀▀ ▀▀▀▀▀▀
7
- * This source code is licensed and governed by a Proprietary License.
8
- * Permissions may be found in the LICENSE file located in the root directory.
9
-
10
- * © Agentics (Pty) Ltd - All Rights Reserved
11
- * https://agentics.co.za <-> info@agentics.co.za
12
- */
13
1
  const express = require('express');
14
2
  const path = require('path');
15
3
  const shield = require('agentics-shield');
@@ -18,12 +6,14 @@ const app = express();
18
6
  app.use(express.json());
19
7
 
20
8
  const shieldInstance = shield.create({
21
- apiKey: process.env.AGENTICS_API_KEY,
22
- keysPath: path.resolve(__dirname, 'shield', 'shield.keys'),
23
- wasmPath: path.resolve(__dirname, 'shield', 'shield.wasm'),
9
+ keys: path.resolve(__dirname, 'node_modules', 'agentics-shield', 'wasm', 'shield.server.bin'),
24
10
  domains: ['localhost', 'yourdomain.com'],
25
- protectedFiles: {
26
- 'index.html': path.resolve(__dirname, 'public', 'index.html'),
11
+ prefix: '/shield',
12
+ cors: ['*'],
13
+ proxy: {
14
+ '/api/': 'https://your-backend-api.example.com'
15
+ },
16
+ protected: {
27
17
  'app.js': path.resolve(__dirname, 'public', 'app.js'),
28
18
  'style.css': path.resolve(__dirname, 'public', 'style.css'),
29
19
  },
@@ -42,5 +32,5 @@ app.post('/api/submit', (req, res) => {
42
32
  app.use(express.static(path.join(__dirname, 'public')));
43
33
 
44
34
  app.listen(4823, () => {
45
- console.log('Shield + API server on http://localhost:4823');
35
+ console.log('Shield + API proxy server on http://localhost:4823');
46
36
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentics-shield",
3
- "version": "0.1.10",
3
+ "version": "0.2.0",
4
4
  "description": "Zero-trust frontend content protection. Encrypt, authenticate, and deliver proprietary code via WebAssembly.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {