@meshxdata/fops 0.1.39 → 0.1.40

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 (3) hide show
  1. package/CHANGELOG.md +185 -0
  2. package/package.json +1 -1
  3. package/src/doctor.js +66 -16
package/CHANGELOG.md CHANGED
@@ -1,3 +1,188 @@
1
+ ## [0.1.40] - 2026-03-10
2
+
3
+ - callback url for localhost (821fb94)
4
+ - disable 4 scaffolding plugin by default. (bfb2b76)
5
+ - jaccard improvements (b7494a0)
6
+ - refactor azure plugin (68dfef4)
7
+ - refactor azure plugin (b24a008)
8
+ - fix trino catalog missing (4928a55)
9
+ - v36 bump and changelog generation on openai (37a0440)
10
+ - v36 bump and changelog generation on openai (a3b02d9)
11
+ - bump (a990058)
12
+ - status bar fix and new plugin for ttyd (27dde1e)
13
+ - file demo and tray (1a3e704)
14
+ - electron app (59ad0bb)
15
+ - compose and fops file plugin (1cf0e81)
16
+ - bump (346ffc1)
17
+ - localhost replaced by 127.0.0.1 (82b9f30)
18
+ - .29 (587b0e1)
19
+ - improve up down and bootstrap script (b79ebaf)
20
+ - checksum (22c8086)
21
+ - checksum (96b434f)
22
+ - checksum (15ed3c0)
23
+ - checksum (8a6543a)
24
+ - bump embed trino linksg (8440504)
25
+ - bump data (765ffd9)
26
+ - bump (cb8b232)
27
+ - broken tests (c532229)
28
+ - release 0.1.18, preflight checks (d902249)
29
+ - fix compute display bug (d10f5d9)
30
+ - cleanup packer files (6330f18)
31
+ - plan mode (cb36a8a)
32
+ - bump to 0.1.16 - agent ui (41ac1a2)
33
+ - bump to 0.1.15 - agent ui (4ebe2e1)
34
+ - bump to 0.1.14 (6c3a7fa)
35
+ - bump to 0.1.13 (8db570f)
36
+ - release 0.1.12 (c1c79e5)
37
+ - bump (11aa3b0)
38
+ - git keep and bump tui (be1678e)
39
+ - skills, index, rrf, compacted context (100k > 10k) (7b2fffd)
40
+ - cloudflare and token consumption, graphs indexing (0ad9eec)
41
+ - bump storage default (22c83ba)
42
+ - storage fix (68a22a0)
43
+ - skills update (7f56500)
44
+ - v9 bump (3864446)
45
+ - bump (c95eedc)
46
+ - rrf (dbf8c95)
47
+ - feat: warning when running predictions (95e8c52)
48
+ - feat: support for local predictions (45cf26b)
49
+ - feat: wip support for predictions + mlflow (3457052)
50
+ - add Reciprocal Rank Fusion (RRF) to knowledge and skill retrieval (61549bc)
51
+ - validate CSV headers in compute_run readiness check (a8c7a43)
52
+ - fix corrupted Iceberg metadata: probe tables + force cleanup on re-apply (50578af)
53
+ - enforce: never use foundation_apply to fix broken products (2e049bf)
54
+ - update SKILL.md with complete tool reference for knowledge retrieval (30b1924)
55
+ - add storage read, input DP table probe, and compute_run improvements (34e6c4c)
56
+ - skills update (1220385)
57
+ - skills update (bb66958)
58
+ - some tui improvement andd tools apply overwrite (e90c35c)
59
+ - skills update (e9227a1)
60
+ - skills update (669c4b3)
61
+ - fix plugin pre-flight checks (f741743)
62
+ - increase agent context (6479aaa)
63
+ - skills and init sql fixes (5fce35e)
64
+ - checksum (3518b56)
65
+ - penging job limit (a139861)
66
+ - checksum (575d28c)
67
+ - bump (92049ba)
68
+ - fix bug per tab status (0a33657)
69
+ - fix bug per tab status (50457c6)
70
+ - checksumming (0ad842e)
71
+ - shot af mardkwon overlapping (51f63b9)
72
+ - add spark dockerfile for multiarch builds (95abbd1)
73
+ - fix plugin initialization (16b9782)
74
+ - split index.js (50902a2)
75
+ - cloudflare cidr (cc4e021)
76
+ - cloduflare restrictions (2f6ba2d)
77
+ - sequential start (86b496e)
78
+ - sequential start (4930fe1)
79
+ - sequential start (353f014)
80
+ - qa tests (2dc6a1a)
81
+ - bump sha for .85 (dc2edfe)
82
+ - preserve env on sudo (7831227)
83
+ - bump sha for .84 (6c052f9)
84
+ - non interactive for azure vms (0aa8a2f)
85
+ - keep .env if present (d072450)
86
+ - bump (7a8e732)
87
+ - ensure opa is on compose if not set (f4a5228)
88
+ - checksum bump (a2ccc20)
89
+ - netrc defensive checks (a0b0ccc)
90
+ - netrc defensive checks (ae37403)
91
+ - checksum (ec45d11)
92
+ - update sync and fix up (7f9af72)
93
+ - expand test for azure and add new per app tag support (388a168)
94
+ - checksum on update (44005fc)
95
+ - cleanup for later (15e5313)
96
+ - cleanup for later (11c9597)
97
+ - switch branch feature (822fecc)
98
+ - add pull (d1c19ab)
99
+ - Bump hono from 4.11.9 to 4.12.0 in /operator-cli (ad25144)
100
+ - tests (f180a9a)
101
+ - cleanup (39c49a3)
102
+ - registry (7b7126a)
103
+ - reconcile kafka (832d0db)
104
+ - gh login bug (025886c)
105
+ - cleanup (bb96cab)
106
+ - strip envs from process (2421180)
107
+ - force use of gh creds not tokens in envs var (fff7787)
108
+ - resolve import between npm installs and npm link (79522e1)
109
+ - fix gh scope and azure states (afd846c)
110
+ - refactoring (da50352)
111
+ - split fops repo (d447638)
112
+ - aks (b791f8f)
113
+ - refactor azure (67d3bad)
114
+ - wildcard (391f023)
115
+ - azure plugin (c074074)
116
+ - zap (d7e6e7f)
117
+ - fix knock (cf89c05)
118
+ - azure (4adec98)
119
+ - Bump tar from 7.5.7 to 7.5.9 in /operator-cli (e41e98e)
120
+ - azure stack index.js split (de12272)
121
+ - Bump ajv from 8.17.1 to 8.18.0 in /operator-cli (76da21f)
122
+ - packer (9665fbc)
123
+ - remove stack api (db0fd4d)
124
+ - packer cleanup (fe1bf14)
125
+ - force refresh token (3a3d7e2)
126
+ - provision shell (2ad505f)
127
+ - azure vm management (91dcb31)
128
+ - azure specific (2b0cca8)
129
+ - azure packer (12175b8)
130
+ - init hashed pwd (db8523c)
131
+ - packer (5b5c7c4)
132
+ - doctor for azure vm (ed524fa)
133
+ - packer and 1pwd (c6d053e)
134
+ - split big index.js (dc85a1b)
135
+ - kafka volume update (21815ec)
136
+ - fix openai azure tools confirmation and flow (0118cd1)
137
+ - nighly fixx, test fix (5e0d04f)
138
+ - open ai training (cdc494a)
139
+ - openai integration in azure (1ca1475)
140
+ - ci (672cea9)
141
+ - refresh ghcr creds (4220c48)
142
+ - cleaned up version (1a0074f)
143
+ - traefik on ghcr and templates (8e31a05)
144
+ - apply fcl (e78911f)
145
+ - demo landscape (dd205fe)
146
+ - smarter login and schema (1af514f)
147
+ - no down before up unless something broke (56b1132)
148
+ - dai, reconcile failed containers (12907fa)
149
+ - reconcile dead container (7da75e4)
150
+ - defensive around storage buckets dir (b98871d)
151
+ - defensive around storage buckets dir (e86e132)
152
+ - gear in for multiarch (bf3fa3e)
153
+ - up autofix (99c7f89)
154
+ - autofix stale containers on up (43c7d0f)
155
+ - shared sessions fix (5de1359)
156
+ - share sessions between ui and tui (8321391)
157
+ - fix chat view display details (e263996)
158
+ - fix chat view display details (9babdda)
159
+ - tui up fixes (86e9f17)
160
+ - fix commands init (442538b)
161
+ - enable k3s profile (b2dcfc8)
162
+ - test up till job creation (656d388)
163
+ - tui fixes (0599779)
164
+ - cleanup (27731f0)
165
+ - train (90bf559)
166
+ - training (f809bf6)
167
+ - training (ba2b836)
168
+ - training (6fc5267)
169
+ - training (4af8ac9)
170
+ - fix build script (bd82836)
171
+ - infra test (5b79815)
172
+ - infra test (3a0ac05)
173
+ - infra test (e5c67b5)
174
+ - tests (ae7b621)
175
+ - tests (c09ae6a)
176
+ - update tui (4784153)
177
+ - training (0a5a330)
178
+ - tui (df4dd4a)
179
+ - pkg builds (4dc9993)
180
+ - also source env for creds (9a17d8f)
181
+ - fcl support (e8a5743)
182
+ - fcl support (8d6b6cd)
183
+ - fcl support (cb76a4a)
184
+ - bump package (df2ee85)
185
+
1
186
  # Changelog
