@ouro.bot/cli 0.1.0-alpha.1111 → 0.1.0-alpha.1112

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/changelog.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
+ {
5
+ "version": "0.1.0-alpha.1112",
6
+ "changes": [
7
+ "Bundle sync can fetch and push again on a Mac whose git (the Copilot app's bundled git) cannot find its https helper: the daemon points git at the helper beside it instead of failing every sync with \"'remote-https' is not a git command\"."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.1111",
6
12
  "changes": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.1111",
2
+ "runtimeVersion": "0.1.0-alpha.1112",
3
3
  "bundleSchemaVersion": 3,
4
4
  "lastUpdated": "2026-09-03T00:00:00.000Z"
5
5
  }
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0"?>
2
2
  <Container version="2">
3
3
  <Name>ouro-butler</Name>
4
- <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1111</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1112</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -41,10 +41,12 @@ exports.portableGitRoot = portableGitRoot;
41
41
  exports.portableGitBinary = portableGitBinary;
42
42
  exports.findGitOnPath = findGitOnPath;
43
43
  exports.portableGitEnv = portableGitEnv;
44
+ exports.pinGitHelperPath = pinGitHelperPath;
44
45
  exports.activatePortableGit = activatePortableGit;
45
46
  const fs = __importStar(require("fs"));
46
47
  const os = __importStar(require("os"));
47
48
  const path = __importStar(require("path"));
49
+ const child_process_1 = require("child_process");
48
50
  const runtime_1 = require("../../nerves/runtime");
49
51
  /**
50
52
  * A portable git for hosts that have none (a BusyBox appliance has no package
@@ -111,6 +113,33 @@ function portableGitEnv(root, exists = fs.existsSync) {
111
113
  env.GIT_SSL_CAINFO = caBundle;
112
114
  return env;
113
115
  }
116
+ const HTTPS_HELPER = "git-remote-https";
117
+ function defaultGitExecPath(gitBinary, env) {
118
+ const childEnv = { ...env };
119
+ delete childEnv.GIT_EXEC_PATH;
120
+ const run = (0, child_process_1.spawnSync)(gitBinary, ["--exec-path"], { env: childEnv, encoding: "utf8" });
121
+ return run.status === 0 ? run.stdout.trim() : null;
122
+ }
123
+ /**
124
+ * Point GIT_EXEC_PATH at the libexec beside `gitBinary` when git cannot find
125
+ * its https helper where it looks. The Copilot app's bundled git on a Mac is
126
+ * relocated: its own exec path is `//libexec/git-core`, so a process started
127
+ * without the app's GIT_EXEC_PATH (the Ouro daemon) fails every fetch and push
128
+ * with "'remote-https' is not a git command". Returns true when it set the path.
129
+ */
130
+ function pinGitHelperPath(gitBinary, env, deps = {}) {
131
+ if (env.GIT_EXEC_PATH !== undefined)
132
+ return false;
133
+ const exists = deps.exists ?? fs.existsSync;
134
+ const libexec = path.join(path.dirname(path.dirname(gitBinary)), "libexec", "git-core");
135
+ if (!exists(path.join(libexec, HTTPS_HELPER)))
136
+ return false;
137
+ const ownExecPath = (deps.execPath ?? defaultGitExecPath)(gitBinary, env);
138
+ if (ownExecPath && exists(path.join(ownExecPath, HTTPS_HELPER)))
139
+ return false;
140
+ env.GIT_EXEC_PATH = libexec;
141
+ return true;
142
+ }
114
143
  /**
115
144
  * Put the portable git's bin directory first on PATH when it is installed and
116
145
  * the host has no git, so every `git` this process or its children run (bundle
@@ -121,14 +150,20 @@ function activatePortableGit(options = {}) {
121
150
  const env = options.env ?? process.env;
122
151
  const isExecutable = options.isExecutable ?? isExecutableFile;
123
152
  const binary = portableGitBinary(options.homeDir);
124
- if (!isExecutable(binary))
153
+ if (!isExecutable(binary)) {
154
+ const hostGit = findGitOnPath(env.PATH, isExecutable);
155
+ if (hostGit)
156
+ pinGitHelperPath(hostGit, env);
125
157
  return { status: "absent" };
158
+ }
126
159
  const binDir = path.dirname(binary);
127
160
  const systemGit = findGitOnPath(env.PATH, isExecutable);
128
161
  if (systemGit === binary)
129
162
  return { status: "activated", binDir };
130
- if (systemGit)
163
+ if (systemGit) {
164
+ pinGitHelperPath(systemGit, env);
131
165
  return { status: "system", git: systemGit };
166
+ }
132
167
  env.PATH = env.PATH ? `${binDir}${path.delimiter}${env.PATH}` : binDir;
133
168
  for (const [key, value] of Object.entries(portableGitEnv(path.dirname(binDir)))) {
134
169
  if (env[key] === undefined)
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1111",
3
+ "version": "0.1.0-alpha.1112",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@ouro.bot/cli",
9
- "version": "0.1.0-alpha.1111",
9
+ "version": "0.1.0-alpha.1112",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sdk": "^0.78.0",
12
12
  "@ouro.bot/friends": "0.1.0-alpha.18",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1111",
3
+ "version": "0.1.0-alpha.1112",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },