flowviant 0.65.0 → 0.66.0
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/bin/lib/listeners.mjs +39 -7
- package/package.json +1 -1
package/bin/lib/listeners.mjs
CHANGED
|
@@ -40,7 +40,7 @@ const MAX_PIDS = 4000;
|
|
|
40
40
|
* twenty is somebody's docker-compose and the extra rows say nothing. */
|
|
41
41
|
const MAX_ROWS = 8;
|
|
42
42
|
/** Longest process label we relay. */
|
|
43
|
-
const MAX_LABEL =
|
|
43
|
+
const MAX_LABEL = 40;
|
|
44
44
|
|
|
45
45
|
// ── /proc/net/tcp parsing (linux) ──────────────────────────────────────────
|
|
46
46
|
|
|
@@ -83,15 +83,47 @@ function listeningByInode() {
|
|
|
83
83
|
return out;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
/**
|
|
87
|
+
* WHAT TO CALL A LISTENING PROCESS.
|
|
88
|
+
*
|
|
89
|
+
* This used to be `basename(argv[0])`, which names the RUNTIME and not the
|
|
90
|
+
* program — so half the rows in a JavaScript repo read `node` and told the
|
|
91
|
+
* reader nothing about which of their servers this was. The question that
|
|
92
|
+
* changed it: "a non developer wouldnt know what node is or workerd."
|
|
93
|
+
*
|
|
94
|
+
* THE FIX IS NOT A LOOKUP TABLE. Mapping `workerd` → "Cloudflare Worker" is
|
|
95
|
+
* the `DEV_ARGV0` shape: a hardcoded list of tools that is wrong for every
|
|
96
|
+
* stack nobody enumerated, needing a release per ecosystem forever. What is
|
|
97
|
+
* always available instead is argv[1] — the thing the runtime was asked to
|
|
98
|
+
* run — so `node …/node_modules/.bin/vite` becomes `node vite` and
|
|
99
|
+
* `node server.js` becomes `node server.js`. No list, works on every stack.
|
|
100
|
+
*
|
|
101
|
+
* A FLAG IS SKIPPED rather than guessed past: `python3 -m http.server` keeps
|
|
102
|
+
* `python3` instead of claiming to be called `-m`. Only the first two argv
|
|
103
|
+
* elements are ever read — enough to name the program, far short of the whole
|
|
104
|
+
* command line, which is the thing this deliberately does not relay.
|
|
105
|
+
*
|
|
106
|
+
* And this is still only a MEASUREMENT. The name a person gives a share lives
|
|
107
|
+
* on `session_previews.label`, is written by a human PATCH, and is what a
|
|
108
|
+
* teammate actually reads — no amount of argv produces "Storefront".
|
|
109
|
+
*/
|
|
110
|
+
export function labelFromArgv(argv) {
|
|
111
|
+
const base = (v) => (v || '').split('/').pop() || v || '';
|
|
112
|
+
const head = base(argv?.[0]);
|
|
113
|
+
if (!head) return null;
|
|
114
|
+
// argv[1] only when it NAMES something rather than configuring it. A `-`
|
|
115
|
+
// prefix is the one universally reliable tell, and skipping is the honest
|
|
116
|
+
// answer — `python3 -m http.server` keeps `python3` rather than claiming to
|
|
117
|
+
// be called `-m`.
|
|
118
|
+
const next = argv?.[1] && !argv[1].startsWith('-') ? base(argv[1]) : '';
|
|
119
|
+
const label = next && next !== head ? `${head} ${next}` : head;
|
|
120
|
+
return label.slice(0, MAX_LABEL) || null;
|
|
121
|
+
}
|
|
122
|
+
|
|
86
123
|
function labelFor(pid) {
|
|
87
124
|
try {
|
|
88
125
|
const raw = readFileSync(`/proc/${pid}/cmdline`, 'utf8');
|
|
89
|
-
|
|
90
|
-
// The basename only. A full argv is the driver's command line, which can
|
|
91
|
-
// carry a token in an inline env assignment — and the whole argv is never
|
|
92
|
-
// what a reader needs to recognise their own dev server.
|
|
93
|
-
const base = first.split('/').pop() || first;
|
|
94
|
-
return base.slice(0, MAX_LABEL) || null;
|
|
126
|
+
return labelFromArgv(raw.split('\0').filter(Boolean));
|
|
95
127
|
} catch {
|
|
96
128
|
return null;
|
|
97
129
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowviant",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.66.0",
|
|
4
4
|
"description": "Run your own coding CLIs as build agents for Flowviant — Claude Code, Codex or Antigravity, on your own credentials. Holds your sessions, keeps a worktree per tab, and ships branches on your word.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|