guardian-framework 0.1.76 → 0.1.77

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/dist/cli.js CHANGED
@@ -3197,7 +3197,7 @@ __export(exports_package, {
3197
3197
  bin: () => bin,
3198
3198
  author: () => author
3199
3199
  });
3200
- var name = "guardian-framework", version = "0.1.76", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
3200
+ var name = "guardian-framework", version = "0.1.77", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
3201
3201
  var init_package = __esm(() => {
3202
3202
  exports = {
3203
3203
  ".": {
package/dist/exports.js CHANGED
@@ -1982,7 +1982,7 @@ __export(exports_package, {
1982
1982
  bin: () => bin,
1983
1983
  author: () => author
1984
1984
  });
1985
- var name = "guardian-framework", version = "0.1.76", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
1985
+ var name = "guardian-framework", version = "0.1.77", description = "Token-optimized agentic framework scaffolder with pi-first architecture", type = "module", main = "dist/exports.js", exports, types = "dist/exports.d.ts", bin, files, engines, scripts, publishConfig, pi, repository, homepage = "https://github.com/arman-jalili/guardian-framework#readme", bugs, dependencies, devDependencies, keywords, author = "Arman Wolkensteiner-Jalili", license = "MIT", package_default;
1986
1986
  var init_package = __esm(() => {
1987
1987
  exports = {
1988
1988
  ".": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guardian-framework",
3
- "version": "0.1.76",
3
+ "version": "0.1.77",
4
4
  "description": "Token-optimized agentic framework scaffolder with pi-first architecture",
5
5
  "type": "module",
6
6
  "main": "dist/exports.js",
@@ -81,6 +81,39 @@ export function glabEncodePath(rawPath: string): string {
81
81
  return encodeURIComponent(rawPath);
82
82
  }
83
83
 
84
+ /**
85
+ * Get the appropriate GitLab remote URL based on the configured protocol.
86
+ * Supports SSH (git@) and HTTPS protocols as configured in glab CLI.
87
+ */
88
+ export function getGlabRemoteUrl(repository: string): string {
89
+ // Try to detect protocol from glab config
90
+ try {
91
+ const protocol = execSync("glab config get git_protocol 2>/dev/null", {
92
+ encoding: "utf-8",
93
+ timeout: 10_000,
94
+ }).trim();
95
+ if (protocol === "ssh") {
96
+ // SSH format: git@gitlab.com:group/subgroup/project.git
97
+ // Detect self-hosted instance for the host part
98
+ let host = "gitlab.com";
99
+ try {
100
+ const uri = execSync("glab config get gitlab_uri 2>/dev/null", {
101
+ encoding: "utf-8",
102
+ timeout: 10_000,
103
+ }).trim();
104
+ if (uri) {
105
+ // Extract host from URI: "https://gitlab.example.com" -> "gitlab.example.com"
106
+ host = uri.replace(/^https?:\/\//, "").replace(/\/+$/, "");
107
+ }
108
+ } catch { /* use default */ }
109
+ return `git@${host}:${repository}.git`;
110
+ }
111
+ } catch { /* fall through to HTTPS */ }
112
+ // Default to HTTPS
113
+ const baseUrl = getGitBaseUrl("glab");
114
+ return `${baseUrl}/${repository}.git`;
115
+ }
116
+
84
117
  /**
85
118
  * Get forge base URL. For GitLab, detects self-hosted instances via glab config.
86
119
  */
@@ -11,6 +11,7 @@ import {
11
11
  runScript as adapterRunScript,
12
12
  verifyForgeAccess,
13
13
  glabEncodePath,
14
+ getGlabRemoteUrl,
14
15
  } from "./forge-adapter.ts";
15
16
  // ── Constants ──
16
17
 
@@ -199,7 +200,6 @@ export function ensureRemoteRepo(
199
200
  }
200
201
 
201
202
  // GitLab path — detect self-hosted base URL from glab config
202
- const glabBaseUrl = getGitBaseUrl("glab");
203
203
 
204
204
  // Split repository path into group + project name for glab CLI
205
205
  const parts = repository.split("/");
@@ -255,8 +255,8 @@ export function ensureRemoteRepo(
255
255
  }
256
256
 
257
257
  runScript(cwd, "git remote remove origin 2>/dev/null");
258
- const httpsUrl = `${glabBaseUrl}/${repository}.git`;
259
- runScript(cwd, `git remote add origin "${httpsUrl}"`);
258
+ const remoteUrl = getGlabRemoteUrl(repository);
259
+ runScript(cwd, `git remote add origin "${remoteUrl}"`);
260
260
  return repository;
261
261
  }
262
262
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-07-13T12:58:14Z",
2
+ "timestamp": "2026-07-13T13:10:35Z",
3
3
  "mode": "all",
4
4
  "stages_run": [],
5
5
  "summary": {
@@ -8,7 +8,7 @@
8
8
  "failed": 1,
9
9
  "skipped": 12
10
10
  },
11
- "duration_seconds": 1,
11
+ "duration_seconds": 0,
12
12
  "results": [
13
13
  {
14
14
  "name": "check_mr_traceability.sh",