@h-rig/provider-plugin 0.0.6-alpha.163 → 0.0.6-alpha.164

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.
@@ -889,9 +889,11 @@ async function runAgentCommand(args) {
889
889
  }));
890
890
  return 0;
891
891
  }
892
- case "git":
893
- await runGitCommand(projectRoot, taskId, rest);
892
+ case "git": {
893
+ const capabilityRoot = ctx?.hostProjectRoot || BAKED_PROJECT_ROOT || projectRoot;
894
+ await runGitCommand(projectRoot, taskId, rest, capabilityRoot);
894
895
  return 0;
896
+ }
895
897
  case "repo":
896
898
  case "repo-sync":
897
899
  runRepoSyncCommand(projectRoot, taskId, rest);
@@ -913,12 +915,12 @@ async function runAgentCommand(args) {
913
915
  return 1;
914
916
  }
915
917
  }
916
- async function runGitCommand(projectRoot, bakedTaskId, args) {
918
+ async function runGitCommand(projectRoot, bakedTaskId, args, capabilityRoot = projectRoot) {
917
919
  const [sub = "status", ...rest] = args;
918
920
  const task = takeOption(rest, "--task");
919
921
  const tid = task.value || bakedTaskId;
920
922
  const flags = task.rest;
921
- const git = await loadLifecycleGit(projectRoot);
923
+ const git = await loadLifecycleGit(capabilityRoot);
922
924
  switch (sub) {
923
925
  case "status":
924
926
  git.gitStatus(projectRoot, tid);
@@ -918,9 +918,11 @@ async function runAgentCommand(args) {
918
918
  }));
919
919
  return 0;
920
920
  }
921
- case "git":
922
- await runGitCommand(projectRoot, taskId, rest);
921
+ case "git": {
922
+ const capabilityRoot = ctx?.hostProjectRoot || BAKED_PROJECT_ROOT || projectRoot;
923
+ await runGitCommand(projectRoot, taskId, rest, capabilityRoot);
923
924
  return 0;
925
+ }
924
926
  case "repo":
925
927
  case "repo-sync":
926
928
  runRepoSyncCommand(projectRoot, taskId, rest);
@@ -942,12 +944,12 @@ async function runAgentCommand(args) {
942
944
  return 1;
943
945
  }
944
946
  }
945
- async function runGitCommand(projectRoot, bakedTaskId, args) {
947
+ async function runGitCommand(projectRoot, bakedTaskId, args, capabilityRoot = projectRoot) {
946
948
  const [sub = "status", ...rest] = args;
947
949
  const task = takeOption(rest, "--task");
948
950
  const tid = task.value || bakedTaskId;
949
951
  const flags = task.rest;
950
- const git = await loadLifecycleGit(projectRoot);
952
+ const git = await loadLifecycleGit(capabilityRoot);
951
953
  switch (sub) {
952
954
  case "status":
953
955
  git.gitStatus(projectRoot, tid);
package/dist/src/index.js CHANGED
@@ -890,9 +890,11 @@ async function runAgentCommand(args) {
890
890
  }));
891
891
  return 0;
892
892
  }
893
- case "git":
894
- await runGitCommand(projectRoot, taskId, rest);
893
+ case "git": {
894
+ const capabilityRoot = ctx?.hostProjectRoot || BAKED_PROJECT_ROOT || projectRoot;
895
+ await runGitCommand(projectRoot, taskId, rest, capabilityRoot);
895
896
  return 0;
897
+ }
896
898
  case "repo":
897
899
  case "repo-sync":
898
900
  runRepoSyncCommand(projectRoot, taskId, rest);
@@ -914,12 +916,12 @@ async function runAgentCommand(args) {
914
916
  return 1;
915
917
  }
916
918
  }
917
- async function runGitCommand(projectRoot, bakedTaskId, args) {
919
+ async function runGitCommand(projectRoot, bakedTaskId, args, capabilityRoot = projectRoot) {
918
920
  const [sub = "status", ...rest] = args;
919
921
  const task = takeOption(rest, "--task");
920
922
  const tid = task.value || bakedTaskId;
921
923
  const flags = task.rest;
922
- const git = await loadLifecycleGit(projectRoot);
924
+ const git = await loadLifecycleGit(capabilityRoot);
923
925
  switch (sub) {
924
926
  case "status":
925
927
  git.gitStatus(projectRoot, tid);
@@ -890,9 +890,11 @@ async function runAgentCommand(args) {
890
890
  }));
891
891
  return 0;
892
892
  }
893
- case "git":
894
- await runGitCommand(projectRoot, taskId, rest);
893
+ case "git": {
894
+ const capabilityRoot = ctx?.hostProjectRoot || BAKED_PROJECT_ROOT || projectRoot;
895
+ await runGitCommand(projectRoot, taskId, rest, capabilityRoot);
895
896
  return 0;
897
+ }
896
898
  case "repo":
897
899
  case "repo-sync":
898
900
  runRepoSyncCommand(projectRoot, taskId, rest);
@@ -914,12 +916,12 @@ async function runAgentCommand(args) {
914
916
  return 1;
915
917
  }
916
918
  }
917
- async function runGitCommand(projectRoot, bakedTaskId, args) {
919
+ async function runGitCommand(projectRoot, bakedTaskId, args, capabilityRoot = projectRoot) {
918
920
  const [sub = "status", ...rest] = args;
919
921
  const task = takeOption(rest, "--task");
920
922
  const tid = task.value || bakedTaskId;
921
923
  const flags = task.rest;
922
- const git = await loadLifecycleGit(projectRoot);
924
+ const git = await loadLifecycleGit(capabilityRoot);
923
925
  switch (sub) {
924
926
  case "status":
925
927
  git.gitStatus(projectRoot, tid);
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@h-rig/provider-plugin",
3
- "version": "0.0.6-alpha.163",
3
+ "version": "0.0.6-alpha.164",
4
4
  "type": "module",
5
5
  "description": "First-party agent-harness provider capability plugin for Rig.",
6
6
  "license": "UNLICENSED",
@@ -78,8 +78,8 @@
78
78
  "module": "./dist/src/index.js",
79
79
  "types": "./dist/src/index.d.ts",
80
80
  "dependencies": {
81
- "@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.163",
82
- "@rig/core": "npm:@h-rig/core@0.0.6-alpha.163",
83
- "@rig/skill-loader": "npm:@h-rig/skill-loader@0.0.6-alpha.163"
81
+ "@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.164",
82
+ "@rig/core": "npm:@h-rig/core@0.0.6-alpha.164",
83
+ "@rig/skill-loader": "npm:@h-rig/skill-loader@0.0.6-alpha.164"
84
84
  }
85
85
  }