@h-rig/cli 0.0.6-alpha.11 → 0.0.6-alpha.12

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/bin/rig.js CHANGED
@@ -4790,18 +4790,18 @@ async function runControlPlaneInit(context, options) {
4790
4790
  Object.assign(checkout, preparedCheckout);
4791
4791
  }
4792
4792
  }
4793
- const registered = await registerProjectViaServer(context, {
4794
- repoSlug: repo.slug,
4795
- checkout
4796
- });
4797
4793
  const checkoutPath = typeof checkout.path === "string" ? checkout.path : null;
4798
- const serverRootSwitch = serverKind === "remote" && checkoutPath ? await switchServerProjectRootViaServer(context, checkoutPath) : null;
4799
- if (serverRootSwitch && token) {
4800
- githubAuth = await postGitHubTokenViaServer(context, token, { selectedRepo: repo.slug, projectRoot: checkoutPath ?? undefined });
4794
+ if (serverKind === "remote" && checkoutPath && token) {
4795
+ githubAuth = await postGitHubTokenViaServer(context, token, { selectedRepo: repo.slug, projectRoot: checkoutPath });
4801
4796
  const apiSessionToken = apiSessionTokenFrom(githubAuth);
4802
4797
  setGitHubBearerTokenForCurrentProcess(apiSessionToken ?? token);
4803
4798
  writeRemoteGitHubAuthState(projectRoot, { source: authMethod === "gh" ? "gh" : "init-token", selectedRepo: repo.slug, apiSessionToken, authPayload: githubAuth });
4804
4799
  }
4800
+ const registered = await registerProjectViaServer(context, {
4801
+ repoSlug: repo.slug,
4802
+ checkout
4803
+ });
4804
+ const serverRootSwitch = serverKind === "remote" && checkoutPath ? await switchServerProjectRootViaServer(context, checkoutPath) : null;
4805
4805
  const activeProjectRegistration = serverRootSwitch ? await registerProjectViaServer(context, { repoSlug: repo.slug, checkout }) : null;
4806
4806
  const pi = serverKind === "remote" ? await ensureRemotePiRigInstalled({ requestJson: (pathname, init) => requestServerJson(context, pathname, init) }).catch((error) => ({
4807
4807
  remote: true,
@@ -7443,7 +7443,7 @@ function positiveInt(value, fallback) {
7443
7443
  }
7444
7444
  function resolveTaskRunAutomationLimits(config, env = process.env) {
7445
7445
  const configuredValidationAttempts = positiveInt(config?.automation?.maxValidationAttempts, 30);
7446
- const configuredPrFixIterations = positiveInt(config?.automation?.maxPrFixIterations, 30);
7446
+ const configuredPrFixIterations = positiveInt(config?.automation?.maxPrFixIterations, 100500);
7447
7447
  return {
7448
7448
  maxValidationAttempts: parsePositiveInt2(env.RIG_TASK_RUN_MAX_ATTEMPTS, "RIG_TASK_RUN_MAX_ATTEMPTS", configuredValidationAttempts),
7449
7449
  maxPrFixIterations: configuredPrFixIterations
@@ -7621,6 +7621,7 @@ async function runTaskRunPostValidationLifecycle(input) {
7621
7621
  config,
7622
7622
  sourceTask: input.sourceTask,
7623
7623
  uploadedSnapshot: input.uploadedSnapshot,
7624
+ artifactRoot: resolve22(input.projectRoot, "artifacts", taskId2),
7624
7625
  command: ghCommand,
7625
7626
  steerPi,
7626
7627
  lifecycle: {
@@ -1127,18 +1127,18 @@ async function runControlPlaneInit(context, options) {
1127
1127
  Object.assign(checkout, preparedCheckout);
1128
1128
  }
1129
1129
  }
1130
- const registered = await registerProjectViaServer(context, {
1131
- repoSlug: repo.slug,
1132
- checkout
1133
- });
1134
1130
  const checkoutPath = typeof checkout.path === "string" ? checkout.path : null;
1135
- const serverRootSwitch = serverKind === "remote" && checkoutPath ? await switchServerProjectRootViaServer(context, checkoutPath) : null;
1136
- if (serverRootSwitch && token) {
1137
- githubAuth = await postGitHubTokenViaServer(context, token, { selectedRepo: repo.slug, projectRoot: checkoutPath ?? undefined });
1131
+ if (serverKind === "remote" && checkoutPath && token) {
1132
+ githubAuth = await postGitHubTokenViaServer(context, token, { selectedRepo: repo.slug, projectRoot: checkoutPath });
1138
1133
  const apiSessionToken = apiSessionTokenFrom(githubAuth);
1139
1134
  setGitHubBearerTokenForCurrentProcess(apiSessionToken ?? token);
1140
1135
  writeRemoteGitHubAuthState(projectRoot, { source: authMethod === "gh" ? "gh" : "init-token", selectedRepo: repo.slug, apiSessionToken, authPayload: githubAuth });
1141
1136
  }
1137
+ const registered = await registerProjectViaServer(context, {
1138
+ repoSlug: repo.slug,
1139
+ checkout
1140
+ });
1141
+ const serverRootSwitch = serverKind === "remote" && checkoutPath ? await switchServerProjectRootViaServer(context, checkoutPath) : null;
1142
1142
  const activeProjectRegistration = serverRootSwitch ? await registerProjectViaServer(context, { repoSlug: repo.slug, checkout }) : null;
1143
1143
  const pi = serverKind === "remote" ? await ensureRemotePiRigInstalled({ requestJson: (pathname, init) => requestServerJson(context, pathname, init) }).catch((error) => ({
1144
1144
  remote: true,
@@ -507,7 +507,7 @@ function positiveInt(value, fallback) {
507
507
  }
508
508
  function resolveTaskRunAutomationLimits(config, env = process.env) {
509
509
  const configuredValidationAttempts = positiveInt(config?.automation?.maxValidationAttempts, 30);
510
- const configuredPrFixIterations = positiveInt(config?.automation?.maxPrFixIterations, 30);
510
+ const configuredPrFixIterations = positiveInt(config?.automation?.maxPrFixIterations, 100500);
511
511
  return {
512
512
  maxValidationAttempts: parsePositiveInt(env.RIG_TASK_RUN_MAX_ATTEMPTS, "RIG_TASK_RUN_MAX_ATTEMPTS", configuredValidationAttempts),
513
513
  maxPrFixIterations: configuredPrFixIterations
@@ -692,6 +692,7 @@ async function runTaskRunPostValidationLifecycle(input) {
692
692
  config,
693
693
  sourceTask: input.sourceTask,
694
694
  uploadedSnapshot: input.uploadedSnapshot,
695
+ artifactRoot: resolve4(input.projectRoot, "artifacts", taskId),
695
696
  command: ghCommand,
696
697
  steerPi,
697
698
  lifecycle: {
@@ -4583,18 +4583,18 @@ async function runControlPlaneInit(context, options) {
4583
4583
  Object.assign(checkout, preparedCheckout);
4584
4584
  }
4585
4585
  }
4586
- const registered = await registerProjectViaServer(context, {
4587
- repoSlug: repo.slug,
4588
- checkout
4589
- });
4590
4586
  const checkoutPath = typeof checkout.path === "string" ? checkout.path : null;
4591
- const serverRootSwitch = serverKind === "remote" && checkoutPath ? await switchServerProjectRootViaServer(context, checkoutPath) : null;
4592
- if (serverRootSwitch && token) {
4593
- githubAuth = await postGitHubTokenViaServer(context, token, { selectedRepo: repo.slug, projectRoot: checkoutPath ?? undefined });
4587
+ if (serverKind === "remote" && checkoutPath && token) {
4588
+ githubAuth = await postGitHubTokenViaServer(context, token, { selectedRepo: repo.slug, projectRoot: checkoutPath });
4594
4589
  const apiSessionToken = apiSessionTokenFrom(githubAuth);
4595
4590
  setGitHubBearerTokenForCurrentProcess(apiSessionToken ?? token);
4596
4591
  writeRemoteGitHubAuthState(projectRoot, { source: authMethod === "gh" ? "gh" : "init-token", selectedRepo: repo.slug, apiSessionToken, authPayload: githubAuth });
4597
4592
  }
4593
+ const registered = await registerProjectViaServer(context, {
4594
+ repoSlug: repo.slug,
4595
+ checkout
4596
+ });
4597
+ const serverRootSwitch = serverKind === "remote" && checkoutPath ? await switchServerProjectRootViaServer(context, checkoutPath) : null;
4598
4598
  const activeProjectRegistration = serverRootSwitch ? await registerProjectViaServer(context, { repoSlug: repo.slug, checkout }) : null;
4599
4599
  const pi = serverKind === "remote" ? await ensureRemotePiRigInstalled({ requestJson: (pathname, init) => requestServerJson(context, pathname, init) }).catch((error) => ({
4600
4600
  remote: true,
@@ -7236,7 +7236,7 @@ function positiveInt(value, fallback) {
7236
7236
  }
7237
7237
  function resolveTaskRunAutomationLimits(config, env = process.env) {
7238
7238
  const configuredValidationAttempts = positiveInt(config?.automation?.maxValidationAttempts, 30);
7239
- const configuredPrFixIterations = positiveInt(config?.automation?.maxPrFixIterations, 30);
7239
+ const configuredPrFixIterations = positiveInt(config?.automation?.maxPrFixIterations, 100500);
7240
7240
  return {
7241
7241
  maxValidationAttempts: parsePositiveInt2(env.RIG_TASK_RUN_MAX_ATTEMPTS, "RIG_TASK_RUN_MAX_ATTEMPTS", configuredValidationAttempts),
7242
7242
  maxPrFixIterations: configuredPrFixIterations
@@ -7414,6 +7414,7 @@ async function runTaskRunPostValidationLifecycle(input) {
7414
7414
  config,
7415
7415
  sourceTask: input.sourceTask,
7416
7416
  uploadedSnapshot: input.uploadedSnapshot,
7417
+ artifactRoot: resolve21(input.projectRoot, "artifacts", taskId2),
7417
7418
  command: ghCommand,
7418
7419
  steerPi,
7419
7420
  lifecycle: {
package/dist/src/index.js CHANGED
@@ -4786,18 +4786,18 @@ async function runControlPlaneInit(context, options) {
4786
4786
  Object.assign(checkout, preparedCheckout);
4787
4787
  }
4788
4788
  }
4789
- const registered = await registerProjectViaServer(context, {
4790
- repoSlug: repo.slug,
4791
- checkout
4792
- });
4793
4789
  const checkoutPath = typeof checkout.path === "string" ? checkout.path : null;
4794
- const serverRootSwitch = serverKind === "remote" && checkoutPath ? await switchServerProjectRootViaServer(context, checkoutPath) : null;
4795
- if (serverRootSwitch && token) {
4796
- githubAuth = await postGitHubTokenViaServer(context, token, { selectedRepo: repo.slug, projectRoot: checkoutPath ?? undefined });
4790
+ if (serverKind === "remote" && checkoutPath && token) {
4791
+ githubAuth = await postGitHubTokenViaServer(context, token, { selectedRepo: repo.slug, projectRoot: checkoutPath });
4797
4792
  const apiSessionToken = apiSessionTokenFrom(githubAuth);
4798
4793
  setGitHubBearerTokenForCurrentProcess(apiSessionToken ?? token);
4799
4794
  writeRemoteGitHubAuthState(projectRoot, { source: authMethod === "gh" ? "gh" : "init-token", selectedRepo: repo.slug, apiSessionToken, authPayload: githubAuth });
4800
4795
  }
4796
+ const registered = await registerProjectViaServer(context, {
4797
+ repoSlug: repo.slug,
4798
+ checkout
4799
+ });
4800
+ const serverRootSwitch = serverKind === "remote" && checkoutPath ? await switchServerProjectRootViaServer(context, checkoutPath) : null;
4801
4801
  const activeProjectRegistration = serverRootSwitch ? await registerProjectViaServer(context, { repoSlug: repo.slug, checkout }) : null;
4802
4802
  const pi = serverKind === "remote" ? await ensureRemotePiRigInstalled({ requestJson: (pathname, init) => requestServerJson(context, pathname, init) }).catch((error) => ({
4803
4803
  remote: true,
@@ -7439,7 +7439,7 @@ function positiveInt(value, fallback) {
7439
7439
  }
7440
7440
  function resolveTaskRunAutomationLimits(config, env = process.env) {
7441
7441
  const configuredValidationAttempts = positiveInt(config?.automation?.maxValidationAttempts, 30);
7442
- const configuredPrFixIterations = positiveInt(config?.automation?.maxPrFixIterations, 30);
7442
+ const configuredPrFixIterations = positiveInt(config?.automation?.maxPrFixIterations, 100500);
7443
7443
  return {
7444
7444
  maxValidationAttempts: parsePositiveInt2(env.RIG_TASK_RUN_MAX_ATTEMPTS, "RIG_TASK_RUN_MAX_ATTEMPTS", configuredValidationAttempts),
7445
7445
  maxPrFixIterations: configuredPrFixIterations
@@ -7617,6 +7617,7 @@ async function runTaskRunPostValidationLifecycle(input) {
7617
7617
  config,
7618
7618
  sourceTask: input.sourceTask,
7619
7619
  uploadedSnapshot: input.uploadedSnapshot,
7620
+ artifactRoot: resolve22(input.projectRoot, "artifacts", taskId2),
7620
7621
  command: ghCommand,
7621
7622
  steerPi,
7622
7623
  lifecycle: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@h-rig/cli",
3
- "version": "0.0.6-alpha.11",
3
+ "version": "0.0.6-alpha.12",
4
4
  "type": "module",
5
5
  "description": "Rig package",
6
6
  "license": "UNLICENSED",
@@ -23,10 +23,10 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@clack/prompts": "^1.2.0",
26
- "@rig/core": "npm:@h-rig/core@0.0.6-alpha.11",
27
- "@rig/runtime": "npm:@h-rig/runtime@0.0.6-alpha.11",
28
- "@rig/client": "npm:@h-rig/client@0.0.6-alpha.11",
29
- "@rig/server": "npm:@h-rig/server@0.0.6-alpha.11",
26
+ "@rig/core": "npm:@h-rig/core@0.0.6-alpha.12",
27
+ "@rig/runtime": "npm:@h-rig/runtime@0.0.6-alpha.12",
28
+ "@rig/client": "npm:@h-rig/client@0.0.6-alpha.12",
29
+ "@rig/server": "npm:@h-rig/server@0.0.6-alpha.12",
30
30
  "picocolors": "^1.1.1"
31
31
  }
32
32
  }