@grwnd/pi-governance 2.0.0 → 3.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/dist/extensions/index.js
CHANGED
|
@@ -17,9 +17,9 @@ var init_defaults = __esm({
|
|
|
17
17
|
auth: {
|
|
18
18
|
provider: "env",
|
|
19
19
|
env: {
|
|
20
|
-
user_var: "
|
|
21
|
-
role_var: "
|
|
22
|
-
org_unit_var: "
|
|
20
|
+
user_var: "PI_GOV_USER",
|
|
21
|
+
role_var: "PI_GOV_ROLE",
|
|
22
|
+
org_unit_var: "PI_GOV_ORG_UNIT"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
policy: {
|
|
@@ -898,15 +898,15 @@ var init_html = __esm({
|
|
|
898
898
|
<div class="field-row-3">
|
|
899
899
|
<div class="field">
|
|
900
900
|
<label>User Var</label>
|
|
901
|
-
<input type="text" id="auth-user-var" value="
|
|
901
|
+
<input type="text" id="auth-user-var" value="PI_GOV_USER" onchange="updatePreview()">
|
|
902
902
|
</div>
|
|
903
903
|
<div class="field">
|
|
904
904
|
<label>Role Var</label>
|
|
905
|
-
<input type="text" id="auth-role-var" value="
|
|
905
|
+
<input type="text" id="auth-role-var" value="PI_GOV_ROLE" onchange="updatePreview()">
|
|
906
906
|
</div>
|
|
907
907
|
<div class="field">
|
|
908
908
|
<label>Org Unit Var</label>
|
|
909
|
-
<input type="text" id="auth-org-unit-var" value="
|
|
909
|
+
<input type="text" id="auth-org-unit-var" value="PI_GOV_ORG_UNIT" onchange="updatePreview()">
|
|
910
910
|
</div>
|
|
911
911
|
</div>
|
|
912
912
|
</div>
|
|
@@ -1356,9 +1356,9 @@ function buildGovernanceConfig() {
|
|
|
1356
1356
|
cfg.auth = { provider: authProvider };
|
|
1357
1357
|
if (authProvider === 'env') {
|
|
1358
1358
|
cfg.auth.env = {
|
|
1359
|
-
user_var: document.getElementById('auth-user-var').value || '
|
|
1360
|
-
role_var: document.getElementById('auth-role-var').value || '
|
|
1361
|
-
org_unit_var: document.getElementById('auth-org-unit-var').value || '
|
|
1359
|
+
user_var: document.getElementById('auth-user-var').value || 'PI_GOV_USER',
|
|
1360
|
+
role_var: document.getElementById('auth-role-var').value || 'PI_GOV_ROLE',
|
|
1361
|
+
org_unit_var: document.getElementById('auth-org-unit-var').value || 'PI_GOV_ORG_UNIT'
|
|
1362
1362
|
};
|
|
1363
1363
|
} else if (authProvider === 'local') {
|
|
1364
1364
|
cfg.auth.local = {
|
|
@@ -1691,9 +1691,9 @@ import { Value } from "@sinclair/typebox/value";
|
|
|
1691
1691
|
// src/lib/config/schema.ts
|
|
1692
1692
|
import { Type } from "@sinclair/typebox";
|
|
1693
1693
|
var AuthEnvConfig = Type.Object({
|
|
1694
|
-
user_var: Type.String({ default: "
|
|
1695
|
-
role_var: Type.String({ default: "
|
|
1696
|
-
org_unit_var: Type.String({ default: "
|
|
1694
|
+
user_var: Type.String({ default: "PI_GOV_USER" }),
|
|
1695
|
+
role_var: Type.String({ default: "PI_GOV_ROLE" }),
|
|
1696
|
+
org_unit_var: Type.String({ default: "PI_GOV_ORG_UNIT" })
|
|
1697
1697
|
});
|
|
1698
1698
|
var AuthLocalConfig = Type.Object({
|
|
1699
1699
|
users_file: Type.String({ default: "./users.yaml" })
|
|
@@ -1840,7 +1840,7 @@ var GovernanceConfigSchema = Type.Object({
|
|
|
1840
1840
|
init_defaults();
|
|
1841
1841
|
function getConfigPaths() {
|
|
1842
1842
|
return [
|
|
1843
|
-
process.env["
|
|
1843
|
+
process.env["PI_GOV_GOVERNANCE_CONFIG"],
|
|
1844
1844
|
".pi/governance.yaml",
|
|
1845
1845
|
`${process.env["HOME"]}/.pi/agent/governance.yaml`
|
|
1846
1846
|
];
|
|
@@ -1887,7 +1887,7 @@ ${details}`);
|
|
|
1887
1887
|
|
|
1888
1888
|
// src/lib/identity/env-provider.ts
|
|
1889
1889
|
var EnvIdentityProvider = class {
|
|
1890
|
-
constructor(userVar = "
|
|
1890
|
+
constructor(userVar = "PI_GOV_USER", roleVar = "PI_GOV_ROLE", orgUnitVar = "PI_GOV_ORG_UNIT") {
|
|
1891
1891
|
this.userVar = userVar;
|
|
1892
1892
|
this.roleVar = roleVar;
|
|
1893
1893
|
this.orgUnitVar = orgUnitVar;
|