@trigguard/protocol 0.1.0 → 0.1.2
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 +21 -0
- package/README.md +16 -5
- package/package.json +15 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) TrigGuard contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# TrigGuard Protocol
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@trigguard/protocol)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Canonical protocol definitions for TrigGuard governance decisions: vocabulary (`PERMIT`, `DENY`, `SILENCE`), enforcement semantics, and the `DecisionRecord` shape used across products and tooling.
|
|
6
|
+
|
|
7
|
+
**Package name:** `@trigguard/protocol` — types and contract snapshots; runtime evaluation and policy engines live in other packages and services. Integrations **conform** to this contract.
|
|
6
8
|
|
|
7
9
|
## Install
|
|
8
10
|
|
|
@@ -10,9 +12,9 @@ The TrigGuard protocol defines the **contract for deterministic authorization de
|
|
|
10
12
|
npm install @trigguard/protocol
|
|
11
13
|
```
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
Published on the public registry under the `@trigguard` scope. For release process, see `docs/release/PROTOCOL_RELEASE.md` in the monorepo.
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
**Develop inside the repo** (no registry), use a path or workspace:
|
|
16
18
|
|
|
17
19
|
```json
|
|
18
20
|
"@trigguard/protocol": "file:../packages/protocol"
|
|
@@ -52,6 +54,15 @@ const record: DecisionRecord = {
|
|
|
52
54
|
|
|
53
55
|
There is **no** `evaluate()` in this package — evaluation lives in TrigGuard services and kernels. This package supplies **types and canonical constants** so callers and SDKs share one contract.
|
|
54
56
|
|
|
57
|
+
## Subpath exports (JSON)
|
|
58
|
+
|
|
59
|
+
The package exposes stable paths for the JSON schema and decision contract snapshot:
|
|
60
|
+
|
|
61
|
+
```javascript
|
|
62
|
+
const schema = require("@trigguard/protocol/schema");
|
|
63
|
+
const contract = require("@trigguard/protocol/contract");
|
|
64
|
+
```
|
|
65
|
+
|
|
55
66
|
## Build (maintainers / CI)
|
|
56
67
|
|
|
57
68
|
From `packages/protocol`:
|
package/package.json
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trigguard/protocol",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Shared TypeScript types and JSON contract snapshots for TrigGuard authorization decisions and records.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"require": "./dist/index.js",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./schema": "./dist/schema.json",
|
|
14
|
+
"./contract": "./dist/contracts/decision_contract.json"
|
|
15
|
+
},
|
|
7
16
|
"files": [
|
|
8
17
|
"dist",
|
|
9
|
-
"README.md"
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE"
|
|
10
20
|
],
|
|
11
21
|
"scripts": {
|
|
12
22
|
"sync-contract": "node scripts/sync-contract.mjs",
|
|
@@ -19,10 +29,10 @@
|
|
|
19
29
|
"protocol",
|
|
20
30
|
"governance"
|
|
21
31
|
],
|
|
22
|
-
"license": "
|
|
32
|
+
"license": "MIT",
|
|
23
33
|
"repository": {
|
|
24
34
|
"type": "git",
|
|
25
|
-
"url": "https://github.com/TrigGuard-AI/TrigGuard"
|
|
35
|
+
"url": "git+https://github.com/TrigGuard-AI/TrigGuard.git"
|
|
26
36
|
},
|
|
27
37
|
"devDependencies": {
|
|
28
38
|
"typescript": "~5.6.3"
|