@grwnd/pi-governance 1.9.1 → 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/index.cjs
CHANGED
|
@@ -3099,9 +3099,9 @@ var import_value = require("@sinclair/typebox/value");
|
|
|
3099
3099
|
// src/lib/config/schema.ts
|
|
3100
3100
|
var import_typebox = require("@sinclair/typebox");
|
|
3101
3101
|
var AuthEnvConfig = import_typebox.Type.Object({
|
|
3102
|
-
user_var: import_typebox.Type.String({ default: "
|
|
3103
|
-
role_var: import_typebox.Type.String({ default: "
|
|
3104
|
-
org_unit_var: import_typebox.Type.String({ default: "
|
|
3102
|
+
user_var: import_typebox.Type.String({ default: "PI_GOV_USER" }),
|
|
3103
|
+
role_var: import_typebox.Type.String({ default: "PI_GOV_ROLE" }),
|
|
3104
|
+
org_unit_var: import_typebox.Type.String({ default: "PI_GOV_ORG_UNIT" })
|
|
3105
3105
|
});
|
|
3106
3106
|
var AuthLocalConfig = import_typebox.Type.Object({
|
|
3107
3107
|
users_file: import_typebox.Type.String({ default: "./users.yaml" })
|
|
@@ -3249,9 +3249,9 @@ var DEFAULTS = {
|
|
|
3249
3249
|
auth: {
|
|
3250
3250
|
provider: "env",
|
|
3251
3251
|
env: {
|
|
3252
|
-
user_var: "
|
|
3253
|
-
role_var: "
|
|
3254
|
-
org_unit_var: "
|
|
3252
|
+
user_var: "PI_GOV_USER",
|
|
3253
|
+
role_var: "PI_GOV_ROLE",
|
|
3254
|
+
org_unit_var: "PI_GOV_ORG_UNIT"
|
|
3255
3255
|
}
|
|
3256
3256
|
},
|
|
3257
3257
|
policy: {
|
|
@@ -3293,7 +3293,7 @@ var DEFAULTS = {
|
|
|
3293
3293
|
// src/lib/config/loader.ts
|
|
3294
3294
|
function getConfigPaths() {
|
|
3295
3295
|
return [
|
|
3296
|
-
process.env["
|
|
3296
|
+
process.env["PI_GOV_GOVERNANCE_CONFIG"],
|
|
3297
3297
|
".pi/governance.yaml",
|
|
3298
3298
|
`${process.env["HOME"]}/.pi/agent/governance.yaml`
|
|
3299
3299
|
];
|
|
@@ -3432,7 +3432,7 @@ async function createPolicyEngine(config) {
|
|
|
3432
3432
|
|
|
3433
3433
|
// src/lib/identity/env-provider.ts
|
|
3434
3434
|
var EnvIdentityProvider = class {
|
|
3435
|
-
constructor(userVar = "
|
|
3435
|
+
constructor(userVar = "PI_GOV_USER", roleVar = "PI_GOV_ROLE", orgUnitVar = "PI_GOV_ORG_UNIT") {
|
|
3436
3436
|
this.userVar = userVar;
|
|
3437
3437
|
this.roleVar = roleVar;
|
|
3438
3438
|
this.orgUnitVar = orgUnitVar;
|
|
@@ -5239,15 +5239,15 @@ var WIZARD_HTML = `<!DOCTYPE html>
|
|
|
5239
5239
|
<div class="field-row-3">
|
|
5240
5240
|
<div class="field">
|
|
5241
5241
|
<label>User Var</label>
|
|
5242
|
-
<input type="text" id="auth-user-var" value="
|
|
5242
|
+
<input type="text" id="auth-user-var" value="PI_GOV_USER" onchange="updatePreview()">
|
|
5243
5243
|
</div>
|
|
5244
5244
|
<div class="field">
|
|
5245
5245
|
<label>Role Var</label>
|
|
5246
|
-
<input type="text" id="auth-role-var" value="
|
|
5246
|
+
<input type="text" id="auth-role-var" value="PI_GOV_ROLE" onchange="updatePreview()">
|
|
5247
5247
|
</div>
|
|
5248
5248
|
<div class="field">
|
|
5249
5249
|
<label>Org Unit Var</label>
|
|
5250
|
-
<input type="text" id="auth-org-unit-var" value="
|
|
5250
|
+
<input type="text" id="auth-org-unit-var" value="PI_GOV_ORG_UNIT" onchange="updatePreview()">
|
|
5251
5251
|
</div>
|
|
5252
5252
|
</div>
|
|
5253
5253
|
</div>
|
|
@@ -5697,9 +5697,9 @@ function buildGovernanceConfig() {
|
|
|
5697
5697
|
cfg.auth = { provider: authProvider };
|
|
5698
5698
|
if (authProvider === 'env') {
|
|
5699
5699
|
cfg.auth.env = {
|
|
5700
|
-
user_var: document.getElementById('auth-user-var').value || '
|
|
5701
|
-
role_var: document.getElementById('auth-role-var').value || '
|
|
5702
|
-
org_unit_var: document.getElementById('auth-org-unit-var').value || '
|
|
5700
|
+
user_var: document.getElementById('auth-user-var').value || 'PI_GOV_USER',
|
|
5701
|
+
role_var: document.getElementById('auth-role-var').value || 'PI_GOV_ROLE',
|
|
5702
|
+
org_unit_var: document.getElementById('auth-org-unit-var').value || 'PI_GOV_ORG_UNIT'
|
|
5703
5703
|
};
|
|
5704
5704
|
} else if (authProvider === 'local') {
|
|
5705
5705
|
cfg.auth.local = {
|