@memnexus-ai/mx-agent-cli 0.1.297 → 0.1.299

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.
Files changed (75) hide show
  1. package/dist/agent-config/hooks/gh-pr-edit-guard.sh +21 -9
  2. package/dist/agent-config/settings.json +7 -1
  3. package/dist/commands/bootstrap.d.ts.map +1 -1
  4. package/dist/commands/bootstrap.js +5 -0
  5. package/dist/commands/bootstrap.js.map +1 -1
  6. package/dist/commands/check.d.ts +20 -0
  7. package/dist/commands/check.d.ts.map +1 -0
  8. package/dist/commands/check.js +30 -0
  9. package/dist/commands/check.js.map +1 -0
  10. package/dist/commands/create.d.ts.map +1 -1
  11. package/dist/commands/create.js +5 -0
  12. package/dist/commands/create.js.map +1 -1
  13. package/dist/commands/gh.d.ts +38 -0
  14. package/dist/commands/gh.d.ts.map +1 -0
  15. package/dist/commands/gh.js +162 -0
  16. package/dist/commands/gh.js.map +1 -0
  17. package/dist/commands/git-credential.d.ts +22 -0
  18. package/dist/commands/git-credential.d.ts.map +1 -0
  19. package/dist/commands/git-credential.js +53 -0
  20. package/dist/commands/git-credential.js.map +1 -0
  21. package/dist/commands/init.d.ts.map +1 -1
  22. package/dist/commands/init.js +7 -0
  23. package/dist/commands/init.js.map +1 -1
  24. package/dist/commands/new.d.ts +24 -0
  25. package/dist/commands/new.d.ts.map +1 -1
  26. package/dist/commands/new.js +68 -6
  27. package/dist/commands/new.js.map +1 -1
  28. package/dist/commands/pr-set-body.d.ts +120 -35
  29. package/dist/commands/pr-set-body.d.ts.map +1 -1
  30. package/dist/commands/pr-set-body.js +343 -108
  31. package/dist/commands/pr-set-body.js.map +1 -1
  32. package/dist/commands/pr-sync.d.ts +2 -1
  33. package/dist/commands/pr-sync.d.ts.map +1 -1
  34. package/dist/commands/pr-sync.js +129 -32
  35. package/dist/commands/pr-sync.js.map +1 -1
  36. package/dist/index.d.ts +3 -0
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +82 -2
  39. package/dist/index.js.map +1 -1
  40. package/dist/lib/check-run.d.ts +131 -0
  41. package/dist/lib/check-run.d.ts.map +1 -0
  42. package/dist/lib/check-run.js +291 -0
  43. package/dist/lib/check-run.js.map +1 -0
  44. package/dist/lib/coordination-token.d.ts +39 -1
  45. package/dist/lib/coordination-token.d.ts.map +1 -1
  46. package/dist/lib/coordination-token.js +149 -9
  47. package/dist/lib/coordination-token.js.map +1 -1
  48. package/dist/lib/creation-login.d.ts +42 -0
  49. package/dist/lib/creation-login.d.ts.map +1 -0
  50. package/dist/lib/creation-login.js +62 -0
  51. package/dist/lib/creation-login.js.map +1 -0
  52. package/dist/lib/gh-remote.d.ts +46 -5
  53. package/dist/lib/gh-remote.d.ts.map +1 -1
  54. package/dist/lib/gh-remote.js +80 -16
  55. package/dist/lib/gh-remote.js.map +1 -1
  56. package/dist/lib/gh-token-run.d.ts +551 -0
  57. package/dist/lib/gh-token-run.d.ts.map +1 -0
  58. package/dist/lib/gh-token-run.js +1246 -0
  59. package/dist/lib/gh-token-run.js.map +1 -0
  60. package/dist/lib/git-credential.d.ts +120 -0
  61. package/dist/lib/git-credential.d.ts.map +1 -0
  62. package/dist/lib/git-credential.js +204 -0
  63. package/dist/lib/git-credential.js.map +1 -0
  64. package/dist/lib/github-app-token.d.ts +288 -0
  65. package/dist/lib/github-app-token.d.ts.map +1 -0
  66. package/dist/lib/github-app-token.js +519 -0
  67. package/dist/lib/github-app-token.js.map +1 -0
  68. package/dist/lib/memory.d.ts.map +1 -1
  69. package/dist/lib/memory.js +35 -2
  70. package/dist/lib/memory.js.map +1 -1
  71. package/dist/lib/repo-guard-state-dirs.d.ts +39 -0
  72. package/dist/lib/repo-guard-state-dirs.d.ts.map +1 -0
  73. package/dist/lib/repo-guard-state-dirs.js +170 -0
  74. package/dist/lib/repo-guard-state-dirs.js.map +1 -0
  75. package/package.json +1 -1
