@hasna/conversations 0.1.3 → 0.1.4
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/index.js +386 -5
- package/bin/mcp.js +377 -2
- package/dist/index.js +376 -1
- package/dist/lib/identity.d.ts +11 -1
- package/dist/lib/names.d.ts +6 -0
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -2619,7 +2619,381 @@ var init_projects = __esm(() => {
|
|
|
2619
2619
|
init_db();
|
|
2620
2620
|
});
|
|
2621
2621
|
|
|
2622
|
+
// src/lib/names.ts
|
|
2623
|
+
var AGENT_NAMES;
|
|
2624
|
+
var init_names = __esm(() => {
|
|
2625
|
+
AGENT_NAMES = [
|
|
2626
|
+
"amber-fox",
|
|
2627
|
+
"arctic-wolf",
|
|
2628
|
+
"ashen-crow",
|
|
2629
|
+
"azure-hawk",
|
|
2630
|
+
"astral-lynx",
|
|
2631
|
+
"autumn-bear",
|
|
2632
|
+
"agile-puma",
|
|
2633
|
+
"alpine-ibex",
|
|
2634
|
+
"ancient-owl",
|
|
2635
|
+
"aqua-otter",
|
|
2636
|
+
"arid-viper",
|
|
2637
|
+
"atom-finch",
|
|
2638
|
+
"auburn-deer",
|
|
2639
|
+
"aurora-seal",
|
|
2640
|
+
"avid-mink",
|
|
2641
|
+
"blaze-tiger",
|
|
2642
|
+
"bright-heron",
|
|
2643
|
+
"bronze-eagle",
|
|
2644
|
+
"brisk-hare",
|
|
2645
|
+
"burnt-moth",
|
|
2646
|
+
"bold-raven",
|
|
2647
|
+
"blue-whale",
|
|
2648
|
+
"boreal-fox",
|
|
2649
|
+
"brass-cobra",
|
|
2650
|
+
"brave-ram",
|
|
2651
|
+
"brick-crane",
|
|
2652
|
+
"brief-newt",
|
|
2653
|
+
"briny-crab",
|
|
2654
|
+
"broad-elk",
|
|
2655
|
+
"brook-dove",
|
|
2656
|
+
"calm-panda",
|
|
2657
|
+
"cedar-jay",
|
|
2658
|
+
"chief-lion",
|
|
2659
|
+
"chrome-bat",
|
|
2660
|
+
"civic-wren",
|
|
2661
|
+
"clear-swan",
|
|
2662
|
+
"cliff-goat",
|
|
2663
|
+
"coal-shark",
|
|
2664
|
+
"cold-crane",
|
|
2665
|
+
"copper-jay",
|
|
2666
|
+
"coral-fish",
|
|
2667
|
+
"crisp-lark",
|
|
2668
|
+
"cross-mole",
|
|
2669
|
+
"cubic-wasp",
|
|
2670
|
+
"cyan-toad",
|
|
2671
|
+
"dark-stag",
|
|
2672
|
+
"dawn-robin",
|
|
2673
|
+
"deep-squid",
|
|
2674
|
+
"delta-fox",
|
|
2675
|
+
"dense-boar",
|
|
2676
|
+
"dew-spider",
|
|
2677
|
+
"dim-gecko",
|
|
2678
|
+
"draft-bear",
|
|
2679
|
+
"drift-gull",
|
|
2680
|
+
"dry-newt",
|
|
2681
|
+
"dual-crane",
|
|
2682
|
+
"dune-mouse",
|
|
2683
|
+
"dusk-moth",
|
|
2684
|
+
"dusty-mule",
|
|
2685
|
+
"dwarf-carp",
|
|
2686
|
+
"east-falcon",
|
|
2687
|
+
"echo-parrot",
|
|
2688
|
+
"edge-shark",
|
|
2689
|
+
"elm-beetle",
|
|
2690
|
+
"ember-lynx",
|
|
2691
|
+
"epoch-crane",
|
|
2692
|
+
"even-pike",
|
|
2693
|
+
"extra-ant",
|
|
2694
|
+
"elder-stork",
|
|
2695
|
+
"ebon-crow",
|
|
2696
|
+
"ever-finch",
|
|
2697
|
+
"exact-moth",
|
|
2698
|
+
"exile-wren",
|
|
2699
|
+
"equal-dove",
|
|
2700
|
+
"etch-hare",
|
|
2701
|
+
"faint-orca",
|
|
2702
|
+
"far-condor",
|
|
2703
|
+
"fern-mouse",
|
|
2704
|
+
"fierce-yak",
|
|
2705
|
+
"first-kite",
|
|
2706
|
+
"fjord-seal",
|
|
2707
|
+
"flint-wolf",
|
|
2708
|
+
"fog-parrot",
|
|
2709
|
+
"forge-bull",
|
|
2710
|
+
"fossil-ray",
|
|
2711
|
+
"frank-mink",
|
|
2712
|
+
"free-eagle",
|
|
2713
|
+
"fresh-colt",
|
|
2714
|
+
"frost-bear",
|
|
2715
|
+
"fuse-wasp",
|
|
2716
|
+
"gale-hawk",
|
|
2717
|
+
"gem-turtle",
|
|
2718
|
+
"ghost-lynx",
|
|
2719
|
+
"gilt-robin",
|
|
2720
|
+
"glad-moose",
|
|
2721
|
+
"glass-eel",
|
|
2722
|
+
"gleam-puma",
|
|
2723
|
+
"glyph-owl",
|
|
2724
|
+
"gold-crane",
|
|
2725
|
+
"gorge-lion",
|
|
2726
|
+
"grain-duck",
|
|
2727
|
+
"grand-wolf",
|
|
2728
|
+
"gray-fox",
|
|
2729
|
+
"green-hare",
|
|
2730
|
+
"grit-shark",
|
|
2731
|
+
"half-stork",
|
|
2732
|
+
"haze-panther",
|
|
2733
|
+
"heart-dove",
|
|
2734
|
+
"helm-eagle",
|
|
2735
|
+
"herb-toad",
|
|
2736
|
+
"hex-spider",
|
|
2737
|
+
"high-falcon",
|
|
2738
|
+
"hive-hornet",
|
|
2739
|
+
"holo-swan",
|
|
2740
|
+
"hood-cobra",
|
|
2741
|
+
"horn-bison",
|
|
2742
|
+
"huge-squid",
|
|
2743
|
+
"hull-crab",
|
|
2744
|
+
"hunt-marten",
|
|
2745
|
+
"husk-moth",
|
|
2746
|
+
"ice-leopard",
|
|
2747
|
+
"idle-crane",
|
|
2748
|
+
"inch-beetle",
|
|
2749
|
+
"indigo-jay",
|
|
2750
|
+
"inner-fox",
|
|
2751
|
+
"ion-parrot",
|
|
2752
|
+
"iron-bull",
|
|
2753
|
+
"isle-pelican",
|
|
2754
|
+
"ivory-hawk",
|
|
2755
|
+
"ivy-snake",
|
|
2756
|
+
"iota-wren",
|
|
2757
|
+
"ink-raven",
|
|
2758
|
+
"ignite-ram",
|
|
2759
|
+
"inert-slug",
|
|
2760
|
+
"infra-mole",
|
|
2761
|
+
"jade-tiger",
|
|
2762
|
+
"jest-magpie",
|
|
2763
|
+
"jewel-crane",
|
|
2764
|
+
"joint-boar",
|
|
2765
|
+
"jovial-elk",
|
|
2766
|
+
"jump-frog",
|
|
2767
|
+
"jungle-cat",
|
|
2768
|
+
"jury-dove",
|
|
2769
|
+
"just-heron",
|
|
2770
|
+
"jolt-wasp",
|
|
2771
|
+
"keen-osprey",
|
|
2772
|
+
"kelp-seal",
|
|
2773
|
+
"key-falcon",
|
|
2774
|
+
"kind-panda",
|
|
2775
|
+
"knot-viper",
|
|
2776
|
+
"kraft-bear",
|
|
2777
|
+
"kite-mouse",
|
|
2778
|
+
"knoll-deer",
|
|
2779
|
+
"know-crane",
|
|
2780
|
+
"karma-wolf",
|
|
2781
|
+
"lake-otter",
|
|
2782
|
+
"lapis-jay",
|
|
2783
|
+
"last-condor",
|
|
2784
|
+
"leaf-gecko",
|
|
2785
|
+
"lean-coyote",
|
|
2786
|
+
"light-lynx",
|
|
2787
|
+
"lime-parrot",
|
|
2788
|
+
"live-eagle",
|
|
2789
|
+
"long-crane",
|
|
2790
|
+
"lost-fox",
|
|
2791
|
+
"loud-finch",
|
|
2792
|
+
"low-shark",
|
|
2793
|
+
"luck-rabbit",
|
|
2794
|
+
"lunar-owl",
|
|
2795
|
+
"lush-ibis",
|
|
2796
|
+
"malt-badger",
|
|
2797
|
+
"maple-wren",
|
|
2798
|
+
"mars-falcon",
|
|
2799
|
+
"matte-crow",
|
|
2800
|
+
"mesa-hawk",
|
|
2801
|
+
"mild-orca",
|
|
2802
|
+
"mint-dove",
|
|
2803
|
+
"mist-puma",
|
|
2804
|
+
"mock-robin",
|
|
2805
|
+
"mono-wolf",
|
|
2806
|
+
"moon-bear",
|
|
2807
|
+
"moss-turtle",
|
|
2808
|
+
"mud-heron",
|
|
2809
|
+
"mute-swan",
|
|
2810
|
+
"myth-lynx",
|
|
2811
|
+
"navy-eagle",
|
|
2812
|
+
"near-mink",
|
|
2813
|
+
"neon-parrot",
|
|
2814
|
+
"nest-crane",
|
|
2815
|
+
"next-fox",
|
|
2816
|
+
"nimble-ram",
|
|
2817
|
+
"node-spider",
|
|
2818
|
+
"noon-hawk",
|
|
2819
|
+
"north-seal",
|
|
2820
|
+
"nova-owl",
|
|
2821
|
+
"null-moth",
|
|
2822
|
+
"numb-carp",
|
|
2823
|
+
"nutmeg-jay",
|
|
2824
|
+
"neat-cobra",
|
|
2825
|
+
"nomad-elk",
|
|
2826
|
+
"oak-badger",
|
|
2827
|
+
"oat-finch",
|
|
2828
|
+
"odd-pelican",
|
|
2829
|
+
"olive-bear",
|
|
2830
|
+
"onyx-raven",
|
|
2831
|
+
"opal-crane",
|
|
2832
|
+
"open-wolf",
|
|
2833
|
+
"orbit-lynx",
|
|
2834
|
+
"ore-shark",
|
|
2835
|
+
"outer-dove",
|
|
2836
|
+
"pale-tiger",
|
|
2837
|
+
"park-heron",
|
|
2838
|
+
"peak-eagle",
|
|
2839
|
+
"pine-fox",
|
|
2840
|
+
"pixel-owl",
|
|
2841
|
+
"plain-goat",
|
|
2842
|
+
"plum-crane",
|
|
2843
|
+
"polar-ray",
|
|
2844
|
+
"port-falcon",
|
|
2845
|
+
"prime-wolf",
|
|
2846
|
+
"prism-jay",
|
|
2847
|
+
"proud-lion",
|
|
2848
|
+
"pulse-bat",
|
|
2849
|
+
"pure-swan",
|
|
2850
|
+
"pyro-hawk",
|
|
2851
|
+
"quake-bear",
|
|
2852
|
+
"quartz-jay",
|
|
2853
|
+
"quest-falcon",
|
|
2854
|
+
"quick-otter",
|
|
2855
|
+
"quiet-crane",
|
|
2856
|
+
"rain-leopard",
|
|
2857
|
+
"rapid-hare",
|
|
2858
|
+
"raw-condor",
|
|
2859
|
+
"reef-dolphin",
|
|
2860
|
+
"regal-stag",
|
|
2861
|
+
"ridge-fox",
|
|
2862
|
+
"rift-cobra",
|
|
2863
|
+
"rigid-crane",
|
|
2864
|
+
"river-otter",
|
|
2865
|
+
"rock-eagle",
|
|
2866
|
+
"root-mole",
|
|
2867
|
+
"rose-finch",
|
|
2868
|
+
"rough-boar",
|
|
2869
|
+
"ruby-hawk",
|
|
2870
|
+
"rust-wolf",
|
|
2871
|
+
"sage-owl",
|
|
2872
|
+
"salt-crane",
|
|
2873
|
+
"sand-viper",
|
|
2874
|
+
"satin-dove",
|
|
2875
|
+
"scale-dragon",
|
|
2876
|
+
"scarlet-ibis",
|
|
2877
|
+
"sea-falcon",
|
|
2878
|
+
"shade-lynx",
|
|
2879
|
+
"sharp-eagle",
|
|
2880
|
+
"shell-crab",
|
|
2881
|
+
"short-fox",
|
|
2882
|
+
"sigma-jay",
|
|
2883
|
+
"silk-moth",
|
|
2884
|
+
"silver-wolf",
|
|
2885
|
+
"slate-bear",
|
|
2886
|
+
"slim-heron",
|
|
2887
|
+
"smoke-puma",
|
|
2888
|
+
"snap-turtle",
|
|
2889
|
+
"snow-leopard",
|
|
2890
|
+
"solar-crane",
|
|
2891
|
+
"solid-ram",
|
|
2892
|
+
"sonic-bat",
|
|
2893
|
+
"south-seal",
|
|
2894
|
+
"spark-robin",
|
|
2895
|
+
"spice-wren",
|
|
2896
|
+
"split-mink",
|
|
2897
|
+
"spring-elk",
|
|
2898
|
+
"squid-ink",
|
|
2899
|
+
"stark-crow",
|
|
2900
|
+
"steel-hawk",
|
|
2901
|
+
"stern-bull",
|
|
2902
|
+
"still-swan",
|
|
2903
|
+
"stone-fox",
|
|
2904
|
+
"storm-eagle",
|
|
2905
|
+
"stout-boar",
|
|
2906
|
+
"stray-cat",
|
|
2907
|
+
"strong-lion",
|
|
2908
|
+
"sun-parrot",
|
|
2909
|
+
"surf-dolphin",
|
|
2910
|
+
"swift-deer",
|
|
2911
|
+
"teal-crane",
|
|
2912
|
+
"terra-wolf",
|
|
2913
|
+
"thick-bear",
|
|
2914
|
+
"thin-spider",
|
|
2915
|
+
"third-owl",
|
|
2916
|
+
"thorn-fox",
|
|
2917
|
+
"tide-seal",
|
|
2918
|
+
"timber-jay",
|
|
2919
|
+
"tiny-wren",
|
|
2920
|
+
"toast-mole",
|
|
2921
|
+
"topaz-hawk",
|
|
2922
|
+
"torch-lynx",
|
|
2923
|
+
"trace-falcon",
|
|
2924
|
+
"true-eagle",
|
|
2925
|
+
"tusk-walrus",
|
|
2926
|
+
"ultra-crane",
|
|
2927
|
+
"umbra-wolf",
|
|
2928
|
+
"unit-fox",
|
|
2929
|
+
"upper-hawk",
|
|
2930
|
+
"urban-jay",
|
|
2931
|
+
"vale-deer",
|
|
2932
|
+
"vast-eagle",
|
|
2933
|
+
"vault-bear",
|
|
2934
|
+
"velvet-owl",
|
|
2935
|
+
"vent-crane",
|
|
2936
|
+
"verse-fox",
|
|
2937
|
+
"vigor-lynx",
|
|
2938
|
+
"vine-parrot",
|
|
2939
|
+
"vivid-swan",
|
|
2940
|
+
"void-raven",
|
|
2941
|
+
"volt-hawk",
|
|
2942
|
+
"vow-falcon",
|
|
2943
|
+
"vintage-jay",
|
|
2944
|
+
"vista-wolf",
|
|
2945
|
+
"vital-hare",
|
|
2946
|
+
"warm-otter",
|
|
2947
|
+
"wave-dolphin",
|
|
2948
|
+
"wax-crane",
|
|
2949
|
+
"west-falcon",
|
|
2950
|
+
"wheat-mouse",
|
|
2951
|
+
"white-tiger",
|
|
2952
|
+
"wide-eagle",
|
|
2953
|
+
"wild-fox",
|
|
2954
|
+
"wind-hawk",
|
|
2955
|
+
"wire-spider",
|
|
2956
|
+
"wise-owl",
|
|
2957
|
+
"wood-thrush",
|
|
2958
|
+
"wool-ram",
|
|
2959
|
+
"wren-song",
|
|
2960
|
+
"wry-crow",
|
|
2961
|
+
"xeno-crane",
|
|
2962
|
+
"xerus-fox",
|
|
2963
|
+
"yarn-robin",
|
|
2964
|
+
"yew-falcon",
|
|
2965
|
+
"young-wolf",
|
|
2966
|
+
"zeal-hawk",
|
|
2967
|
+
"zen-panda",
|
|
2968
|
+
"zero-crane",
|
|
2969
|
+
"zinc-eagle",
|
|
2970
|
+
"zone-fox"
|
|
2971
|
+
];
|
|
2972
|
+
});
|
|
2973
|
+
|
|
2622
2974
|
// src/lib/identity.ts
|
|
2975
|
+
import { readFileSync, writeFileSync, mkdirSync as mkdirSync2 } from "fs";
|
|
2976
|
+
import { join as join2, dirname as dirname2 } from "path";
|
|
2977
|
+
import { homedir as homedir2 } from "os";
|
|
2978
|
+
function getAutoName() {
|
|
2979
|
+
if (cachedAutoName)
|
|
2980
|
+
return cachedAutoName;
|
|
2981
|
+
try {
|
|
2982
|
+
const name2 = readFileSync(AGENT_ID_FILE, "utf-8").trim();
|
|
2983
|
+
if (name2) {
|
|
2984
|
+
cachedAutoName = name2;
|
|
2985
|
+
return name2;
|
|
2986
|
+
}
|
|
2987
|
+
} catch {}
|
|
2988
|
+
const name = AGENT_NAMES[Math.floor(Math.random() * AGENT_NAMES.length)];
|
|
2989
|
+
cachedAutoName = name;
|
|
2990
|
+
try {
|
|
2991
|
+
mkdirSync2(dirname2(AGENT_ID_FILE), { recursive: true });
|
|
2992
|
+
writeFileSync(AGENT_ID_FILE, name + `
|
|
2993
|
+
`, "utf-8");
|
|
2994
|
+
} catch {}
|
|
2995
|
+
return name;
|
|
2996
|
+
}
|
|
2623
2997
|
function resolveIdentity(explicit) {
|
|
2624
2998
|
const explicitValue = explicit?.trim();
|
|
2625
2999
|
if (explicitValue)
|
|
@@ -2627,8 +3001,13 @@ function resolveIdentity(explicit) {
|
|
|
2627
3001
|
const envValue = process.env.CONVERSATIONS_AGENT_ID?.trim();
|
|
2628
3002
|
if (envValue)
|
|
2629
3003
|
return envValue;
|
|
2630
|
-
return
|
|
3004
|
+
return getAutoName();
|
|
2631
3005
|
}
|
|
3006
|
+
var AGENT_ID_FILE, cachedAutoName = null;
|
|
3007
|
+
var init_identity = __esm(() => {
|
|
3008
|
+
init_names();
|
|
3009
|
+
AGENT_ID_FILE = join2(homedir2(), ".conversations", "agent-id");
|
|
3010
|
+
});
|
|
2632
3011
|
|
|
2633
3012
|
// src/lib/presence.ts
|
|
2634
3013
|
function parsePresence(row) {
|
|
@@ -2685,7 +3064,7 @@ var init_presence = __esm(() => {
|
|
|
2685
3064
|
var require_package = __commonJS((exports, module) => {
|
|
2686
3065
|
module.exports = {
|
|
2687
3066
|
name: "@hasna/conversations",
|
|
2688
|
-
version: "0.1.
|
|
3067
|
+
version: "0.1.4",
|
|
2689
3068
|
description: "Real-time CLI messaging for AI agents",
|
|
2690
3069
|
type: "module",
|
|
2691
3070
|
bin: {
|
|
@@ -31643,6 +32022,7 @@ var init_mcp2 = __esm(() => {
|
|
|
31643
32022
|
init_sessions();
|
|
31644
32023
|
init_spaces();
|
|
31645
32024
|
init_projects();
|
|
32025
|
+
init_identity();
|
|
31646
32026
|
init_presence();
|
|
31647
32027
|
import__package = __toESM(require_package(), 1);
|
|
31648
32028
|
server = new McpServer({
|
|
@@ -32342,7 +32722,7 @@ var exports_serve = {};
|
|
|
32342
32722
|
__export(exports_serve, {
|
|
32343
32723
|
startDashboardServer: () => startDashboardServer
|
|
32344
32724
|
});
|
|
32345
|
-
import { join as
|
|
32725
|
+
import { join as join3, resolve, sep } from "path";
|
|
32346
32726
|
import { existsSync } from "fs";
|
|
32347
32727
|
function securityHeaders(base) {
|
|
32348
32728
|
const headers = new Headers(base);
|
|
@@ -32413,7 +32793,7 @@ function isSameOrigin(req) {
|
|
|
32413
32793
|
function startDashboardServer(port = 3456, host) {
|
|
32414
32794
|
const resolvedPort = normalizePort(port, 3456);
|
|
32415
32795
|
const resolvedHost = normalizeHost(host ?? process.env.CONVERSATIONS_DASHBOARD_HOST);
|
|
32416
|
-
const dashboardDist =
|
|
32796
|
+
const dashboardDist = join3(import.meta.dir, "../../dashboard/dist");
|
|
32417
32797
|
const hasDist = existsSync(dashboardDist);
|
|
32418
32798
|
const server2 = Bun.serve({
|
|
32419
32799
|
port: resolvedPort,
|
|
@@ -32797,7 +33177,7 @@ function startDashboardServer(port = 3456, host) {
|
|
|
32797
33177
|
headers.set("Content-Type", file2.type);
|
|
32798
33178
|
return new Response(file2, { headers });
|
|
32799
33179
|
}
|
|
32800
|
-
file2 = Bun.file(
|
|
33180
|
+
file2 = Bun.file(join3(dashboardDist, "index.html"));
|
|
32801
33181
|
if (await file2.exists()) {
|
|
32802
33182
|
const headers = securityHeaders();
|
|
32803
33183
|
if (file2.type)
|
|
@@ -32851,6 +33231,7 @@ init_sessions();
|
|
|
32851
33231
|
init_spaces();
|
|
32852
33232
|
init_projects();
|
|
32853
33233
|
init_db();
|
|
33234
|
+
init_identity();
|
|
32854
33235
|
init_presence();
|
|
32855
33236
|
import chalk2 from "chalk";
|
|
32856
33237
|
import { render } from "ink";
|
package/bin/mcp.js
CHANGED
|
@@ -29033,6 +29033,381 @@ function deleteProject(id) {
|
|
|
29033
29033
|
}
|
|
29034
29034
|
|
|
29035
29035
|
// src/lib/identity.ts
|
|
29036
|
+
import { readFileSync, writeFileSync, mkdirSync as mkdirSync2 } from "fs";
|
|
29037
|
+
import { join as join2, dirname as dirname2 } from "path";
|
|
29038
|
+
import { homedir as homedir2 } from "os";
|
|
29039
|
+
|
|
29040
|
+
// src/lib/names.ts
|
|
29041
|
+
var AGENT_NAMES = [
|
|
29042
|
+
"amber-fox",
|
|
29043
|
+
"arctic-wolf",
|
|
29044
|
+
"ashen-crow",
|
|
29045
|
+
"azure-hawk",
|
|
29046
|
+
"astral-lynx",
|
|
29047
|
+
"autumn-bear",
|
|
29048
|
+
"agile-puma",
|
|
29049
|
+
"alpine-ibex",
|
|
29050
|
+
"ancient-owl",
|
|
29051
|
+
"aqua-otter",
|
|
29052
|
+
"arid-viper",
|
|
29053
|
+
"atom-finch",
|
|
29054
|
+
"auburn-deer",
|
|
29055
|
+
"aurora-seal",
|
|
29056
|
+
"avid-mink",
|
|
29057
|
+
"blaze-tiger",
|
|
29058
|
+
"bright-heron",
|
|
29059
|
+
"bronze-eagle",
|
|
29060
|
+
"brisk-hare",
|
|
29061
|
+
"burnt-moth",
|
|
29062
|
+
"bold-raven",
|
|
29063
|
+
"blue-whale",
|
|
29064
|
+
"boreal-fox",
|
|
29065
|
+
"brass-cobra",
|
|
29066
|
+
"brave-ram",
|
|
29067
|
+
"brick-crane",
|
|
29068
|
+
"brief-newt",
|
|
29069
|
+
"briny-crab",
|
|
29070
|
+
"broad-elk",
|
|
29071
|
+
"brook-dove",
|
|
29072
|
+
"calm-panda",
|
|
29073
|
+
"cedar-jay",
|
|
29074
|
+
"chief-lion",
|
|
29075
|
+
"chrome-bat",
|
|
29076
|
+
"civic-wren",
|
|
29077
|
+
"clear-swan",
|
|
29078
|
+
"cliff-goat",
|
|
29079
|
+
"coal-shark",
|
|
29080
|
+
"cold-crane",
|
|
29081
|
+
"copper-jay",
|
|
29082
|
+
"coral-fish",
|
|
29083
|
+
"crisp-lark",
|
|
29084
|
+
"cross-mole",
|
|
29085
|
+
"cubic-wasp",
|
|
29086
|
+
"cyan-toad",
|
|
29087
|
+
"dark-stag",
|
|
29088
|
+
"dawn-robin",
|
|
29089
|
+
"deep-squid",
|
|
29090
|
+
"delta-fox",
|
|
29091
|
+
"dense-boar",
|
|
29092
|
+
"dew-spider",
|
|
29093
|
+
"dim-gecko",
|
|
29094
|
+
"draft-bear",
|
|
29095
|
+
"drift-gull",
|
|
29096
|
+
"dry-newt",
|
|
29097
|
+
"dual-crane",
|
|
29098
|
+
"dune-mouse",
|
|
29099
|
+
"dusk-moth",
|
|
29100
|
+
"dusty-mule",
|
|
29101
|
+
"dwarf-carp",
|
|
29102
|
+
"east-falcon",
|
|
29103
|
+
"echo-parrot",
|
|
29104
|
+
"edge-shark",
|
|
29105
|
+
"elm-beetle",
|
|
29106
|
+
"ember-lynx",
|
|
29107
|
+
"epoch-crane",
|
|
29108
|
+
"even-pike",
|
|
29109
|
+
"extra-ant",
|
|
29110
|
+
"elder-stork",
|
|
29111
|
+
"ebon-crow",
|
|
29112
|
+
"ever-finch",
|
|
29113
|
+
"exact-moth",
|
|
29114
|
+
"exile-wren",
|
|
29115
|
+
"equal-dove",
|
|
29116
|
+
"etch-hare",
|
|
29117
|
+
"faint-orca",
|
|
29118
|
+
"far-condor",
|
|
29119
|
+
"fern-mouse",
|
|
29120
|
+
"fierce-yak",
|
|
29121
|
+
"first-kite",
|
|
29122
|
+
"fjord-seal",
|
|
29123
|
+
"flint-wolf",
|
|
29124
|
+
"fog-parrot",
|
|
29125
|
+
"forge-bull",
|
|
29126
|
+
"fossil-ray",
|
|
29127
|
+
"frank-mink",
|
|
29128
|
+
"free-eagle",
|
|
29129
|
+
"fresh-colt",
|
|
29130
|
+
"frost-bear",
|
|
29131
|
+
"fuse-wasp",
|
|
29132
|
+
"gale-hawk",
|
|
29133
|
+
"gem-turtle",
|
|
29134
|
+
"ghost-lynx",
|
|
29135
|
+
"gilt-robin",
|
|
29136
|
+
"glad-moose",
|
|
29137
|
+
"glass-eel",
|
|
29138
|
+
"gleam-puma",
|
|
29139
|
+
"glyph-owl",
|
|
29140
|
+
"gold-crane",
|
|
29141
|
+
"gorge-lion",
|
|
29142
|
+
"grain-duck",
|
|
29143
|
+
"grand-wolf",
|
|
29144
|
+
"gray-fox",
|
|
29145
|
+
"green-hare",
|
|
29146
|
+
"grit-shark",
|
|
29147
|
+
"half-stork",
|
|
29148
|
+
"haze-panther",
|
|
29149
|
+
"heart-dove",
|
|
29150
|
+
"helm-eagle",
|
|
29151
|
+
"herb-toad",
|
|
29152
|
+
"hex-spider",
|
|
29153
|
+
"high-falcon",
|
|
29154
|
+
"hive-hornet",
|
|
29155
|
+
"holo-swan",
|
|
29156
|
+
"hood-cobra",
|
|
29157
|
+
"horn-bison",
|
|
29158
|
+
"huge-squid",
|
|
29159
|
+
"hull-crab",
|
|
29160
|
+
"hunt-marten",
|
|
29161
|
+
"husk-moth",
|
|
29162
|
+
"ice-leopard",
|
|
29163
|
+
"idle-crane",
|
|
29164
|
+
"inch-beetle",
|
|
29165
|
+
"indigo-jay",
|
|
29166
|
+
"inner-fox",
|
|
29167
|
+
"ion-parrot",
|
|
29168
|
+
"iron-bull",
|
|
29169
|
+
"isle-pelican",
|
|
29170
|
+
"ivory-hawk",
|
|
29171
|
+
"ivy-snake",
|
|
29172
|
+
"iota-wren",
|
|
29173
|
+
"ink-raven",
|
|
29174
|
+
"ignite-ram",
|
|
29175
|
+
"inert-slug",
|
|
29176
|
+
"infra-mole",
|
|
29177
|
+
"jade-tiger",
|
|
29178
|
+
"jest-magpie",
|
|
29179
|
+
"jewel-crane",
|
|
29180
|
+
"joint-boar",
|
|
29181
|
+
"jovial-elk",
|
|
29182
|
+
"jump-frog",
|
|
29183
|
+
"jungle-cat",
|
|
29184
|
+
"jury-dove",
|
|
29185
|
+
"just-heron",
|
|
29186
|
+
"jolt-wasp",
|
|
29187
|
+
"keen-osprey",
|
|
29188
|
+
"kelp-seal",
|
|
29189
|
+
"key-falcon",
|
|
29190
|
+
"kind-panda",
|
|
29191
|
+
"knot-viper",
|
|
29192
|
+
"kraft-bear",
|
|
29193
|
+
"kite-mouse",
|
|
29194
|
+
"knoll-deer",
|
|
29195
|
+
"know-crane",
|
|
29196
|
+
"karma-wolf",
|
|
29197
|
+
"lake-otter",
|
|
29198
|
+
"lapis-jay",
|
|
29199
|
+
"last-condor",
|
|
29200
|
+
"leaf-gecko",
|
|
29201
|
+
"lean-coyote",
|
|
29202
|
+
"light-lynx",
|
|
29203
|
+
"lime-parrot",
|
|
29204
|
+
"live-eagle",
|
|
29205
|
+
"long-crane",
|
|
29206
|
+
"lost-fox",
|
|
29207
|
+
"loud-finch",
|
|
29208
|
+
"low-shark",
|
|
29209
|
+
"luck-rabbit",
|
|
29210
|
+
"lunar-owl",
|
|
29211
|
+
"lush-ibis",
|
|
29212
|
+
"malt-badger",
|
|
29213
|
+
"maple-wren",
|
|
29214
|
+
"mars-falcon",
|
|
29215
|
+
"matte-crow",
|
|
29216
|
+
"mesa-hawk",
|
|
29217
|
+
"mild-orca",
|
|
29218
|
+
"mint-dove",
|
|
29219
|
+
"mist-puma",
|
|
29220
|
+
"mock-robin",
|
|
29221
|
+
"mono-wolf",
|
|
29222
|
+
"moon-bear",
|
|
29223
|
+
"moss-turtle",
|
|
29224
|
+
"mud-heron",
|
|
29225
|
+
"mute-swan",
|
|
29226
|
+
"myth-lynx",
|
|
29227
|
+
"navy-eagle",
|
|
29228
|
+
"near-mink",
|
|
29229
|
+
"neon-parrot",
|
|
29230
|
+
"nest-crane",
|
|
29231
|
+
"next-fox",
|
|
29232
|
+
"nimble-ram",
|
|
29233
|
+
"node-spider",
|
|
29234
|
+
"noon-hawk",
|
|
29235
|
+
"north-seal",
|
|
29236
|
+
"nova-owl",
|
|
29237
|
+
"null-moth",
|
|
29238
|
+
"numb-carp",
|
|
29239
|
+
"nutmeg-jay",
|
|
29240
|
+
"neat-cobra",
|
|
29241
|
+
"nomad-elk",
|
|
29242
|
+
"oak-badger",
|
|
29243
|
+
"oat-finch",
|
|
29244
|
+
"odd-pelican",
|
|
29245
|
+
"olive-bear",
|
|
29246
|
+
"onyx-raven",
|
|
29247
|
+
"opal-crane",
|
|
29248
|
+
"open-wolf",
|
|
29249
|
+
"orbit-lynx",
|
|
29250
|
+
"ore-shark",
|
|
29251
|
+
"outer-dove",
|
|
29252
|
+
"pale-tiger",
|
|
29253
|
+
"park-heron",
|
|
29254
|
+
"peak-eagle",
|
|
29255
|
+
"pine-fox",
|
|
29256
|
+
"pixel-owl",
|
|
29257
|
+
"plain-goat",
|
|
29258
|
+
"plum-crane",
|
|
29259
|
+
"polar-ray",
|
|
29260
|
+
"port-falcon",
|
|
29261
|
+
"prime-wolf",
|
|
29262
|
+
"prism-jay",
|
|
29263
|
+
"proud-lion",
|
|
29264
|
+
"pulse-bat",
|
|
29265
|
+
"pure-swan",
|
|
29266
|
+
"pyro-hawk",
|
|
29267
|
+
"quake-bear",
|
|
29268
|
+
"quartz-jay",
|
|
29269
|
+
"quest-falcon",
|
|
29270
|
+
"quick-otter",
|
|
29271
|
+
"quiet-crane",
|
|
29272
|
+
"rain-leopard",
|
|
29273
|
+
"rapid-hare",
|
|
29274
|
+
"raw-condor",
|
|
29275
|
+
"reef-dolphin",
|
|
29276
|
+
"regal-stag",
|
|
29277
|
+
"ridge-fox",
|
|
29278
|
+
"rift-cobra",
|
|
29279
|
+
"rigid-crane",
|
|
29280
|
+
"river-otter",
|
|
29281
|
+
"rock-eagle",
|
|
29282
|
+
"root-mole",
|
|
29283
|
+
"rose-finch",
|
|
29284
|
+
"rough-boar",
|
|
29285
|
+
"ruby-hawk",
|
|
29286
|
+
"rust-wolf",
|
|
29287
|
+
"sage-owl",
|
|
29288
|
+
"salt-crane",
|
|
29289
|
+
"sand-viper",
|
|
29290
|
+
"satin-dove",
|
|
29291
|
+
"scale-dragon",
|
|
29292
|
+
"scarlet-ibis",
|
|
29293
|
+
"sea-falcon",
|
|
29294
|
+
"shade-lynx",
|
|
29295
|
+
"sharp-eagle",
|
|
29296
|
+
"shell-crab",
|
|
29297
|
+
"short-fox",
|
|
29298
|
+
"sigma-jay",
|
|
29299
|
+
"silk-moth",
|
|
29300
|
+
"silver-wolf",
|
|
29301
|
+
"slate-bear",
|
|
29302
|
+
"slim-heron",
|
|
29303
|
+
"smoke-puma",
|
|
29304
|
+
"snap-turtle",
|
|
29305
|
+
"snow-leopard",
|
|
29306
|
+
"solar-crane",
|
|
29307
|
+
"solid-ram",
|
|
29308
|
+
"sonic-bat",
|
|
29309
|
+
"south-seal",
|
|
29310
|
+
"spark-robin",
|
|
29311
|
+
"spice-wren",
|
|
29312
|
+
"split-mink",
|
|
29313
|
+
"spring-elk",
|
|
29314
|
+
"squid-ink",
|
|
29315
|
+
"stark-crow",
|
|
29316
|
+
"steel-hawk",
|
|
29317
|
+
"stern-bull",
|
|
29318
|
+
"still-swan",
|
|
29319
|
+
"stone-fox",
|
|
29320
|
+
"storm-eagle",
|
|
29321
|
+
"stout-boar",
|
|
29322
|
+
"stray-cat",
|
|
29323
|
+
"strong-lion",
|
|
29324
|
+
"sun-parrot",
|
|
29325
|
+
"surf-dolphin",
|
|
29326
|
+
"swift-deer",
|
|
29327
|
+
"teal-crane",
|
|
29328
|
+
"terra-wolf",
|
|
29329
|
+
"thick-bear",
|
|
29330
|
+
"thin-spider",
|
|
29331
|
+
"third-owl",
|
|
29332
|
+
"thorn-fox",
|
|
29333
|
+
"tide-seal",
|
|
29334
|
+
"timber-jay",
|
|
29335
|
+
"tiny-wren",
|
|
29336
|
+
"toast-mole",
|
|
29337
|
+
"topaz-hawk",
|
|
29338
|
+
"torch-lynx",
|
|
29339
|
+
"trace-falcon",
|
|
29340
|
+
"true-eagle",
|
|
29341
|
+
"tusk-walrus",
|
|
29342
|
+
"ultra-crane",
|
|
29343
|
+
"umbra-wolf",
|
|
29344
|
+
"unit-fox",
|
|
29345
|
+
"upper-hawk",
|
|
29346
|
+
"urban-jay",
|
|
29347
|
+
"vale-deer",
|
|
29348
|
+
"vast-eagle",
|
|
29349
|
+
"vault-bear",
|
|
29350
|
+
"velvet-owl",
|
|
29351
|
+
"vent-crane",
|
|
29352
|
+
"verse-fox",
|
|
29353
|
+
"vigor-lynx",
|
|
29354
|
+
"vine-parrot",
|
|
29355
|
+
"vivid-swan",
|
|
29356
|
+
"void-raven",
|
|
29357
|
+
"volt-hawk",
|
|
29358
|
+
"vow-falcon",
|
|
29359
|
+
"vintage-jay",
|
|
29360
|
+
"vista-wolf",
|
|
29361
|
+
"vital-hare",
|
|
29362
|
+
"warm-otter",
|
|
29363
|
+
"wave-dolphin",
|
|
29364
|
+
"wax-crane",
|
|
29365
|
+
"west-falcon",
|
|
29366
|
+
"wheat-mouse",
|
|
29367
|
+
"white-tiger",
|
|
29368
|
+
"wide-eagle",
|
|
29369
|
+
"wild-fox",
|
|
29370
|
+
"wind-hawk",
|
|
29371
|
+
"wire-spider",
|
|
29372
|
+
"wise-owl",
|
|
29373
|
+
"wood-thrush",
|
|
29374
|
+
"wool-ram",
|
|
29375
|
+
"wren-song",
|
|
29376
|
+
"wry-crow",
|
|
29377
|
+
"xeno-crane",
|
|
29378
|
+
"xerus-fox",
|
|
29379
|
+
"yarn-robin",
|
|
29380
|
+
"yew-falcon",
|
|
29381
|
+
"young-wolf",
|
|
29382
|
+
"zeal-hawk",
|
|
29383
|
+
"zen-panda",
|
|
29384
|
+
"zero-crane",
|
|
29385
|
+
"zinc-eagle",
|
|
29386
|
+
"zone-fox"
|
|
29387
|
+
];
|
|
29388
|
+
|
|
29389
|
+
// src/lib/identity.ts
|
|
29390
|
+
var AGENT_ID_FILE = join2(homedir2(), ".conversations", "agent-id");
|
|
29391
|
+
var cachedAutoName = null;
|
|
29392
|
+
function getAutoName() {
|
|
29393
|
+
if (cachedAutoName)
|
|
29394
|
+
return cachedAutoName;
|
|
29395
|
+
try {
|
|
29396
|
+
const name2 = readFileSync(AGENT_ID_FILE, "utf-8").trim();
|
|
29397
|
+
if (name2) {
|
|
29398
|
+
cachedAutoName = name2;
|
|
29399
|
+
return name2;
|
|
29400
|
+
}
|
|
29401
|
+
} catch {}
|
|
29402
|
+
const name = AGENT_NAMES[Math.floor(Math.random() * AGENT_NAMES.length)];
|
|
29403
|
+
cachedAutoName = name;
|
|
29404
|
+
try {
|
|
29405
|
+
mkdirSync2(dirname2(AGENT_ID_FILE), { recursive: true });
|
|
29406
|
+
writeFileSync(AGENT_ID_FILE, name + `
|
|
29407
|
+
`, "utf-8");
|
|
29408
|
+
} catch {}
|
|
29409
|
+
return name;
|
|
29410
|
+
}
|
|
29036
29411
|
function resolveIdentity(explicit) {
|
|
29037
29412
|
const explicitValue = explicit?.trim();
|
|
29038
29413
|
if (explicitValue)
|
|
@@ -29040,7 +29415,7 @@ function resolveIdentity(explicit) {
|
|
|
29040
29415
|
const envValue = process.env.CONVERSATIONS_AGENT_ID?.trim();
|
|
29041
29416
|
if (envValue)
|
|
29042
29417
|
return envValue;
|
|
29043
|
-
return
|
|
29418
|
+
return getAutoName();
|
|
29044
29419
|
}
|
|
29045
29420
|
|
|
29046
29421
|
// src/lib/presence.ts
|
|
@@ -29093,7 +29468,7 @@ function listAgents(opts) {
|
|
|
29093
29468
|
// package.json
|
|
29094
29469
|
var package_default = {
|
|
29095
29470
|
name: "@hasna/conversations",
|
|
29096
|
-
version: "0.1.
|
|
29471
|
+
version: "0.1.4",
|
|
29097
29472
|
description: "Real-time CLI messaging for AI agents",
|
|
29098
29473
|
type: "module",
|
|
29099
29474
|
bin: {
|
package/dist/index.js
CHANGED
|
@@ -2661,6 +2661,381 @@ function useSpaceMessages(spaceName) {
|
|
|
2661
2661
|
return messages;
|
|
2662
2662
|
}
|
|
2663
2663
|
// src/lib/identity.ts
|
|
2664
|
+
import { readFileSync, writeFileSync, mkdirSync as mkdirSync2 } from "fs";
|
|
2665
|
+
import { join as join2, dirname as dirname2 } from "path";
|
|
2666
|
+
import { homedir as homedir2 } from "os";
|
|
2667
|
+
|
|
2668
|
+
// src/lib/names.ts
|
|
2669
|
+
var AGENT_NAMES = [
|
|
2670
|
+
"amber-fox",
|
|
2671
|
+
"arctic-wolf",
|
|
2672
|
+
"ashen-crow",
|
|
2673
|
+
"azure-hawk",
|
|
2674
|
+
"astral-lynx",
|
|
2675
|
+
"autumn-bear",
|
|
2676
|
+
"agile-puma",
|
|
2677
|
+
"alpine-ibex",
|
|
2678
|
+
"ancient-owl",
|
|
2679
|
+
"aqua-otter",
|
|
2680
|
+
"arid-viper",
|
|
2681
|
+
"atom-finch",
|
|
2682
|
+
"auburn-deer",
|
|
2683
|
+
"aurora-seal",
|
|
2684
|
+
"avid-mink",
|
|
2685
|
+
"blaze-tiger",
|
|
2686
|
+
"bright-heron",
|
|
2687
|
+
"bronze-eagle",
|
|
2688
|
+
"brisk-hare",
|
|
2689
|
+
"burnt-moth",
|
|
2690
|
+
"bold-raven",
|
|
2691
|
+
"blue-whale",
|
|
2692
|
+
"boreal-fox",
|
|
2693
|
+
"brass-cobra",
|
|
2694
|
+
"brave-ram",
|
|
2695
|
+
"brick-crane",
|
|
2696
|
+
"brief-newt",
|
|
2697
|
+
"briny-crab",
|
|
2698
|
+
"broad-elk",
|
|
2699
|
+
"brook-dove",
|
|
2700
|
+
"calm-panda",
|
|
2701
|
+
"cedar-jay",
|
|
2702
|
+
"chief-lion",
|
|
2703
|
+
"chrome-bat",
|
|
2704
|
+
"civic-wren",
|
|
2705
|
+
"clear-swan",
|
|
2706
|
+
"cliff-goat",
|
|
2707
|
+
"coal-shark",
|
|
2708
|
+
"cold-crane",
|
|
2709
|
+
"copper-jay",
|
|
2710
|
+
"coral-fish",
|
|
2711
|
+
"crisp-lark",
|
|
2712
|
+
"cross-mole",
|
|
2713
|
+
"cubic-wasp",
|
|
2714
|
+
"cyan-toad",
|
|
2715
|
+
"dark-stag",
|
|
2716
|
+
"dawn-robin",
|
|
2717
|
+
"deep-squid",
|
|
2718
|
+
"delta-fox",
|
|
2719
|
+
"dense-boar",
|
|
2720
|
+
"dew-spider",
|
|
2721
|
+
"dim-gecko",
|
|
2722
|
+
"draft-bear",
|
|
2723
|
+
"drift-gull",
|
|
2724
|
+
"dry-newt",
|
|
2725
|
+
"dual-crane",
|
|
2726
|
+
"dune-mouse",
|
|
2727
|
+
"dusk-moth",
|
|
2728
|
+
"dusty-mule",
|
|
2729
|
+
"dwarf-carp",
|
|
2730
|
+
"east-falcon",
|
|
2731
|
+
"echo-parrot",
|
|
2732
|
+
"edge-shark",
|
|
2733
|
+
"elm-beetle",
|
|
2734
|
+
"ember-lynx",
|
|
2735
|
+
"epoch-crane",
|
|
2736
|
+
"even-pike",
|
|
2737
|
+
"extra-ant",
|
|
2738
|
+
"elder-stork",
|
|
2739
|
+
"ebon-crow",
|
|
2740
|
+
"ever-finch",
|
|
2741
|
+
"exact-moth",
|
|
2742
|
+
"exile-wren",
|
|
2743
|
+
"equal-dove",
|
|
2744
|
+
"etch-hare",
|
|
2745
|
+
"faint-orca",
|
|
2746
|
+
"far-condor",
|
|
2747
|
+
"fern-mouse",
|
|
2748
|
+
"fierce-yak",
|
|
2749
|
+
"first-kite",
|
|
2750
|
+
"fjord-seal",
|
|
2751
|
+
"flint-wolf",
|
|
2752
|
+
"fog-parrot",
|
|
2753
|
+
"forge-bull",
|
|
2754
|
+
"fossil-ray",
|
|
2755
|
+
"frank-mink",
|
|
2756
|
+
"free-eagle",
|
|
2757
|
+
"fresh-colt",
|
|
2758
|
+
"frost-bear",
|
|
2759
|
+
"fuse-wasp",
|
|
2760
|
+
"gale-hawk",
|
|
2761
|
+
"gem-turtle",
|
|
2762
|
+
"ghost-lynx",
|
|
2763
|
+
"gilt-robin",
|
|
2764
|
+
"glad-moose",
|
|
2765
|
+
"glass-eel",
|
|
2766
|
+
"gleam-puma",
|
|
2767
|
+
"glyph-owl",
|
|
2768
|
+
"gold-crane",
|
|
2769
|
+
"gorge-lion",
|
|
2770
|
+
"grain-duck",
|
|
2771
|
+
"grand-wolf",
|
|
2772
|
+
"gray-fox",
|
|
2773
|
+
"green-hare",
|
|
2774
|
+
"grit-shark",
|
|
2775
|
+
"half-stork",
|
|
2776
|
+
"haze-panther",
|
|
2777
|
+
"heart-dove",
|
|
2778
|
+
"helm-eagle",
|
|
2779
|
+
"herb-toad",
|
|
2780
|
+
"hex-spider",
|
|
2781
|
+
"high-falcon",
|
|
2782
|
+
"hive-hornet",
|
|
2783
|
+
"holo-swan",
|
|
2784
|
+
"hood-cobra",
|
|
2785
|
+
"horn-bison",
|
|
2786
|
+
"huge-squid",
|
|
2787
|
+
"hull-crab",
|
|
2788
|
+
"hunt-marten",
|
|
2789
|
+
"husk-moth",
|
|
2790
|
+
"ice-leopard",
|
|
2791
|
+
"idle-crane",
|
|
2792
|
+
"inch-beetle",
|
|
2793
|
+
"indigo-jay",
|
|
2794
|
+
"inner-fox",
|
|
2795
|
+
"ion-parrot",
|
|
2796
|
+
"iron-bull",
|
|
2797
|
+
"isle-pelican",
|
|
2798
|
+
"ivory-hawk",
|
|
2799
|
+
"ivy-snake",
|
|
2800
|
+
"iota-wren",
|
|
2801
|
+
"ink-raven",
|
|
2802
|
+
"ignite-ram",
|
|
2803
|
+
"inert-slug",
|
|
2804
|
+
"infra-mole",
|
|
2805
|
+
"jade-tiger",
|
|
2806
|
+
"jest-magpie",
|
|
2807
|
+
"jewel-crane",
|
|
2808
|
+
"joint-boar",
|
|
2809
|
+
"jovial-elk",
|
|
2810
|
+
"jump-frog",
|
|
2811
|
+
"jungle-cat",
|
|
2812
|
+
"jury-dove",
|
|
2813
|
+
"just-heron",
|
|
2814
|
+
"jolt-wasp",
|
|
2815
|
+
"keen-osprey",
|
|
2816
|
+
"kelp-seal",
|
|
2817
|
+
"key-falcon",
|
|
2818
|
+
"kind-panda",
|
|
2819
|
+
"knot-viper",
|
|
2820
|
+
"kraft-bear",
|
|
2821
|
+
"kite-mouse",
|
|
2822
|
+
"knoll-deer",
|
|
2823
|
+
"know-crane",
|
|
2824
|
+
"karma-wolf",
|
|
2825
|
+
"lake-otter",
|
|
2826
|
+
"lapis-jay",
|
|
2827
|
+
"last-condor",
|
|
2828
|
+
"leaf-gecko",
|
|
2829
|
+
"lean-coyote",
|
|
2830
|
+
"light-lynx",
|
|
2831
|
+
"lime-parrot",
|
|
2832
|
+
"live-eagle",
|
|
2833
|
+
"long-crane",
|
|
2834
|
+
"lost-fox",
|
|
2835
|
+
"loud-finch",
|
|
2836
|
+
"low-shark",
|
|
2837
|
+
"luck-rabbit",
|
|
2838
|
+
"lunar-owl",
|
|
2839
|
+
"lush-ibis",
|
|
2840
|
+
"malt-badger",
|
|
2841
|
+
"maple-wren",
|
|
2842
|
+
"mars-falcon",
|
|
2843
|
+
"matte-crow",
|
|
2844
|
+
"mesa-hawk",
|
|
2845
|
+
"mild-orca",
|
|
2846
|
+
"mint-dove",
|
|
2847
|
+
"mist-puma",
|
|
2848
|
+
"mock-robin",
|
|
2849
|
+
"mono-wolf",
|
|
2850
|
+
"moon-bear",
|
|
2851
|
+
"moss-turtle",
|
|
2852
|
+
"mud-heron",
|
|
2853
|
+
"mute-swan",
|
|
2854
|
+
"myth-lynx",
|
|
2855
|
+
"navy-eagle",
|
|
2856
|
+
"near-mink",
|
|
2857
|
+
"neon-parrot",
|
|
2858
|
+
"nest-crane",
|
|
2859
|
+
"next-fox",
|
|
2860
|
+
"nimble-ram",
|
|
2861
|
+
"node-spider",
|
|
2862
|
+
"noon-hawk",
|
|
2863
|
+
"north-seal",
|
|
2864
|
+
"nova-owl",
|
|
2865
|
+
"null-moth",
|
|
2866
|
+
"numb-carp",
|
|
2867
|
+
"nutmeg-jay",
|
|
2868
|
+
"neat-cobra",
|
|
2869
|
+
"nomad-elk",
|
|
2870
|
+
"oak-badger",
|
|
2871
|
+
"oat-finch",
|
|
2872
|
+
"odd-pelican",
|
|
2873
|
+
"olive-bear",
|
|
2874
|
+
"onyx-raven",
|
|
2875
|
+
"opal-crane",
|
|
2876
|
+
"open-wolf",
|
|
2877
|
+
"orbit-lynx",
|
|
2878
|
+
"ore-shark",
|
|
2879
|
+
"outer-dove",
|
|
2880
|
+
"pale-tiger",
|
|
2881
|
+
"park-heron",
|
|
2882
|
+
"peak-eagle",
|
|
2883
|
+
"pine-fox",
|
|
2884
|
+
"pixel-owl",
|
|
2885
|
+
"plain-goat",
|
|
2886
|
+
"plum-crane",
|
|
2887
|
+
"polar-ray",
|
|
2888
|
+
"port-falcon",
|
|
2889
|
+
"prime-wolf",
|
|
2890
|
+
"prism-jay",
|
|
2891
|
+
"proud-lion",
|
|
2892
|
+
"pulse-bat",
|
|
2893
|
+
"pure-swan",
|
|
2894
|
+
"pyro-hawk",
|
|
2895
|
+
"quake-bear",
|
|
2896
|
+
"quartz-jay",
|
|
2897
|
+
"quest-falcon",
|
|
2898
|
+
"quick-otter",
|
|
2899
|
+
"quiet-crane",
|
|
2900
|
+
"rain-leopard",
|
|
2901
|
+
"rapid-hare",
|
|
2902
|
+
"raw-condor",
|
|
2903
|
+
"reef-dolphin",
|
|
2904
|
+
"regal-stag",
|
|
2905
|
+
"ridge-fox",
|
|
2906
|
+
"rift-cobra",
|
|
2907
|
+
"rigid-crane",
|
|
2908
|
+
"river-otter",
|
|
2909
|
+
"rock-eagle",
|
|
2910
|
+
"root-mole",
|
|
2911
|
+
"rose-finch",
|
|
2912
|
+
"rough-boar",
|
|
2913
|
+
"ruby-hawk",
|
|
2914
|
+
"rust-wolf",
|
|
2915
|
+
"sage-owl",
|
|
2916
|
+
"salt-crane",
|
|
2917
|
+
"sand-viper",
|
|
2918
|
+
"satin-dove",
|
|
2919
|
+
"scale-dragon",
|
|
2920
|
+
"scarlet-ibis",
|
|
2921
|
+
"sea-falcon",
|
|
2922
|
+
"shade-lynx",
|
|
2923
|
+
"sharp-eagle",
|
|
2924
|
+
"shell-crab",
|
|
2925
|
+
"short-fox",
|
|
2926
|
+
"sigma-jay",
|
|
2927
|
+
"silk-moth",
|
|
2928
|
+
"silver-wolf",
|
|
2929
|
+
"slate-bear",
|
|
2930
|
+
"slim-heron",
|
|
2931
|
+
"smoke-puma",
|
|
2932
|
+
"snap-turtle",
|
|
2933
|
+
"snow-leopard",
|
|
2934
|
+
"solar-crane",
|
|
2935
|
+
"solid-ram",
|
|
2936
|
+
"sonic-bat",
|
|
2937
|
+
"south-seal",
|
|
2938
|
+
"spark-robin",
|
|
2939
|
+
"spice-wren",
|
|
2940
|
+
"split-mink",
|
|
2941
|
+
"spring-elk",
|
|
2942
|
+
"squid-ink",
|
|
2943
|
+
"stark-crow",
|
|
2944
|
+
"steel-hawk",
|
|
2945
|
+
"stern-bull",
|
|
2946
|
+
"still-swan",
|
|
2947
|
+
"stone-fox",
|
|
2948
|
+
"storm-eagle",
|
|
2949
|
+
"stout-boar",
|
|
2950
|
+
"stray-cat",
|
|
2951
|
+
"strong-lion",
|
|
2952
|
+
"sun-parrot",
|
|
2953
|
+
"surf-dolphin",
|
|
2954
|
+
"swift-deer",
|
|
2955
|
+
"teal-crane",
|
|
2956
|
+
"terra-wolf",
|
|
2957
|
+
"thick-bear",
|
|
2958
|
+
"thin-spider",
|
|
2959
|
+
"third-owl",
|
|
2960
|
+
"thorn-fox",
|
|
2961
|
+
"tide-seal",
|
|
2962
|
+
"timber-jay",
|
|
2963
|
+
"tiny-wren",
|
|
2964
|
+
"toast-mole",
|
|
2965
|
+
"topaz-hawk",
|
|
2966
|
+
"torch-lynx",
|
|
2967
|
+
"trace-falcon",
|
|
2968
|
+
"true-eagle",
|
|
2969
|
+
"tusk-walrus",
|
|
2970
|
+
"ultra-crane",
|
|
2971
|
+
"umbra-wolf",
|
|
2972
|
+
"unit-fox",
|
|
2973
|
+
"upper-hawk",
|
|
2974
|
+
"urban-jay",
|
|
2975
|
+
"vale-deer",
|
|
2976
|
+
"vast-eagle",
|
|
2977
|
+
"vault-bear",
|
|
2978
|
+
"velvet-owl",
|
|
2979
|
+
"vent-crane",
|
|
2980
|
+
"verse-fox",
|
|
2981
|
+
"vigor-lynx",
|
|
2982
|
+
"vine-parrot",
|
|
2983
|
+
"vivid-swan",
|
|
2984
|
+
"void-raven",
|
|
2985
|
+
"volt-hawk",
|
|
2986
|
+
"vow-falcon",
|
|
2987
|
+
"vintage-jay",
|
|
2988
|
+
"vista-wolf",
|
|
2989
|
+
"vital-hare",
|
|
2990
|
+
"warm-otter",
|
|
2991
|
+
"wave-dolphin",
|
|
2992
|
+
"wax-crane",
|
|
2993
|
+
"west-falcon",
|
|
2994
|
+
"wheat-mouse",
|
|
2995
|
+
"white-tiger",
|
|
2996
|
+
"wide-eagle",
|
|
2997
|
+
"wild-fox",
|
|
2998
|
+
"wind-hawk",
|
|
2999
|
+
"wire-spider",
|
|
3000
|
+
"wise-owl",
|
|
3001
|
+
"wood-thrush",
|
|
3002
|
+
"wool-ram",
|
|
3003
|
+
"wren-song",
|
|
3004
|
+
"wry-crow",
|
|
3005
|
+
"xeno-crane",
|
|
3006
|
+
"xerus-fox",
|
|
3007
|
+
"yarn-robin",
|
|
3008
|
+
"yew-falcon",
|
|
3009
|
+
"young-wolf",
|
|
3010
|
+
"zeal-hawk",
|
|
3011
|
+
"zen-panda",
|
|
3012
|
+
"zero-crane",
|
|
3013
|
+
"zinc-eagle",
|
|
3014
|
+
"zone-fox"
|
|
3015
|
+
];
|
|
3016
|
+
|
|
3017
|
+
// src/lib/identity.ts
|
|
3018
|
+
var AGENT_ID_FILE = join2(homedir2(), ".conversations", "agent-id");
|
|
3019
|
+
var cachedAutoName = null;
|
|
3020
|
+
function getAutoName() {
|
|
3021
|
+
if (cachedAutoName)
|
|
3022
|
+
return cachedAutoName;
|
|
3023
|
+
try {
|
|
3024
|
+
const name2 = readFileSync(AGENT_ID_FILE, "utf-8").trim();
|
|
3025
|
+
if (name2) {
|
|
3026
|
+
cachedAutoName = name2;
|
|
3027
|
+
return name2;
|
|
3028
|
+
}
|
|
3029
|
+
} catch {}
|
|
3030
|
+
const name = AGENT_NAMES[Math.floor(Math.random() * AGENT_NAMES.length)];
|
|
3031
|
+
cachedAutoName = name;
|
|
3032
|
+
try {
|
|
3033
|
+
mkdirSync2(dirname2(AGENT_ID_FILE), { recursive: true });
|
|
3034
|
+
writeFileSync(AGENT_ID_FILE, name + `
|
|
3035
|
+
`, "utf-8");
|
|
3036
|
+
} catch {}
|
|
3037
|
+
return name;
|
|
3038
|
+
}
|
|
2664
3039
|
function resolveIdentity(explicit) {
|
|
2665
3040
|
const explicitValue = explicit?.trim();
|
|
2666
3041
|
if (explicitValue)
|
|
@@ -2668,7 +3043,7 @@ function resolveIdentity(explicit) {
|
|
|
2668
3043
|
const envValue = process.env.CONVERSATIONS_AGENT_ID?.trim();
|
|
2669
3044
|
if (envValue)
|
|
2670
3045
|
return envValue;
|
|
2671
|
-
return
|
|
3046
|
+
return getAutoName();
|
|
2672
3047
|
}
|
|
2673
3048
|
function requireIdentity(explicit) {
|
|
2674
3049
|
const explicitValue = explicit?.trim();
|
package/dist/lib/identity.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get or create a persistent auto-generated agent name.
|
|
3
|
+
* Stored in ~/.conversations/agent-id so the same installation
|
|
4
|
+
* always gets the same name.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getAutoName(): string;
|
|
1
7
|
/**
|
|
2
8
|
* Resolve agent identity.
|
|
3
|
-
* Priority: explicit flag → CONVERSATIONS_AGENT_ID env →
|
|
9
|
+
* Priority: explicit flag → CONVERSATIONS_AGENT_ID env → auto-generated persistent name
|
|
4
10
|
*/
|
|
5
11
|
export declare function resolveIdentity(explicit?: string): string;
|
|
6
12
|
/**
|
|
@@ -8,3 +14,7 @@ export declare function resolveIdentity(explicit?: string): string;
|
|
|
8
14
|
* Throws if no identity is set via flag or env.
|
|
9
15
|
*/
|
|
10
16
|
export declare function requireIdentity(explicit?: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Reset the cached auto name (for testing).
|
|
19
|
+
*/
|
|
20
|
+
export declare function _resetAutoName(): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pool of unique agent names for auto-assignment.
|
|
3
|
+
* Format: adjective-animal, keeping them short, memorable, and fun.
|
|
4
|
+
*/
|
|
5
|
+
export declare const AGENT_NAMES: readonly ["amber-fox", "arctic-wolf", "ashen-crow", "azure-hawk", "astral-lynx", "autumn-bear", "agile-puma", "alpine-ibex", "ancient-owl", "aqua-otter", "arid-viper", "atom-finch", "auburn-deer", "aurora-seal", "avid-mink", "blaze-tiger", "bright-heron", "bronze-eagle", "brisk-hare", "burnt-moth", "bold-raven", "blue-whale", "boreal-fox", "brass-cobra", "brave-ram", "brick-crane", "brief-newt", "briny-crab", "broad-elk", "brook-dove", "calm-panda", "cedar-jay", "chief-lion", "chrome-bat", "civic-wren", "clear-swan", "cliff-goat", "coal-shark", "cold-crane", "copper-jay", "coral-fish", "crisp-lark", "cross-mole", "cubic-wasp", "cyan-toad", "dark-stag", "dawn-robin", "deep-squid", "delta-fox", "dense-boar", "dew-spider", "dim-gecko", "draft-bear", "drift-gull", "dry-newt", "dual-crane", "dune-mouse", "dusk-moth", "dusty-mule", "dwarf-carp", "east-falcon", "echo-parrot", "edge-shark", "elm-beetle", "ember-lynx", "epoch-crane", "even-pike", "extra-ant", "elder-stork", "ebon-crow", "ever-finch", "exact-moth", "exile-wren", "equal-dove", "etch-hare", "faint-orca", "far-condor", "fern-mouse", "fierce-yak", "first-kite", "fjord-seal", "flint-wolf", "fog-parrot", "forge-bull", "fossil-ray", "frank-mink", "free-eagle", "fresh-colt", "frost-bear", "fuse-wasp", "gale-hawk", "gem-turtle", "ghost-lynx", "gilt-robin", "glad-moose", "glass-eel", "gleam-puma", "glyph-owl", "gold-crane", "gorge-lion", "grain-duck", "grand-wolf", "gray-fox", "green-hare", "grit-shark", "half-stork", "haze-panther", "heart-dove", "helm-eagle", "herb-toad", "hex-spider", "high-falcon", "hive-hornet", "holo-swan", "hood-cobra", "horn-bison", "huge-squid", "hull-crab", "hunt-marten", "husk-moth", "ice-leopard", "idle-crane", "inch-beetle", "indigo-jay", "inner-fox", "ion-parrot", "iron-bull", "isle-pelican", "ivory-hawk", "ivy-snake", "iota-wren", "ink-raven", "ignite-ram", "inert-slug", "infra-mole", "jade-tiger", "jest-magpie", "jewel-crane", "joint-boar", "jovial-elk", "jump-frog", "jungle-cat", "jury-dove", "just-heron", "jolt-wasp", "keen-osprey", "kelp-seal", "key-falcon", "kind-panda", "knot-viper", "kraft-bear", "kite-mouse", "knoll-deer", "know-crane", "karma-wolf", "lake-otter", "lapis-jay", "last-condor", "leaf-gecko", "lean-coyote", "light-lynx", "lime-parrot", "live-eagle", "long-crane", "lost-fox", "loud-finch", "low-shark", "luck-rabbit", "lunar-owl", "lush-ibis", "malt-badger", "maple-wren", "mars-falcon", "matte-crow", "mesa-hawk", "mild-orca", "mint-dove", "mist-puma", "mock-robin", "mono-wolf", "moon-bear", "moss-turtle", "mud-heron", "mute-swan", "myth-lynx", "navy-eagle", "near-mink", "neon-parrot", "nest-crane", "next-fox", "nimble-ram", "node-spider", "noon-hawk", "north-seal", "nova-owl", "null-moth", "numb-carp", "nutmeg-jay", "neat-cobra", "nomad-elk", "oak-badger", "oat-finch", "odd-pelican", "olive-bear", "onyx-raven", "opal-crane", "open-wolf", "orbit-lynx", "ore-shark", "outer-dove", "pale-tiger", "park-heron", "peak-eagle", "pine-fox", "pixel-owl", "plain-goat", "plum-crane", "polar-ray", "port-falcon", "prime-wolf", "prism-jay", "proud-lion", "pulse-bat", "pure-swan", "pyro-hawk", "quake-bear", "quartz-jay", "quest-falcon", "quick-otter", "quiet-crane", "rain-leopard", "rapid-hare", "raw-condor", "reef-dolphin", "regal-stag", "ridge-fox", "rift-cobra", "rigid-crane", "river-otter", "rock-eagle", "root-mole", "rose-finch", "rough-boar", "ruby-hawk", "rust-wolf", "sage-owl", "salt-crane", "sand-viper", "satin-dove", "scale-dragon", "scarlet-ibis", "sea-falcon", "shade-lynx", "sharp-eagle", "shell-crab", "short-fox", "sigma-jay", "silk-moth", "silver-wolf", "slate-bear", "slim-heron", "smoke-puma", "snap-turtle", "snow-leopard", "solar-crane", "solid-ram", "sonic-bat", "south-seal", "spark-robin", "spice-wren", "split-mink", "spring-elk", "squid-ink", "stark-crow", "steel-hawk", "stern-bull", "still-swan", "stone-fox", "storm-eagle", "stout-boar", "stray-cat", "strong-lion", "sun-parrot", "surf-dolphin", "swift-deer", "teal-crane", "terra-wolf", "thick-bear", "thin-spider", "third-owl", "thorn-fox", "tide-seal", "timber-jay", "tiny-wren", "toast-mole", "topaz-hawk", "torch-lynx", "trace-falcon", "true-eagle", "tusk-walrus", "ultra-crane", "umbra-wolf", "unit-fox", "upper-hawk", "urban-jay", "vale-deer", "vast-eagle", "vault-bear", "velvet-owl", "vent-crane", "verse-fox", "vigor-lynx", "vine-parrot", "vivid-swan", "void-raven", "volt-hawk", "vow-falcon", "vintage-jay", "vista-wolf", "vital-hare", "warm-otter", "wave-dolphin", "wax-crane", "west-falcon", "wheat-mouse", "white-tiger", "wide-eagle", "wild-fox", "wind-hawk", "wire-spider", "wise-owl", "wood-thrush", "wool-ram", "wren-song", "wry-crow", "xeno-crane", "xerus-fox", "yarn-robin", "yew-falcon", "young-wolf", "zeal-hawk", "zen-panda", "zero-crane", "zinc-eagle", "zone-fox"];
|
|
6
|
+
export type AgentName = typeof AGENT_NAMES[number];
|