@scheduler-systems/gal-run 0.0.578 → 0.0.588
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/index.cjs +138 -56
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3955,7 +3955,7 @@ var cliVersion, defaultApiUrl, BUILD_CONSTANTS, constants_default;
|
|
|
3955
3955
|
var init_constants = __esm({
|
|
3956
3956
|
"module_6"() {
|
|
3957
3957
|
"use strict";
|
|
3958
|
-
cliVersion = true ? "0.0.
|
|
3958
|
+
cliVersion = true ? "0.0.588" : "0.0.0-dev";
|
|
3959
3959
|
defaultApiUrl = true ? "https://api.gal.run" : "http://localhost:3000";
|
|
3960
3960
|
BUILD_CONSTANTS = Object.freeze([cliVersion, defaultApiUrl]);
|
|
3961
3961
|
constants_default = BUILD_CONSTANTS;
|
|
@@ -11868,7 +11868,7 @@ function detectEnvironment() {
|
|
|
11868
11868
|
return "dev";
|
|
11869
11869
|
}
|
|
11870
11870
|
try {
|
|
11871
|
-
const version2 = true ? "0.0.
|
|
11871
|
+
const version2 = true ? "0.0.588" : void 0;
|
|
11872
11872
|
if (version2 && version2.includes("-local")) {
|
|
11873
11873
|
return "dev";
|
|
11874
11874
|
}
|
|
@@ -14549,7 +14549,7 @@ function getId() {
|
|
|
14549
14549
|
}
|
|
14550
14550
|
function getCliVersion() {
|
|
14551
14551
|
try {
|
|
14552
|
-
return true ? "0.0.
|
|
14552
|
+
return true ? "0.0.588" : "0.0.0-dev";
|
|
14553
14553
|
} catch {
|
|
14554
14554
|
return "0.0.0-dev";
|
|
14555
14555
|
}
|
|
@@ -17951,10 +17951,10 @@ function getFeatureFlags() {
|
|
|
17951
17951
|
let isInternalFromApi = false;
|
|
17952
17952
|
let isPartnerFromApi = false;
|
|
17953
17953
|
try {
|
|
17954
|
-
const { readFileSync: readFileSync47, existsSync:
|
|
17954
|
+
const { readFileSync: readFileSync47, existsSync: existsSync55 } = require("fs");
|
|
17955
17955
|
const { join: join62 } = require("path");
|
|
17956
17956
|
const configPath = join62(resolveGalHomeDir(process.env), "config.json");
|
|
17957
|
-
if (
|
|
17957
|
+
if (existsSync55(configPath)) {
|
|
17958
17958
|
const config2 = JSON.parse(readFileSync47(configPath, "utf-8"));
|
|
17959
17959
|
const cacheAge = Date.now() - (config2.flagsCachedAt || config2.internalOrgsCheckedAt || 0);
|
|
17960
17960
|
if (cacheAge < CACHE_MAX_AGE_MS) {
|
|
@@ -50583,7 +50583,7 @@ function createApprovedConfigCommand() {
|
|
|
50583
50583
|
const spinner = options.json ? null : ora(`Fetching approved config for "${org}"...`).start();
|
|
50584
50584
|
try {
|
|
50585
50585
|
let findMdFiles2 = function(dir) {
|
|
50586
|
-
if (!
|
|
50586
|
+
if (!existsSync55(dir)) return [];
|
|
50587
50587
|
const entries = readdirSync19(dir, { withFileTypes: true });
|
|
50588
50588
|
const files = [];
|
|
50589
50589
|
for (const entry of entries) {
|
|
@@ -50605,7 +50605,7 @@ function createApprovedConfigCommand() {
|
|
|
50605
50605
|
}
|
|
50606
50606
|
return;
|
|
50607
50607
|
}
|
|
50608
|
-
const { existsSync:
|
|
50608
|
+
const { existsSync: existsSync55, readdirSync: readdirSync19, readFileSync: readFileSync47 } = await import("fs");
|
|
50609
50609
|
const { join: join62, relative: relative10, basename: basename10 } = await import("path");
|
|
50610
50610
|
const baseDir = options.dir || process.cwd();
|
|
50611
50611
|
const commandsDir = join62(baseDir, ".claude", "commands");
|
|
@@ -55639,8 +55639,8 @@ async function pushLearnings(directory, orgName, apiUrl, headers, options) {
|
|
|
55639
55639
|
let repoSlug;
|
|
55640
55640
|
let sessionId = process.env.CLAUDE_SESSION_ID || `cli-${Date.now()}`;
|
|
55641
55641
|
try {
|
|
55642
|
-
const { execSync:
|
|
55643
|
-
const remoteUrl =
|
|
55642
|
+
const { execSync: execSync17 } = await import("child_process");
|
|
55643
|
+
const remoteUrl = execSync17("git remote get-url origin", { cwd: directory, encoding: "utf-8" }).trim();
|
|
55644
55644
|
const match = remoteUrl.match(/github\.com[:/]([^/]+\/[^/]+?)(\.git)?$/);
|
|
55645
55645
|
if (match) {
|
|
55646
55646
|
repoSlug = match[1];
|
|
@@ -60051,6 +60051,62 @@ var init_code_process = __esm({
|
|
|
60051
60051
|
}
|
|
60052
60052
|
});
|
|
60053
60053
|
|
|
60054
|
+
function resolveWorkspaceOpencodeConfigDir(workspaceRoot) {
|
|
60055
|
+
if (!workspaceRoot) {
|
|
60056
|
+
return null;
|
|
60057
|
+
}
|
|
60058
|
+
const configDir = import_node_path2.default.join(workspaceRoot, ...OPENCODE_CONFIG_PATH);
|
|
60059
|
+
return (0, import_node_fs2.existsSync)(configDir) ? configDir : null;
|
|
60060
|
+
}
|
|
60061
|
+
function buildCodeChildEnv(baseEnv, options = {}) {
|
|
60062
|
+
const childEnv = { ...baseEnv };
|
|
60063
|
+
const config2 = options.config ?? ConfigManager.load();
|
|
60064
|
+
const workspaceRoot = options.workspaceRoot ?? detectGalWorkspaceRoot();
|
|
60065
|
+
if (!childEnv.GAL_CODE_MODE && ConfigManager.getEnvironment() === "dev") {
|
|
60066
|
+
childEnv.GAL_CODE_MODE = "dev";
|
|
60067
|
+
}
|
|
60068
|
+
if (!childEnv.GAL_AUTH_TOKEN && config2.authToken) {
|
|
60069
|
+
childEnv.GAL_AUTH_TOKEN = config2.authToken;
|
|
60070
|
+
}
|
|
60071
|
+
if (!childEnv.GAL_CODE_GAL_SESSION_TOKEN && childEnv.GAL_AUTH_TOKEN) {
|
|
60072
|
+
childEnv.GAL_CODE_GAL_SESSION_TOKEN = childEnv.GAL_AUTH_TOKEN;
|
|
60073
|
+
}
|
|
60074
|
+
if (!childEnv.GAL_CODE_WORKSPACE_ROOT && workspaceRoot) {
|
|
60075
|
+
childEnv.GAL_CODE_WORKSPACE_ROOT = workspaceRoot;
|
|
60076
|
+
}
|
|
60077
|
+
const opencodeConfigDir = resolveWorkspaceOpencodeConfigDir(workspaceRoot);
|
|
60078
|
+
if (!childEnv.OPENCODE_CONFIG_DIR && opencodeConfigDir) {
|
|
60079
|
+
childEnv.OPENCODE_CONFIG_DIR = opencodeConfigDir;
|
|
60080
|
+
}
|
|
60081
|
+
return childEnv;
|
|
60082
|
+
}
|
|
60083
|
+
function resolveCodeVariantBinaryCandidates(variant, galCodeMode) {
|
|
60084
|
+
const localWrapper = import_node_path2.default.join(import_node_os3.default.homedir(), ".local", "bin", `gal-code-${variant}`);
|
|
60085
|
+
const galWrapper = `gal-code-${variant}`;
|
|
60086
|
+
const officialBinary = OFFICIAL_VARIANT_BINARIES[variant];
|
|
60087
|
+
const localFirst = galCodeMode === "dev";
|
|
60088
|
+
const candidates = localFirst ? [localWrapper, galWrapper, officialBinary] : [officialBinary, localWrapper, galWrapper];
|
|
60089
|
+
return candidates.filter((binary, index) => candidates.indexOf(binary) === index);
|
|
60090
|
+
}
|
|
60091
|
+
function getVertexAccessToken() {
|
|
60092
|
+
try {
|
|
60093
|
+
return (0, import_node_child_process.execSync)("gcloud auth print-access-token", {
|
|
60094
|
+
encoding: "utf-8",
|
|
60095
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
60096
|
+
}).trim();
|
|
60097
|
+
} catch {
|
|
60098
|
+
return null;
|
|
60099
|
+
}
|
|
60100
|
+
}
|
|
60101
|
+
function buildOpencodeEnv() {
|
|
60102
|
+
const token = getVertexAccessToken();
|
|
60103
|
+
const configContent = JSON.stringify(GLM_PROVIDER_CONFIG);
|
|
60104
|
+
return {
|
|
60105
|
+
...process.env,
|
|
60106
|
+
...token ? { VERTEX_ACCESS_TOKEN: token } : {},
|
|
60107
|
+
OPENCODE_CONFIG_CONTENT: configContent
|
|
60108
|
+
};
|
|
60109
|
+
}
|
|
60054
60110
|
function isMissingBinaryError(error3) {
|
|
60055
60111
|
return Boolean(
|
|
60056
60112
|
error3 && typeof error3 === "object" && "code" in error3 && error3.code === "ENOENT"
|
|
@@ -60058,9 +60114,14 @@ function isMissingBinaryError(error3) {
|
|
|
60058
60114
|
}
|
|
60059
60115
|
async function runCodeVariant(variant, args2) {
|
|
60060
60116
|
let lastError;
|
|
60061
|
-
|
|
60117
|
+
const childEnv = buildCodeChildEnv(process.env);
|
|
60118
|
+
if (variant === "opencode") {
|
|
60119
|
+
Object.assign(childEnv, buildOpencodeEnv());
|
|
60120
|
+
}
|
|
60121
|
+
const candidates = resolveCodeVariantBinaryCandidates(variant, childEnv.GAL_CODE_MODE);
|
|
60122
|
+
for (const binary of candidates) {
|
|
60062
60123
|
try {
|
|
60063
|
-
return await runGalCode(binary, args2,
|
|
60124
|
+
return await runGalCode(binary, args2, childEnv);
|
|
60064
60125
|
} catch (error3) {
|
|
60065
60126
|
if (!isMissingBinaryError(error3)) {
|
|
60066
60127
|
throw error3;
|
|
@@ -60072,14 +60133,14 @@ async function runCodeVariant(variant, args2) {
|
|
|
60072
60133
|
}
|
|
60073
60134
|
function addVariantCommand(command, variant, runVariant) {
|
|
60074
60135
|
command.command(`${variant} [args...]`).description(
|
|
60075
|
-
variant === "codex" ? "Run GAL Code Codex
|
|
60136
|
+
variant === "codex" ? "Run the GAL Code Codex binary" : "Run the GAL Code OpenCode binary"
|
|
60076
60137
|
).enablePositionalOptions().allowUnknownOption(true).passThroughOptions().action(async (args2 = []) => {
|
|
60077
60138
|
const code = await runVariant(variant, args2);
|
|
60078
60139
|
process.exit(code);
|
|
60079
60140
|
});
|
|
60080
60141
|
}
|
|
60081
60142
|
function createCodeCommand(runVariant = runCodeVariant) {
|
|
60082
|
-
const command = new Command("code").description(
|
|
60143
|
+
const command = new Command("code").description(GAL_CODE_DESCRIPTION).enablePositionalOptions().allowUnknownOption(true).allowExcessArguments(true).action(async (...actionArgs) => {
|
|
60083
60144
|
const maybeCommand = actionArgs[actionArgs.length - 1];
|
|
60084
60145
|
const leadingArgs = actionArgs.slice(0, maybeCommand instanceof Command ? -1 : actionArgs.length).flatMap((value) => {
|
|
60085
60146
|
if (typeof value === "string") {
|
|
@@ -60091,36 +60152,57 @@ function createCodeCommand(runVariant = runCodeVariant) {
|
|
|
60091
60152
|
return [];
|
|
60092
60153
|
});
|
|
60093
60154
|
const args2 = leadingArgs.length > 0 ? leadingArgs : maybeCommand instanceof Command ? maybeCommand.args : [];
|
|
60155
|
+
if (args2.length === 0) {
|
|
60156
|
+
command.outputHelp();
|
|
60157
|
+
process.exit(0);
|
|
60158
|
+
return;
|
|
60159
|
+
}
|
|
60094
60160
|
if (args2[0] === "codex" || args2[0] === "opencode") {
|
|
60095
60161
|
const code = await runVariant(args2[0], args2.slice(1));
|
|
60096
60162
|
process.exit(code);
|
|
60097
60163
|
return;
|
|
60098
60164
|
}
|
|
60099
|
-
console.error(
|
|
60165
|
+
console.error(
|
|
60166
|
+
`Unknown GAL Code variant "${args2[0]}". Use "gal code codex" or "gal code opencode".`
|
|
60167
|
+
);
|
|
60100
60168
|
process.exit(1);
|
|
60101
60169
|
});
|
|
60102
60170
|
addVariantCommand(command, "codex", runVariant);
|
|
60103
60171
|
addVariantCommand(command, "opencode", runVariant);
|
|
60104
60172
|
return command;
|
|
60105
60173
|
}
|
|
60106
|
-
var import_node_os3, import_node_path2,
|
|
60174
|
+
var import_node_child_process, import_node_os3, import_node_path2, import_node_fs2, GAL_CODE_DESCRIPTION, OPENCODE_CONFIG_PATH, OFFICIAL_VARIANT_BINARIES, GLM_PROVIDER_CONFIG;
|
|
60107
60175
|
var init_code = __esm({
|
|
60108
60176
|
"module_365"() {
|
|
60109
60177
|
"use strict";
|
|
60178
|
+
import_node_child_process = require("node:child_process");
|
|
60110
60179
|
import_node_os3 = __toESM(require("node:os"), 1);
|
|
60111
60180
|
import_node_path2 = __toESM(require("node:path"), 1);
|
|
60181
|
+
import_node_fs2 = require("node:fs");
|
|
60112
60182
|
init_esm();
|
|
60183
|
+
init_config_manager();
|
|
60113
60184
|
init_code_process();
|
|
60114
|
-
|
|
60115
|
-
|
|
60116
|
-
|
|
60117
|
-
|
|
60118
|
-
|
|
60119
|
-
|
|
60120
|
-
|
|
60121
|
-
|
|
60122
|
-
|
|
60123
|
-
|
|
60185
|
+
init_gal_home();
|
|
60186
|
+
GAL_CODE_DESCRIPTION = "Run GAL Code Codex or OpenCode via `gal code codex` or `gal code opencode`. Use `make gal-code-local` for local iteration.";
|
|
60187
|
+
OPENCODE_CONFIG_PATH = ["apps", "gal-code-opencode", ".opencode"];
|
|
60188
|
+
OFFICIAL_VARIANT_BINARIES = {
|
|
60189
|
+
codex: "codex",
|
|
60190
|
+
opencode: "opencode"
|
|
60191
|
+
};
|
|
60192
|
+
GLM_PROVIDER_CONFIG = {
|
|
60193
|
+
provider: {
|
|
60194
|
+
glm: {
|
|
60195
|
+
npm: "@ai-sdk/openai-compatible",
|
|
60196
|
+
name: "GLM-5 (Vertex AI)",
|
|
60197
|
+
options: {
|
|
60198
|
+
baseURL: "https://us-central1-aiplatform.googleapis.com/v1/projects/scheduler-systems-infra/locations/us-central1/endpoints/openapi/"
|
|
60199
|
+
},
|
|
60200
|
+
models: {
|
|
60201
|
+
"zai-org/glm-5-maas": { name: "GLM-5" }
|
|
60202
|
+
}
|
|
60203
|
+
}
|
|
60204
|
+
},
|
|
60205
|
+
model: "glm/zai-org/glm-5-maas"
|
|
60124
60206
|
};
|
|
60125
60207
|
}
|
|
60126
60208
|
});
|
|
@@ -61324,11 +61406,11 @@ async function createSystemEnforcer(config2 = {}) {
|
|
|
61324
61406
|
const enforcer = new SystemEnforcer(defaultConfig);
|
|
61325
61407
|
return enforcer;
|
|
61326
61408
|
}
|
|
61327
|
-
var
|
|
61409
|
+
var import_node_fs3, import_promises3, import_node_path4, import_node_events, import_node_os4, ViolationBlockedError, SystemEnforcer;
|
|
61328
61410
|
var init_system_enforcer = __esm({
|
|
61329
61411
|
"module_373"() {
|
|
61330
61412
|
"use strict";
|
|
61331
|
-
|
|
61413
|
+
import_node_fs3 = require("node:fs");
|
|
61332
61414
|
import_promises3 = require("node:fs/promises");
|
|
61333
61415
|
import_node_path4 = require("node:path");
|
|
61334
61416
|
import_node_events = require("node:events");
|
|
@@ -61466,7 +61548,7 @@ var init_system_enforcer = __esm({
|
|
|
61466
61548
|
*/
|
|
61467
61549
|
startFileWatchers() {
|
|
61468
61550
|
for (const watchPath of this.config.watchPaths) {
|
|
61469
|
-
const watcher = (0,
|
|
61551
|
+
const watcher = (0, import_node_fs3.watch)(
|
|
61470
61552
|
watchPath,
|
|
61471
61553
|
{ recursive: true },
|
|
61472
61554
|
(eventType, filename) => {
|
|
@@ -63980,7 +64062,7 @@ Installing hooks for: ${platforms.join(", ")}`));
|
|
|
63980
64062
|
const support = ENFORCEMENT_HOOK_SUPPORT[platform5];
|
|
63981
64063
|
const candidatePaths = getEnforcementHookPaths(basePath, platform5);
|
|
63982
64064
|
try {
|
|
63983
|
-
const hookPath = candidatePaths.find((candidatePath) => (0,
|
|
64065
|
+
const hookPath = candidatePaths.find((candidatePath) => (0, import_node_fs4.existsSync)(candidatePath));
|
|
63984
64066
|
if (!hookPath) {
|
|
63985
64067
|
throw new Error("not-found");
|
|
63986
64068
|
}
|
|
@@ -64864,7 +64946,7 @@ Native SDLC enforcement updated to ${level} for ${orgName}.`));
|
|
|
64864
64946
|
console.log(source_default.dim(` Org: ${orgName}`));
|
|
64865
64947
|
return;
|
|
64866
64948
|
}
|
|
64867
|
-
if ((0,
|
|
64949
|
+
if ((0, import_node_fs4.existsSync)(hookPath) && !options.force) {
|
|
64868
64950
|
spinner.fail("Workflow enforcement hook already exists. Use --force to overwrite.");
|
|
64869
64951
|
return;
|
|
64870
64952
|
}
|
|
@@ -65081,8 +65163,8 @@ async function fetchWithAuth(url, authToken) {
|
|
|
65081
65163
|
}
|
|
65082
65164
|
async function resolveOrgFromGit(basePath) {
|
|
65083
65165
|
try {
|
|
65084
|
-
const { execSync:
|
|
65085
|
-
const remote =
|
|
65166
|
+
const { execSync: execSync17 } = await import("node:child_process");
|
|
65167
|
+
const remote = execSync17("git remote get-url origin", { cwd: basePath, encoding: "utf-8" }).trim();
|
|
65086
65168
|
const sshMatch = remote.match(/:([^/]+)\//);
|
|
65087
65169
|
const httpsMatch = remote.match(/github\.com\/([^/]+)\//);
|
|
65088
65170
|
return sshMatch?.[1] || httpsMatch?.[1] || null;
|
|
@@ -65104,7 +65186,7 @@ async function computeConfigDrifts(basePath, approvedData) {
|
|
|
65104
65186
|
for (const [relPath, approvedContent] of Object.entries(approvedFiles)) {
|
|
65105
65187
|
const localPath = (0, import_node_path5.join)(platformDir, relPath);
|
|
65106
65188
|
try {
|
|
65107
|
-
const localContent = (0,
|
|
65189
|
+
const localContent = (0, import_node_fs4.readFileSync)(localPath, "utf-8");
|
|
65108
65190
|
const approvedHash = hashContent2(approvedContent);
|
|
65109
65191
|
const localHash = hashContent2(localContent);
|
|
65110
65192
|
if (approvedHash !== localHash) {
|
|
@@ -65114,7 +65196,7 @@ async function computeConfigDrifts(basePath, approvedData) {
|
|
|
65114
65196
|
drifts.push({ platform: platform5, file: relPath, status: "missing" });
|
|
65115
65197
|
}
|
|
65116
65198
|
}
|
|
65117
|
-
if ((0,
|
|
65199
|
+
if ((0, import_node_fs4.existsSync)(platformDir)) {
|
|
65118
65200
|
try {
|
|
65119
65201
|
const localFiles = scanDirRecursive(platformDir, platformDir);
|
|
65120
65202
|
for (const localFile of localFiles) {
|
|
@@ -65131,7 +65213,7 @@ async function computeConfigDrifts(basePath, approvedData) {
|
|
|
65131
65213
|
function scanDirRecursive(dir, baseDir) {
|
|
65132
65214
|
const results = [];
|
|
65133
65215
|
try {
|
|
65134
|
-
const entries = (0,
|
|
65216
|
+
const entries = (0, import_node_fs4.readdirSync)(dir, { withFileTypes: true });
|
|
65135
65217
|
for (const entry of entries) {
|
|
65136
65218
|
const fullPath = (0, import_node_path5.join)(dir, entry.name);
|
|
65137
65219
|
if (entry.isDirectory()) {
|
|
@@ -65149,12 +65231,12 @@ function scanDirRecursive(dir, baseDir) {
|
|
|
65149
65231
|
}
|
|
65150
65232
|
async function installGitPrecommitHook(basePath, force, dryRun) {
|
|
65151
65233
|
const gitDir = (0, import_node_path5.join)(basePath, ".git");
|
|
65152
|
-
if (!(0,
|
|
65234
|
+
if (!(0, import_node_fs4.existsSync)(gitDir)) {
|
|
65153
65235
|
throw new Error("Not a git repository");
|
|
65154
65236
|
}
|
|
65155
65237
|
const hooksDir = (0, import_node_path5.join)(gitDir, "hooks");
|
|
65156
65238
|
const hookPath = (0, import_node_path5.join)(hooksDir, "pre-commit");
|
|
65157
|
-
if ((0,
|
|
65239
|
+
if ((0, import_node_fs4.existsSync)(hookPath)) {
|
|
65158
65240
|
const existing = await (0, import_promises5.readFile)(hookPath, "utf-8");
|
|
65159
65241
|
if (existing.includes(GAL_PRECOMMIT_MARKER)) {
|
|
65160
65242
|
if (!force) {
|
|
@@ -65175,7 +65257,7 @@ async function installGitPrecommitHook(basePath, force, dryRun) {
|
|
|
65175
65257
|
}
|
|
65176
65258
|
async function removeGitPrecommitHook(basePath) {
|
|
65177
65259
|
const hookPath = (0, import_node_path5.join)(basePath, ".git", "hooks", "pre-commit");
|
|
65178
|
-
if (!(0,
|
|
65260
|
+
if (!(0, import_node_fs4.existsSync)(hookPath)) {
|
|
65179
65261
|
throw new Error("No pre-commit hook found");
|
|
65180
65262
|
}
|
|
65181
65263
|
const content = await (0, import_promises5.readFile)(hookPath, "utf-8");
|
|
@@ -65208,7 +65290,7 @@ async function removeGitPrecommitHook(basePath) {
|
|
|
65208
65290
|
}
|
|
65209
65291
|
await (0, import_promises5.writeFile)(hookPath, filtered.join("\n"), "utf-8");
|
|
65210
65292
|
}
|
|
65211
|
-
var import_promises5,
|
|
65293
|
+
var import_promises5, import_node_fs4, import_node_path5, import_node_crypto, defaultApiUrl7, PLATFORM_DIRS3, SCAN_PLATFORM_DIRS, ENFORCEMENT_HOOK_SUPPORT, GAL_PRECOMMIT_MARKER, GAL_PRECOMMIT_CONTENT;
|
|
65212
65294
|
var init_enforce = __esm({
|
|
65213
65295
|
"module_382"() {
|
|
65214
65296
|
"use strict";
|
|
@@ -65216,7 +65298,7 @@ var init_enforce = __esm({
|
|
|
65216
65298
|
init_source();
|
|
65217
65299
|
init_ora();
|
|
65218
65300
|
import_promises5 = require("node:fs/promises");
|
|
65219
|
-
|
|
65301
|
+
import_node_fs4 = require("node:fs");
|
|
65220
65302
|
import_node_path5 = require("node:path");
|
|
65221
65303
|
import_node_crypto = require("node:crypto");
|
|
65222
65304
|
init_enforcement();
|
|
@@ -65850,7 +65932,7 @@ function getMachineId() {
|
|
|
65850
65932
|
}
|
|
65851
65933
|
function getGitEmail() {
|
|
65852
65934
|
try {
|
|
65853
|
-
return (0,
|
|
65935
|
+
return (0, import_node_child_process2.execSync)("git config user.email", { encoding: "utf-8" }).trim();
|
|
65854
65936
|
} catch {
|
|
65855
65937
|
return null;
|
|
65856
65938
|
}
|
|
@@ -66229,7 +66311,7 @@ Fleet Status: ${orgName}
|
|
|
66229
66311
|
});
|
|
66230
66312
|
return fleet;
|
|
66231
66313
|
}
|
|
66232
|
-
var import_node_os5,
|
|
66314
|
+
var import_node_os5, import_node_child_process2, import_node_crypto2, import_promises6, import_meta2, defaultApiUrl8;
|
|
66233
66315
|
var init_fleet = __esm({
|
|
66234
66316
|
"module_387"() {
|
|
66235
66317
|
"use strict";
|
|
@@ -66238,7 +66320,7 @@ var init_fleet = __esm({
|
|
|
66238
66320
|
init_ora();
|
|
66239
66321
|
init_constants();
|
|
66240
66322
|
import_node_os5 = require("node:os");
|
|
66241
|
-
|
|
66323
|
+
import_node_child_process2 = require("node:child_process");
|
|
66242
66324
|
import_node_crypto2 = require("node:crypto");
|
|
66243
66325
|
import_promises6 = require("node:fs/promises");
|
|
66244
66326
|
init_CoreServiceProvider();
|
|
@@ -67034,7 +67116,7 @@ function getMachineId2() {
|
|
|
67034
67116
|
}
|
|
67035
67117
|
function getGitEmail2() {
|
|
67036
67118
|
try {
|
|
67037
|
-
return (0,
|
|
67119
|
+
return (0, import_node_child_process3.execSync)("git config user.email", { encoding: "utf-8" }).trim();
|
|
67038
67120
|
} catch {
|
|
67039
67121
|
return null;
|
|
67040
67122
|
}
|
|
@@ -67301,7 +67383,7 @@ Error: ${useResult.error || "Unknown error"}`));
|
|
|
67301
67383
|
});
|
|
67302
67384
|
return join62;
|
|
67303
67385
|
}
|
|
67304
|
-
var import_node_os6,
|
|
67386
|
+
var import_node_os6, import_node_child_process3, import_node_crypto3, import_promises7, import_node_path6, defaultApiUrl9;
|
|
67305
67387
|
var init_join = __esm({
|
|
67306
67388
|
"module_391"() {
|
|
67307
67389
|
"use strict";
|
|
@@ -67310,7 +67392,7 @@ var init_join = __esm({
|
|
|
67310
67392
|
init_ora();
|
|
67311
67393
|
init_constants();
|
|
67312
67394
|
import_node_os6 = require("node:os");
|
|
67313
|
-
|
|
67395
|
+
import_node_child_process3 = require("node:child_process");
|
|
67314
67396
|
import_node_crypto3 = require("node:crypto");
|
|
67315
67397
|
import_promises7 = require("node:fs/promises");
|
|
67316
67398
|
import_node_path6 = require("node:path");
|
|
@@ -69000,16 +69082,16 @@ async function createIssues(drafts, context, onProgress) {
|
|
|
69000
69082
|
}
|
|
69001
69083
|
return results;
|
|
69002
69084
|
}
|
|
69003
|
-
var
|
|
69085
|
+
var import_node_child_process4, import_promises9, import_node_os8, import_node_path8, import_node_util2, execFile;
|
|
69004
69086
|
var init_issue_creator = __esm({
|
|
69005
69087
|
"module_400"() {
|
|
69006
69088
|
"use strict";
|
|
69007
|
-
|
|
69089
|
+
import_node_child_process4 = require("node:child_process");
|
|
69008
69090
|
import_promises9 = require("node:fs/promises");
|
|
69009
69091
|
import_node_os8 = require("node:os");
|
|
69010
69092
|
import_node_path8 = require("node:path");
|
|
69011
69093
|
import_node_util2 = require("node:util");
|
|
69012
|
-
execFile = (0, import_node_util2.promisify)(
|
|
69094
|
+
execFile = (0, import_node_util2.promisify)(import_node_child_process4.execFile);
|
|
69013
69095
|
}
|
|
69014
69096
|
});
|
|
69015
69097
|
|
|
@@ -69041,7 +69123,7 @@ async function maybeEditDraftsWithEditor(drafts, editor) {
|
|
|
69041
69123
|
await (0, import_promises10.writeFile)(tempPath, `${JSON.stringify(drafts, null, 2)}
|
|
69042
69124
|
`, "utf-8");
|
|
69043
69125
|
try {
|
|
69044
|
-
const result = (0,
|
|
69126
|
+
const result = (0, import_node_child_process5.spawnSync)(editor, [tempPath], { stdio: "inherit" });
|
|
69045
69127
|
if (result.status !== 0) {
|
|
69046
69128
|
throw new Error(`${editor} exited with status ${result.status ?? "unknown"}.`);
|
|
69047
69129
|
}
|
|
@@ -69094,12 +69176,12 @@ async function reviewDraftIssues(transcript, drafts, options = {}) {
|
|
|
69094
69176
|
const approvedIndexes = parseApprovalSelection(selection, workingDrafts.length);
|
|
69095
69177
|
return approvedIndexes.map((index) => workingDrafts[index]).filter(Boolean);
|
|
69096
69178
|
}
|
|
69097
|
-
var import_node_readline,
|
|
69179
|
+
var import_node_readline, import_node_child_process5, import_promises10, import_node_os9, import_node_path9;
|
|
69098
69180
|
var init_transcript_review = __esm({
|
|
69099
69181
|
"module_401"() {
|
|
69100
69182
|
"use strict";
|
|
69101
69183
|
import_node_readline = require("node:readline");
|
|
69102
|
-
|
|
69184
|
+
import_node_child_process5 = require("node:child_process");
|
|
69103
69185
|
import_promises10 = require("node:fs/promises");
|
|
69104
69186
|
import_node_os9 = require("node:os");
|
|
69105
69187
|
import_node_path9 = require("node:path");
|
|
@@ -69127,7 +69209,7 @@ function parseGithubRepoFromRemote(remote) {
|
|
|
69127
69209
|
}
|
|
69128
69210
|
function detectCurrentRepo() {
|
|
69129
69211
|
try {
|
|
69130
|
-
const remote = (0,
|
|
69212
|
+
const remote = (0, import_node_child_process6.execFileSync)("git", ["config", "--get", "remote.origin.url"], {
|
|
69131
69213
|
encoding: "utf-8",
|
|
69132
69214
|
stdio: ["ignore", "pipe", "ignore"]
|
|
69133
69215
|
}).trim();
|
|
@@ -69320,11 +69402,11 @@ function createOpsCommand() {
|
|
|
69320
69402
|
});
|
|
69321
69403
|
return command;
|
|
69322
69404
|
}
|
|
69323
|
-
var
|
|
69405
|
+
var import_node_child_process6, import_promises11, DEFAULT_TRANSCRIPT_REPO;
|
|
69324
69406
|
var init_ops = __esm({
|
|
69325
69407
|
"module_402"() {
|
|
69326
69408
|
"use strict";
|
|
69327
|
-
|
|
69409
|
+
import_node_child_process6 = require("node:child_process");
|
|
69328
69410
|
import_promises11 = require("node:fs/promises");
|
|
69329
69411
|
init_esm();
|
|
69330
69412
|
init_source();
|
|
@@ -80406,7 +80488,7 @@ var init_index = __esm({
|
|
|
80406
80488
|
}
|
|
80407
80489
|
});
|
|
80408
80490
|
|
|
80409
|
-
var cliVersion10 = true ? "0.0.
|
|
80491
|
+
var cliVersion10 = true ? "0.0.588" : "0.0.0-dev";
|
|
80410
80492
|
var args = process.argv.slice(2);
|
|
80411
80493
|
var requestedGlobalHelp = args.length === 1 && (args[0] === "--help" || args[0] === "-h");
|
|
80412
80494
|
var requestedVersion = args.length === 1 && (args[0] === "--version" || args[0] === "-V");
|
package/package.json
CHANGED