@scheduler-systems/gal-run 0.0.551 → 0.0.553
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/README.md +0 -35
- package/dist/index.cjs +70 -84
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,41 +51,6 @@ gal sync --status
|
|
|
51
51
|
gal discover
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
## Internal Preview
|
|
55
|
-
|
|
56
|
-
`gal code` is currently an internal-only command gated behind the existing
|
|
57
|
-
internal audience tier. It does a live `GET /auth/me` check before launch, so
|
|
58
|
-
authenticated non-internal users are rejected even if they guess the command.
|
|
59
|
-
The production request path is `gal code -> GAL API proxy -> Vertex`, not
|
|
60
|
-
direct client access to Vertex.
|
|
61
|
-
|
|
62
|
-
Current local preview flow:
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
cd /Users/scheduler-systems/Documents/scheduler-systems/products/gal-run-private
|
|
66
|
-
pnpm build:gal-code
|
|
67
|
-
pnpm build:cli
|
|
68
|
-
GAL_NO_AUTO_UPDATE=1 \
|
|
69
|
-
GAL_ACCEPT_TERMS=true \
|
|
70
|
-
node apps/cli/dist/index.cjs code --version
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Manual smoke test:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
cd /Users/scheduler-systems/Documents/scheduler-systems/products/gal-run-private
|
|
77
|
-
GAL_NO_AUTO_UPDATE=1 \
|
|
78
|
-
GAL_ACCEPT_TERMS=true \
|
|
79
|
-
node apps/cli/dist/index.cjs code
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Expected behavior:
|
|
83
|
-
|
|
84
|
-
- startup lands in GAL Code with `Model gal`
|
|
85
|
-
- `/model` shows `Current model gal`
|
|
86
|
-
- non-internal authenticated users get `GAL Code requires membership in an org with internal audienceTier`
|
|
87
|
-
- prompt traffic goes to `https://api.gal.run/api/gal-code/v1/chat/completions`
|
|
88
|
-
|
|
89
54
|
## Supported Platforms
|
|
90
55
|
|
|
91
56
|
- Claude Code (`.claude/`)
|
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.553" : "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;
|
|
@@ -3986,7 +3986,7 @@ function detectEnvironment() {
|
|
|
3986
3986
|
return "dev";
|
|
3987
3987
|
}
|
|
3988
3988
|
try {
|
|
3989
|
-
const version2 = true ? "0.0.
|
|
3989
|
+
const version2 = true ? "0.0.553" : void 0;
|
|
3990
3990
|
if (version2 && version2.includes("-local")) {
|
|
3991
3991
|
return "dev";
|
|
3992
3992
|
}
|
|
@@ -14386,7 +14386,7 @@ function getId() {
|
|
|
14386
14386
|
}
|
|
14387
14387
|
function getCliVersion() {
|
|
14388
14388
|
try {
|
|
14389
|
-
return true ? "0.0.
|
|
14389
|
+
return true ? "0.0.553" : "0.0.0-dev";
|
|
14390
14390
|
} catch {
|
|
14391
14391
|
return "0.0.0-dev";
|
|
14392
14392
|
}
|
|
@@ -17760,25 +17760,6 @@ var init_src = __esm({
|
|
|
17760
17760
|
}
|
|
17761
17761
|
});
|
|
17762
17762
|
|
|
17763
|
-
function isNonDevEnvironment(env2) {
|
|
17764
|
-
const nodeEnv = env2.NODE_ENV?.toLowerCase();
|
|
17765
|
-
const galEnvironment = env2.GAL_ENVIRONMENT?.toLowerCase() || env2.GAL_ENV?.toLowerCase();
|
|
17766
|
-
if (nodeEnv === "development" || nodeEnv === "test") return false;
|
|
17767
|
-
if (galEnvironment === "dev" || galEnvironment === "development" || galEnvironment === "test") {
|
|
17768
|
-
return false;
|
|
17769
|
-
}
|
|
17770
|
-
return true;
|
|
17771
|
-
}
|
|
17772
|
-
function shouldWarnDeprecatedGalInternal(env2 = process.env) {
|
|
17773
|
-
return env2.GAL_INTERNAL === "true" && isNonDevEnvironment(env2);
|
|
17774
|
-
}
|
|
17775
|
-
function maybeWarnDeprecatedGalInternal(logger3 = console.warn, env2 = process.env) {
|
|
17776
|
-
if (!shouldWarnDeprecatedGalInternal(env2) || galInternalDeprecationWarned) return;
|
|
17777
|
-
galInternalDeprecationWarned = true;
|
|
17778
|
-
logger3(
|
|
17779
|
-
"GAL_INTERNAL=true is deprecated outside development. Run `gal auth login` and rely on cached org audienceTier instead."
|
|
17780
|
-
);
|
|
17781
|
-
}
|
|
17782
17763
|
function getCliEnvironment() {
|
|
17783
17764
|
const galEnv = process.env.GAL_ENVIRONMENT;
|
|
17784
17765
|
if (galEnv === "dev" || galEnv === "prod") return galEnv;
|
|
@@ -17789,51 +17770,48 @@ function getCliEnvironment() {
|
|
|
17789
17770
|
return "prod";
|
|
17790
17771
|
}
|
|
17791
17772
|
function getFeatureFlags() {
|
|
17792
|
-
const isInternalEnv = process.env.GAL_INTERNAL === "true";
|
|
17793
17773
|
const CACHE_MAX_AGE_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
17794
17774
|
let isInternalFromApi = false;
|
|
17795
17775
|
let isPartnerFromApi = false;
|
|
17796
|
-
|
|
17797
|
-
|
|
17798
|
-
|
|
17799
|
-
|
|
17800
|
-
|
|
17801
|
-
|
|
17802
|
-
|
|
17803
|
-
|
|
17804
|
-
|
|
17805
|
-
|
|
17806
|
-
|
|
17807
|
-
|
|
17808
|
-
|
|
17809
|
-
|
|
17810
|
-
|
|
17811
|
-
|
|
17812
|
-
|
|
17813
|
-
|
|
17814
|
-
|
|
17815
|
-
|
|
17816
|
-
|
|
17817
|
-
|
|
17818
|
-
|
|
17819
|
-
|
|
17820
|
-
|
|
17821
|
-
|
|
17822
|
-
|
|
17823
|
-
|
|
17824
|
-
|
|
17825
|
-
|
|
17826
|
-
|
|
17827
|
-
|
|
17828
|
-
|
|
17829
|
-
);
|
|
17830
|
-
}
|
|
17776
|
+
try {
|
|
17777
|
+
const { readFileSync: readFileSync47, existsSync: existsSync53 } = require("fs");
|
|
17778
|
+
const { join: join60 } = require("path");
|
|
17779
|
+
const { homedir: homedir33 } = require("os");
|
|
17780
|
+
const configPath = join60(homedir33(), ".gal", "config.json");
|
|
17781
|
+
if (existsSync53(configPath)) {
|
|
17782
|
+
const config2 = JSON.parse(readFileSync47(configPath, "utf-8"));
|
|
17783
|
+
const cacheAge = Date.now() - (config2.flagsCachedAt || config2.internalOrgsCheckedAt || 0);
|
|
17784
|
+
if (cacheAge < CACHE_MAX_AGE_MS) {
|
|
17785
|
+
const userOrgs = config2.orgMemberships || [];
|
|
17786
|
+
const orgAudienceTierMap = config2.orgAudienceTierMap || {};
|
|
17787
|
+
if (userOrgs.length > 0 && Object.keys(orgAudienceTierMap).length > 0) {
|
|
17788
|
+
isInternalFromApi = userOrgs.some(
|
|
17789
|
+
(org) => orgAudienceTierMap[org] === "internal" || orgAudienceTierMap[org.toLowerCase()] === "internal"
|
|
17790
|
+
);
|
|
17791
|
+
} else if (userOrgs.length > 0) {
|
|
17792
|
+
const internalOrgs = config2.internalOrgs || [];
|
|
17793
|
+
if (internalOrgs.length > 0) {
|
|
17794
|
+
const normalizedInternal = new Set(internalOrgs.map((o) => o.toLowerCase()));
|
|
17795
|
+
isInternalFromApi = userOrgs.some((org) => normalizedInternal.has(org.toLowerCase()));
|
|
17796
|
+
}
|
|
17797
|
+
}
|
|
17798
|
+
const orgPlanMap = config2.orgPlanMap || {};
|
|
17799
|
+
if (!isInternalFromApi && userOrgs.length > 0 && Object.keys(orgPlanMap).length > 0) {
|
|
17800
|
+
isPartnerFromApi = userOrgs.some((org) => {
|
|
17801
|
+
const plan = orgPlanMap[org] || orgPlanMap[org.toLowerCase()];
|
|
17802
|
+
return plan && plan !== "free";
|
|
17803
|
+
});
|
|
17804
|
+
}
|
|
17805
|
+
if (!isInternalFromApi && !isPartnerFromApi && userOrgs.length > 0 && Object.keys(orgAudienceTierMap).length > 0) {
|
|
17806
|
+
isPartnerFromApi = userOrgs.some(
|
|
17807
|
+
(org) => orgAudienceTierMap[org] === "partners" || orgAudienceTierMap[org.toLowerCase()] === "partners"
|
|
17808
|
+
);
|
|
17831
17809
|
}
|
|
17832
17810
|
}
|
|
17833
|
-
} catch {
|
|
17834
17811
|
}
|
|
17812
|
+
} catch {
|
|
17835
17813
|
}
|
|
17836
|
-
const isInternal =
|
|
17814
|
+
const isInternal = isInternalFromApi;
|
|
17837
17815
|
let audience = "public";
|
|
17838
17816
|
if (isInternal) {
|
|
17839
17817
|
audience = "internal";
|
|
@@ -17984,16 +17962,15 @@ function getAllInternalFlags() {
|
|
|
17984
17962
|
}
|
|
17985
17963
|
return flags;
|
|
17986
17964
|
}
|
|
17987
|
-
var
|
|
17965
|
+
var COMMAND_CATEGORIES, PREVIEW_COMMANDS, COMMAND_FLAGS, INTERNAL_OPTIONS, INTERNAL_SUBCOMMANDS;
|
|
17988
17966
|
var init_feature_flags2 = __esm({
|
|
17989
17967
|
"module_137"() {
|
|
17990
17968
|
"use strict";
|
|
17991
17969
|
init_src();
|
|
17992
|
-
galInternalDeprecationWarned = false;
|
|
17993
17970
|
COMMAND_CATEGORIES = {
|
|
17994
17971
|
// Core convenience package (always visible)
|
|
17995
17972
|
core: ["auth", "sync", "mcp", "feedback", "update", "hooks", "init", "status", "discover", "approve", "approved-config", "propose", "workspace", "fetch", "join", "scan", "memory", "policy", "install"],
|
|
17996
|
-
// Internal development commands (requires org with internal audienceTier
|
|
17973
|
+
// Internal development commands (requires org with internal audienceTier)
|
|
17997
17974
|
internal: [
|
|
17998
17975
|
"admin",
|
|
17999
17976
|
"agent",
|
|
@@ -64000,7 +63977,7 @@ function generateAgentsMdIndex(cwd, docsDir, techStack) {
|
|
|
64000
63977
|
lines.push("");
|
|
64001
63978
|
lines.push("|@section:environments");
|
|
64002
63979
|
lines.push("");
|
|
64003
|
-
lines.push("|dev:localhost:
|
|
63980
|
+
lines.push("|dev:localhost:5175, localhost:3000");
|
|
64004
63981
|
lines.push("|production:app.gal.run, api.gal.run");
|
|
64005
63982
|
lines.push("");
|
|
64006
63983
|
lines.push("|@section:when-to-read");
|
|
@@ -66112,11 +66089,7 @@ function formatCommandDisplay(commands, context) {
|
|
|
66112
66089
|
const envLabel = context.isInternal ? source_default.yellow(`[${context.environment} | internal]`) : source_default.blue(`[${context.environment}]`);
|
|
66113
66090
|
lines.push(`Environment: ${envLabel}`);
|
|
66114
66091
|
if (context.isInternal) {
|
|
66115
|
-
|
|
66116
|
-
lines.push(source_default.dim(` Source: GAL_INTERNAL=true (dev/test override)`));
|
|
66117
|
-
} else {
|
|
66118
|
-
lines.push(source_default.dim(` Source: org audienceTier='internal' in Firestore (#3323)`));
|
|
66119
|
-
}
|
|
66092
|
+
lines.push(source_default.dim(` Source: org audienceTier='internal' in Firestore (#3323)`));
|
|
66120
66093
|
}
|
|
66121
66094
|
lines.push("");
|
|
66122
66095
|
lines.push(source_default.bold.green("Core Commands (Always Enabled)"));
|
|
@@ -80263,9 +80236,6 @@ function shouldAllowAuthenticatedCodeLaunch(argv) {
|
|
|
80263
80236
|
if (getRequestedCommand(argv) !== "code") {
|
|
80264
80237
|
return false;
|
|
80265
80238
|
}
|
|
80266
|
-
if (process.env.GAL_INTERNAL === "true") {
|
|
80267
|
-
return true;
|
|
80268
|
-
}
|
|
80269
80239
|
try {
|
|
80270
80240
|
return Boolean(ConfigManager.load().authToken);
|
|
80271
80241
|
} catch {
|
|
@@ -80358,7 +80328,6 @@ var init_index = __esm({
|
|
|
80358
80328
|
await promptSessionFeedback2();
|
|
80359
80329
|
}
|
|
80360
80330
|
});
|
|
80361
|
-
maybeWarnDeprecatedGalInternal();
|
|
80362
80331
|
featureFlags = getFeatureFlags();
|
|
80363
80332
|
knownCommands = /* @__PURE__ */ new Set([
|
|
80364
80333
|
...COMMAND_CATEGORIES.core,
|
|
@@ -80476,7 +80445,7 @@ var init_index = __esm({
|
|
|
80476
80445
|
}
|
|
80477
80446
|
});
|
|
80478
80447
|
|
|
80479
|
-
var cliVersion11 = true ? "0.0.
|
|
80448
|
+
var cliVersion11 = true ? "0.0.553" : "0.0.0-dev";
|
|
80480
80449
|
var args = process.argv.slice(2);
|
|
80481
80450
|
var requestedGlobalHelp = args.length === 1 && (args[0] === "--help" || args[0] === "-h");
|
|
80482
80451
|
var requestedVersion = args.length === 1 && (args[0] === "--version" || args[0] === "-V");
|
|
@@ -80500,16 +80469,33 @@ var globalHelpCommands = [
|
|
|
80500
80469
|
" update [options] Check for and apply CLI updates",
|
|
80501
80470
|
" workspace Manage workspaces (GitHub organizations and personal accounts)"
|
|
80502
80471
|
];
|
|
80503
|
-
|
|
80504
|
-
|
|
80505
|
-
|
|
80506
|
-
|
|
80507
|
-
|
|
80508
|
-
)
|
|
80509
|
-
|
|
80510
|
-
|
|
80511
|
-
|
|
80512
|
-
|
|
80472
|
+
try {
|
|
80473
|
+
const fs8 = require("fs");
|
|
80474
|
+
const path8 = require("path");
|
|
80475
|
+
const os3 = require("os");
|
|
80476
|
+
const configPath = path8.join(os3.homedir(), ".gal", "config.json");
|
|
80477
|
+
if (fs8.existsSync(configPath)) {
|
|
80478
|
+
const config2 = JSON.parse(fs8.readFileSync(configPath, "utf-8"));
|
|
80479
|
+
const CACHE_MAX_AGE_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
80480
|
+
const cacheAge = Date.now() - (config2.flagsCachedAt || config2.internalOrgsCheckedAt || 0);
|
|
80481
|
+
if (cacheAge < CACHE_MAX_AGE_MS) {
|
|
80482
|
+
const userOrgs = config2.orgMemberships || [];
|
|
80483
|
+
const orgAudienceTierMap = config2.orgAudienceTierMap || {};
|
|
80484
|
+
const isInternal = userOrgs.length > 0 && Object.keys(orgAudienceTierMap).length > 0 && userOrgs.some((org) => orgAudienceTierMap[org] === "internal" || orgAudienceTierMap[org.toLowerCase()] === "internal");
|
|
80485
|
+
if (isInternal) {
|
|
80486
|
+
globalHelpCommands.splice(
|
|
80487
|
+
1,
|
|
80488
|
+
0,
|
|
80489
|
+
" config Manage CLI configuration"
|
|
80490
|
+
);
|
|
80491
|
+
globalHelpCommands.push(
|
|
80492
|
+
" uninstall [options] Remove GAL-managed files and hooks",
|
|
80493
|
+
" workflow Manage workflow approval policies"
|
|
80494
|
+
);
|
|
80495
|
+
}
|
|
80496
|
+
}
|
|
80497
|
+
}
|
|
80498
|
+
} catch {
|
|
80513
80499
|
}
|
|
80514
80500
|
if (requestedVersion) {
|
|
80515
80501
|
console.log(cliVersion11);
|
package/package.json
CHANGED