diff --git a/js/.changeset/fix-process-name.md b/js/.changeset/fix-process-name.md new file mode 100644 index 0000000..9ab58ff --- /dev/null +++ b/js/.changeset/fix-process-name.md @@ -0,0 +1,8 @@ +--- +'@link-assistant/agent': patch +--- + +Fix process name to show as 'agent' instead of 'bun' in process monitoring tools + +This change sets both process.title and process.argv0 to 'agent' at CLI startup, +ensuring the process appears as 'agent' instead of 'bun' in monitoring tools like top and ps. diff --git a/js/src/index.js b/js/src/index.js index b97b152..bd2f5fc 100755 --- a/js/src/index.js +++ b/js/src/index.js @@ -1,5 +1,10 @@ #!/usr/bin/env bun +// Set process title to 'agent' so it appears correctly in process monitoring tools like top/ps +// Both process.title and process.argv0 need to be set for maximum compatibility +process.title = 'agent'; +process.argv0 = 'agent'; + import { Server } from './server/server.ts'; import { Instance } from './project/instance.ts'; import { Log } from './util/log.ts';