guardian-framework 0.1.75 → 0.1.76

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.75", 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.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;
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.75", 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.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;
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.75",
3
+ "version": "0.1.76",
4
4
  "description": "Token-optimized agentic framework scaffolder with pi-first architecture",
5
5
  "type": "module",
6
6
  "main": "dist/exports.js",
@@ -43,16 +43,17 @@ function execSyncWithRetry(
43
43
  cwd: string,
44
44
  opts: { timeout?: number; maxRetries?: number; delayMs?: number } = {},
45
45
  ): { exitCode: number; stdout: string } {
46
- const maxRetries = opts.maxRetries ?? 2;
47
- const delayMs = opts.delayMs ?? 2000;
46
+ const maxRetries = opts.maxRetries ?? 4;
47
+ const delayMs = opts.delayMs ?? 5000;
48
48
  let lastError = "";
49
49
 
50
50
  for (let attempt = 0; attempt <= maxRetries; attempt++) {
51
51
  if (attempt > 0) {
52
- const wait = delayMs * Math.pow(2, attempt - 1);
53
- const waitSec = Math.ceil(wait / 1000);
52
+ const wait = delayMs * Math.pow(1.5, attempt - 1);
53
+ const waitMs = Math.min(wait, 30_000);
54
+ const waitSec = Math.ceil(waitMs / 1000);
54
55
  try {
55
- execFileSync("sleep", [String(waitSec)], { cwd, timeout: 30_000, encoding: "utf-8" });
56
+ execFileSync("sleep", [String(waitSec)], { cwd, timeout: 60_000, encoding: "utf-8" });
56
57
  } catch { /* ignore */ }
57
58
  }
58
59
  try {
@@ -215,6 +216,7 @@ export function ensureRemoteRepo(
215
216
  `glab repo create "${repository}" --private --description "Epic: ${epicName}" 2>&1`,
216
217
  );
217
218
 
219
+ let projectId = "";
218
220
  if (createResult.exitCode !== 0) {
219
221
  // Repo may already exist — verify via API before giving up
220
222
  const encodedPath = glabEncodePath(repository);
@@ -226,8 +228,32 @@ export function ensureRemoteRepo(
226
228
  console.warn(`Failed to create or find GitLab project: ${createResult.stdout}`);
227
229
  return "";
228
230
  }
229
- console.warn(`GitLab project already exists, connecting to it.`);
231
+ projectId = viewResult.stdout.trim();
232
+ console.warn(`GitLab project already exists (id=${projectId}), connecting to it.`);
233
+ } else {
234
+ // Project was just created — wait for GitLab to provision it
235
+ // (new projects can take 10-30s before accepting issues)
236
+ const encodedPath = glabEncodePath(repository);
237
+ console.warn(`Waiting for GitLab project to be ready...`);
238
+ for (let attempt = 0; attempt < 12; attempt++) {
239
+ const checkResult = runScript(
240
+ cwd,
241
+ `glab api "projects/${encodedPath}" --method GET 2>/dev/null | jq -r '.id // empty'`,
242
+ );
243
+ if (checkResult.exitCode === 0 && checkResult.stdout.trim()) {
244
+ projectId = checkResult.stdout.trim();
245
+ console.warn(`GitLab project ready (id=${projectId})`);
246
+ break;
247
+ }
248
+ if (attempt < 11) {
249
+ try { execFileSync("sleep", ["5"], { cwd, timeout: 30_000 }); } catch { /* ignore */ }
250
+ }
251
+ }
252
+ if (!projectId) {
253
+ console.warn(`GitLab project not ready after 60s, continuing anyway.`);
254
+ }
230
255
  }
256
+
231
257
  runScript(cwd, "git remote remove origin 2>/dev/null");
232
258
  const httpsUrl = `${glabBaseUrl}/${repository}.git`;
233
259
  runScript(cwd, `git remote add origin "${httpsUrl}"`);
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-07-13T12:43:57Z",
2
+ "timestamp": "2026-07-13T12:58:14Z",
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": 0,
11
+ "duration_seconds": 1,
12
12
  "results": [
13
13
  {
14
14
  "name": "check_mr_traceability.sh",