2
187
 
3
188
  All notable changes to @meshxdata/fops (Foundation Operator CLI) are documented here.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshxdata/fops",
3
- "version": "0.1.39",
3
+ "version": "0.1.40",
4
4
  "description": "CLI to install and manage data mesh platforms",
5
5
  "keywords": [
6
6
  "fops",
package/src/doctor.js CHANGED
@@ -873,7 +873,26 @@ export async function runDoctor(opts = {}, registry = null) {
873
873
  console.log(chalk.green(" ✓ write:packages and repo scopes added"));
874
874
  };
875
875
 
876
+ // Double-check: if hasWritePackages came from netrc fallback, verify the gh CLI token too
877
+ let ghCliHasPackages = hasWritePackages;
876
878
  if (hasWritePackages) {
879
+ try {
880
+ const { stdout: tkOut, exitCode: tkExit } = await runGh(["auth", "token"], { timeout: 5000, reject: false });
881
+ if (tkExit === 0 && tkOut?.trim()) {
882
+ const { status, scopes } = await ghApiGetWithScopes(tkOut.trim());
883
+ if (status === 200 && scopes && !scopes.includes("write:packages") && !scopes.includes("read:packages")) {
884
+ ghCliHasPackages = false;
885
+ }
886
+ }
887
+ } catch {}
888
+ }
889
+ if (hasWritePackages && !ghCliHasPackages) {
890
+ warn(
891
+ "gh CLI token missing packages scope",
892
+ "netrc token has it, but gh auth token does not — run: gh auth refresh -h github.com -s write:packages",
893
+ ghcrRefreshFn,
894
+ );
895
+ } else if (hasWritePackages) {
877
896
  ok("gh token has write:packages scope");
878
897
  } else {
879
898
  fail(
@@ -917,32 +936,63 @@ export async function runDoctor(opts = {}, registry = null) {
917
936
  }
918
937
 
919
938
  const ghcrFixFn = async () => {
920
- // Ensure write:packages scope is present (implies read:packages)
921
- if (!hasWritePackages) {
922
- console.log(chalk.cyan(" ▶ gh auth refresh -h github.com -s write:packages -s repo"));
923
- console.log(chalk.dim(" (gh CLI will ask for device code auth, then optionally Git credential setup)"));
924
- await runGh(["auth", "refresh", "-h", "github.com", "-s", "write:packages", "-s", "repo"], {
925
- stdio: "inherit", timeout: 120_000,
926
- });
927
- }
928
-
929
- // Get fresh token and login to ghcr.io
939
+ // Find a token with packages scope prefer gh CLI token, fall back to netrc
930
940
  let ghToken = null;
941
+
942
+ // 1) Try gh CLI token
931
943
  try {
932
944
  const { stdout, exitCode } = await runGh(["auth", "token"], { timeout: 5000, reject: false });
933
- if (exitCode === 0 && stdout?.trim()) ghToken = stdout.trim();
945
+ if (exitCode === 0 && stdout?.trim()) {
946
+ const t = stdout.trim();
947
+ const { status, scopes } = await ghApiGetWithScopes(t);
948
+ if (status === 200 && scopes?.includes("write:packages")) {
949
+ ghToken = t;
950
+ } else if (status === 200) {
951
+ // gh token works but lacks packages scope — refresh it
952
+ console.log(chalk.yellow(" gh CLI token missing write:packages — refreshing…"));
953
+ console.log(chalk.cyan(" ▶ gh auth refresh -h github.com -s write:packages -s repo"));
954
+ const { exitCode: refExit } = await runGh(["auth", "refresh", "-h", "github.com", "-s", "write:packages", "-s", "repo"], {
955
+ stdio: "inherit", timeout: 120_000, reject: false,
956
+ });
957
+ if (refExit === 0) {
958
+ const { stdout: fresh } = await runGh(["auth", "token"], { timeout: 5000, reject: false });
959
+ if (fresh?.trim()) ghToken = fresh.trim();
960
+ }
961
+ }
962
+ }
934
963
  } catch {}
935
964
 
965
+ // 2) Fall back to netrc token if gh CLI token doesn't have the right scopes
966
+ if (!ghToken) {
967
+ try {
968
+ const content = await readFile(netrcPath);
969
+ const netrcToken = readNetrcToken(content, "github.com");
970
+ if (netrcToken) {
971
+ const { status, scopes } = await ghApiGetWithScopes(netrcToken);
972
+ if (status === 200 && (scopes?.includes("write:packages") || scopes?.includes("read:packages"))) {
973
+ console.log(chalk.cyan(" Using netrc token (has packages scope)"));
974
+ ghToken = netrcToken;
975
+ }
976
+ }
977
+ } catch {}
978
+ }
979
+
936
980
  if (ghToken) {
937
- console.log(chalk.cyan(" ▶ Logging into ghcr.io using gh auth token…"));
981
+ console.log(chalk.cyan(" ▶ Logging into ghcr.io…"));
982
+ // Login for both current user and root (Docker daemon runs as root)
938
983
  await run("sh", ["-c", `echo ${ghToken} | docker login ghcr.io -u x-access-token --password-stdin`], {
939
984
  stdio: "inherit", timeout: 15000,
940
985
  });
986
+ try {
987
+ await execa("sh", ["-c", `echo ${ghToken} | sudo docker login ghcr.io -u x-access-token --password-stdin`], {
988
+ timeout: 15000, stdio: "pipe",
989
+ });
990
+ } catch { /* root login best-effort */ }
941
991
  } else {
942
- console.log(chalk.yellow(" gh CLI not authenticated manual login required."));
943
- console.log(chalk.dim(" Create a PAT at https://github.com/settings/tokens with write:packages scope, then run:"));
944
- console.log(chalk.dim(" docker login ghcr.io -u <your-username>"));
945
- throw new Error("Manual GHCR login required");
992
+ console.log(chalk.yellow(" No token with packages scope found."));
993
+ console.log(chalk.dim(" Run: gh auth refresh -h github.com -s write:packages -s repo"));
994
+ console.log(chalk.dim(" Then: echo $(gh auth token) | docker login ghcr.io -u x-access-token --password-stdin"));
995
+ throw new Error("No token with packages scope — refresh gh auth or create a PAT with write:packages");
946
996
  }
947
997
  };
948
998