@equilateral_ai/mindmeld 3.5.1 → 3.5.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equilateral_ai/mindmeld",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.2",
|
|
4
4
|
"description": "Intelligent standards injection for AI coding sessions - context-aware, self-documenting, scales to large codebases",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@aws-sdk/client-bedrock-runtime": "^3.460.0",
|
|
83
83
|
"@aws-sdk/client-ssm": "^3.985.0",
|
|
84
|
+
"js-yaml": "^4.1.1",
|
|
84
85
|
"pg": "^8.18.0"
|
|
85
86
|
},
|
|
86
87
|
"devDependencies": {
|
|
@@ -65,14 +65,29 @@ async function updateProjectStandards({ body, pathParameters, requestContext })
|
|
|
65
65
|
|
|
66
66
|
// Update load_bearing flag on a specific standard if provided
|
|
67
67
|
if (standard_id && typeof load_bearing === 'boolean') {
|
|
68
|
-
await executeQuery(`
|
|
68
|
+
const userCompany = await executeQuery(`
|
|
69
|
+
SELECT company_id FROM rapport.user_entitlements WHERE email_address = $1 LIMIT 1
|
|
70
|
+
`, [email]);
|
|
71
|
+
const companyId = userCompany.rows[0]?.company_id;
|
|
72
|
+
|
|
73
|
+
// Try base standards first
|
|
74
|
+
const baseResult = await executeQuery(`
|
|
69
75
|
UPDATE rapport.standards_patterns
|
|
70
76
|
SET load_bearing = $1
|
|
71
77
|
WHERE pattern_id = $2
|
|
72
|
-
AND (company_id IS NULL OR company_id =
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
AND (company_id IS NULL OR company_id = $3)
|
|
79
|
+
`, [load_bearing, standard_id, companyId]);
|
|
80
|
+
|
|
81
|
+
// If no base standard matched, try company overrides
|
|
82
|
+
if (baseResult.rowCount === 0 && companyId) {
|
|
83
|
+
await executeQuery(`
|
|
84
|
+
UPDATE rapport.company_standard_overrides
|
|
85
|
+
SET load_bearing = $1
|
|
86
|
+
WHERE (base_standard_id = $2 OR override_id::text = $3)
|
|
87
|
+
AND company_id = $4
|
|
88
|
+
AND active = TRUE
|
|
89
|
+
`, [load_bearing, standard_id, standard_id.replace('company-add-', ''), companyId]);
|
|
90
|
+
}
|
|
76
91
|
}
|
|
77
92
|
|
|
78
93
|
// Upsert project standards
|