@@ -1,10 +1,12 @@
1
1
  /**
2
2
  * GitHub remote auto-setup helper for `mx-agent new`.
3
3
  *
4
- * Opt-in via --with-remote. Fails open: any failure (gh missing, not
5
- * authenticated, repo already exists, network error) downgrades to a
6
- * warning and returns { created: false, reason } so the caller can
7
- * still print the manual remote-setup hint.
4
+ * Opt-in via --with-remote. `requireCreationLogin` (lib/creation-login.ts, #818)
5
+ * refuses before the first write when gh is missing or logged out. This helper
6
+ * runs at the end of the command and still fails open: any failure here (a login
7
+ * lost since that check, repo already exists, network error) downgrades to a
8
+ * warning and returns { created: false, reason } so the caller can still print
9
+ * the manual remote-setup hint.
8
10
  *
9
11
  * Security: all arguments are passed as argv to spawnSync (never through
10
12
  * a shell). projectName is validated upstream by validateProjectName().
@@ -49,24 +51,86 @@ export function resolveOwnerRepo(cwd, remote = 'origin', spawn = spawnSync) {
49
51
  const m = /^([A-Za-z0-9._-]+)\/([A-Za-z0-9._-]+)$/.exec(path);
50
52
  return m ? `${m[1]}/${m[2]}` : null;
51
53
  }
54
+ /**
55
+ * The two reasons `validateOwnerRepoShape` can return. Exported so a caller
56
+ * that words its own message, as `pr-set-body.ts` does, can tell them apart
57
+ * without re-implementing the check.
58
+ */
59
+ export const OWNER_REPO_SHAPE_REASONS = {
60
+ shape: 'not two segments of letters, digits, dot, dash or underscore',
61
+ dotSegment: "contains a path segment ('.' or '..')",
62
+ };
63
+ /**
64
+ * `owner/repo` shape check shared by `pr set-body` and `pr-sync` (#785).
65
+ *
66
+ * Returns null when the value is valid, or one of `OWNER_REPO_SHAPE_REASONS`.
67
+ * Exactly two segments, each of GitHub's ASCII name alphabet, and neither of
68
+ * them a whole `.` or `..` segment. `.github` and `a.b` pass; `..` does not.
69
+ *
70
+ * This is a shape check only. It does not confirm that the repository exists,
71
+ * and it does not check the host.
72
+ */
73
+ export function validateOwnerRepoShape(value) {
74
+ if (!/^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+$/.test(value))
75
+ return OWNER_REPO_SHAPE_REASONS.shape;
76
+ if (value.split('/').some((s) => s === '.' || s === '..'))
77
+ return OWNER_REPO_SHAPE_REASONS.dotSegment;
78
+ return null;
79
+ }
80
+ /**
81
+ * The limit on each `gh` probe. The probes now run before the first write, so a
82
+ * hanging `gh` would otherwise hold the command at its start with no output.
83
+ */
84
+ export const GH_PROBE_TIMEOUT_MS = 30_000;
85
+ function spawnErrorCode(result) {
86
+ return result.error?.code;
87
+ }
88
+ /**
89
+ * Whether `gh` runs and `gh auth status` exits 0. Returns the problem, or null
90
+ * when there is none. One function so the pre-write check and
91
+ * `maybeCreateRemote` cannot disagree about what "logged in" means (#818).
92
+ *
93
+ * 'gh-missing' means the spawn itself reported ENOENT and nothing else does: a
94
+ * `gh` that ran and exited non-zero was found. 'gh-unauthenticated' means only
95
+ * that `gh auth status` did not exit 0. That command ran live, so it does not
96
+ * establish that the login is the cause.
97
+ */
98
+ export function probeGhLogin(spawn = spawnSync, timeoutMs = GH_PROBE_TIMEOUT_MS) {
99
+ // SIGKILL, because a `gh` that ignores the default SIGTERM would hold
100
+ // spawnSync past the limit.
101
+ const options = {
102
+ encoding: 'utf-8', stdio: 'pipe', timeout: timeoutMs, killSignal: 'SIGKILL',
103
+ };
104
+ // 1. gh present? Probe directly (shell-free) so a missing binary surfaces as
105
+ // ENOENT. Avoids `command -v gh` under `shell: true`, which triggers Node
106
+ // DEP0190 (passing args with shell option true).
107
+ const which = spawn('gh', ['--version'], options);
108
+ if (spawnErrorCode(which) === 'ENOENT')
109
+ return 'gh-missing';
110
+ if (spawnErrorCode(which) === 'ETIMEDOUT')
111
+ return 'gh-timed-out';
112
+ if (which.status !== 0)
113
+ return 'gh-version-failed';
114
+ // 2. gh authenticated?
115
+ const auth = spawn('gh', ['auth', 'status'], options);
116
+ if (spawnErrorCode(auth) === 'ETIMEDOUT')
117
+ return 'gh-timed-out';
118
+ if (auth.status !== 0)
119
+ return 'gh-unauthenticated';
120
+ return null;
121
+ }
52
122
  export async function maybeCreateRemote(outputDir, projectName, options, spawn = spawnSync) {
53
123
  if (!options.withRemote) {
54
124
  return { created: false, reason: 'not-requested' };
55
125
  }
56
126
  const visibility = options.remoteVisibility === 'public' ? 'public' : 'private';
57
- // 1. gh present? Probe directly (shell-free) so a missing binary surfaces as a
58
- // non-zero/ null status via ENOENT. Avoids `command -v gh` under `shell: true`,
59
- // which triggers Node DEP0190 (passing args with shell option true).
60
- const which = spawn('gh', ['--version'], { encoding: 'utf-8', stdio: 'pipe' });
61
- if (which.status !== 0) {
62
- return { created: false, reason: 'gh-missing' };
63
- }
64
- // 2. gh authenticated?
65
- const auth = spawn('gh', ['auth', 'status'], { encoding: 'utf-8', stdio: 'pipe' });
66
- if (auth.status !== 0) {
67
- return { created: false, reason: 'gh-unauthenticated' };
127
+ // 1. gh present and logged in? Asked again here, one cheap command, because a
128
+ // login can be lost between the pre-write check and this push.
129
+ const problem = probeGhLogin(spawn);
130
+ if (problem !== null) {
131
+ return { created: false, reason: problem };
68
132
  }
69
- // 3. Create repo and push. stdio inherit so users see progress.
133
+ // 2. Create repo and push. stdio inherit so users see progress.
70
134
  const create = spawn('gh', ['repo', 'create', projectName, `--${visibility}`, `--source=${outputDir}`, '--remote=origin', '--push'], { encoding: 'utf-8', stdio: 'inherit' });
71
135
  if (create.status !== 0) {
72
136
  const stderr = typeof create.stderr === 'string'
@@ -1 +1 @@
1
- {"version":3,"file":"gh-remote.js","sourceRoot":"","sources":["../../src/lib/gh-remote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,SAAS,EAAyB,MAAM,eAAe,CAAC;AAIjE;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,gBAAgB,CAC9B,GAAW,EACX,MAAM,GAAG,QAAQ,EACjB,QAAqB,SAAS;IAE9B,IAAI,CAAsD,CAAC;IAC3D,IAAI,CAAC;QACH,CAAC,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE;YACzD,QAAQ,EAAE,OAAO;YACjB,KAA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