@grwnd/pi-governance 1.9.1 → 2.0.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/README.md +1 -1
- package/dist/extensions/index.cjs +14 -14
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.js +14 -14
- package/dist/extensions/index.js.map +1 -1
- package/dist/index.cjs +14 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ Create `.pi/governance.yaml` and `governance-rules.yaml` — see the [Configurat
|
|
|
57
57
|
### Set identity
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
export
|
|
60
|
+
export PI_RBAC_ROLE=project_lead # analyst | project_lead | admin | auditor
|
|
61
61
|
pi
|
|
62
62
|
/governance status
|
|
63
63
|
```
|
|
@@ -39,9 +39,9 @@ var init_defaults = __esm({
|
|
|
39
39
|
auth: {
|
|
40
40
|
provider: "env",
|
|
41
41
|
env: {
|
|
42
|
-
user_var: "
|
|
43
|
-
role_var: "
|
|
44
|
-
org_unit_var: "
|
|
42
|
+
user_var: "PI_RBAC_USER",
|
|
43
|
+
role_var: "PI_RBAC_ROLE",
|
|
44
|
+
org_unit_var: "PI_RBAC_ORG_UNIT"
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
policy: {
|
|
@@ -920,15 +920,15 @@ var init_html = __esm({
|
|
|
920
920
|
<div class="field-row-3">
|
|
921
921
|
<div class="field">
|
|
922
922
|
<label>User Var</label>
|
|
923
|
-
<input type="text" id="auth-user-var" value="
|
|
923
|
+
<input type="text" id="auth-user-var" value="PI_RBAC_USER" onchange="updatePreview()">
|
|
924
924
|
</div>
|
|
925
925
|
<div class="field">
|
|
926
926
|
<label>Role Var</label>
|
|
927
|
-
<input type="text" id="auth-role-var" value="
|
|
927
|
+
<input type="text" id="auth-role-var" value="PI_RBAC_ROLE" onchange="updatePreview()">
|
|
928
928
|
</div>
|
|
929
929
|
<div class="field">
|
|
930
930
|
<label>Org Unit Var</label>
|
|
931
|
-
<input type="text" id="auth-org-unit-var" value="
|
|
931
|
+
<input type="text" id="auth-org-unit-var" value="PI_RBAC_ORG_UNIT" onchange="updatePreview()">
|
|
932
932
|
</div>
|
|
933
933
|
</div>
|
|
934
934
|
</div>
|
|
@@ -1378,9 +1378,9 @@ function buildGovernanceConfig() {
|
|
|
1378
1378
|
cfg.auth = { provider: authProvider };
|
|
1379
1379
|
if (authProvider === 'env') {
|
|
1380
1380
|
cfg.auth.env = {
|
|
1381
|
-
user_var: document.getElementById('auth-user-var').value || '
|
|
1382
|
-
role_var: document.getElementById('auth-role-var').value || '
|
|
1383
|
-
org_unit_var: document.getElementById('auth-org-unit-var').value || '
|
|
1381
|
+
user_var: document.getElementById('auth-user-var').value || 'PI_RBAC_USER',
|
|
1382
|
+
role_var: document.getElementById('auth-role-var').value || 'PI_RBAC_ROLE',
|
|
1383
|
+
org_unit_var: document.getElementById('auth-org-unit-var').value || 'PI_RBAC_ORG_UNIT'
|
|
1384
1384
|
};
|
|
1385
1385
|
} else if (authProvider === 'local') {
|
|
1386
1386
|
cfg.auth.local = {
|
|
@@ -1718,9 +1718,9 @@ var import_value = require("@sinclair/typebox/value");
|
|
|
1718
1718
|
// src/lib/config/schema.ts
|
|
1719
1719
|
var import_typebox = require("@sinclair/typebox");
|
|
1720
1720
|
var AuthEnvConfig = import_typebox.Type.Object({
|
|
1721
|
-
user_var: import_typebox.Type.String({ default: "
|
|
1722
|
-
role_var: import_typebox.Type.String({ default: "
|
|
1723
|
-
org_unit_var: import_typebox.Type.String({ default: "
|
|
1721
|
+
user_var: import_typebox.Type.String({ default: "PI_RBAC_USER" }),
|
|
1722
|
+
role_var: import_typebox.Type.String({ default: "PI_RBAC_ROLE" }),
|
|
1723
|
+
org_unit_var: import_typebox.Type.String({ default: "PI_RBAC_ORG_UNIT" })
|
|
1724
1724
|
});
|
|
1725
1725
|
var AuthLocalConfig = import_typebox.Type.Object({
|
|
1726
1726
|
users_file: import_typebox.Type.String({ default: "./users.yaml" })
|
|
@@ -1867,7 +1867,7 @@ var GovernanceConfigSchema = import_typebox.Type.Object({
|
|
|
1867
1867
|
init_defaults();
|
|
1868
1868
|
function getConfigPaths() {
|
|
1869
1869
|
return [
|
|
1870
|
-
process.env["
|
|
1870
|
+
process.env["PI_RBAC_GOVERNANCE_CONFIG"],
|
|
1871
1871
|
".pi/governance.yaml",
|
|
1872
1872
|
`${process.env["HOME"]}/.pi/agent/governance.yaml`
|
|
1873
1873
|
];
|
|
@@ -1914,7 +1914,7 @@ ${details}`);
|
|
|
1914
1914
|
|
|
1915
1915
|
// src/lib/identity/env-provider.ts
|
|
1916
1916
|
var EnvIdentityProvider = class {
|
|
1917
|
-
constructor(userVar = "
|
|
1917
|
+
constructor(userVar = "PI_RBAC_USER", roleVar = "PI_RBAC_ROLE", orgUnitVar = "PI_RBAC_ORG_UNIT") {
|
|
1918
1918
|
this.userVar = userVar;
|
|
1919
1919
|
this.roleVar = roleVar;
|
|
1920
1920
|
this.orgUnitVar = orgUnitVar;
|