@pugi/cli 0.1.0-beta.3 → 0.1.0-beta.5
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/assets/pugi-mascot.ansi +25 -40
- package/dist/core/engine/prompts.js +1 -4
- package/dist/runtime/cli.js +25 -20
- package/dist/runtime/commands/delegate.js +81 -0
- package/dist/runtime/commands/roster.js +117 -0
- package/dist/tools/registry.js +0 -18
- package/dist/tui/repl.js +15 -9
- package/package.json +2 -2
- package/dist/core/edits/worktree.js +0 -229
- package/dist/core/lsp/client.js +0 -631
- package/dist/runtime/commands/lsp.js +0 -184
- package/dist/runtime/commands/patch.js +0 -111
- package/dist/runtime/commands/worktree.js +0 -133
- package/dist/tools/apply-patch.js +0 -314
- package/dist/tools/lsp-tools.js +0 -189
package/assets/pugi-mascot.ansi
CHANGED
|
@@ -1,41 +1,26 @@
|
|
|
1
|
-
[?25l[0m[
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
6
|
-
[38;2;
|
|
7
|
-
[38;2;
|
|
8
|
-
[
|
|
9
|
-
[38;2;
|
|
10
|
-
[38;2;
|
|
11
|
-
[38;2;
|
|
12
|
-
[38;2;
|
|
13
|
-
[38;2;
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[38;2;
|
|
19
|
-
[38;2;
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[38;2;0;0;2;48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[38;2;2;2;4;48;2;43;45;52m▄[38;2;65;69;79;48;2;81;86;98m▄[38;2;81;86;97m▄[48;2;82;87;98m▄[38;2;66;70;80;48;2;37;40;46m▄[38;2;0;0;2;48;2;0;0;2m▄[48;2;24;26;31m▄[48;2;8;8;11m▄[48;2;0;0;2m▄[38;2;22;24;30;48;2;14;15;19m▄[38;2;49;54;64;48;2;43;47;56m▄[38;2;49;54;65;48;2;49;55;65m▄[38;2;50;55;66;48;2;50;55;66m▄▄[38;2;51;56;67;48;2;50;55;67m▄[48;2;51;56;67m▄▄[38;2;51;57;68m▄[48;2;51;57;68m▄▄[38;2;52;57;68m▄[48;2;52;57;68m▄[38;2;27;30;38;48;2;27;30;36m▄[38;2;22;24;31;48;2;21;24;31m▄[38;2;45;50;60;48;2;44;49;60m▄[48;2;45;50;60m▄▄[48;2;45;50;61m▄[48;2;46;50;61m▄[38;2;46;51;61;48;2;45;50;60m▄[38;2;38;73;101m▄[38;2;28;94;140m▄[38;2;46;53;66m▄[38;2;46;50;61;48;2;39;42;52m▄[38;2;12;13;18;48;2;4;4;8m▄[38;2;0;0;2;48;2;0;0;2m▄[38;2;0;0;1m▄[38;2;2;127;199;48;2;0;128;199m▄[38;2;0;9;20;48;2;0;6;16m▄[38;2;1;82;138;48;2;0;77;131m▄[38;2;0;167;253;48;2;0;156;253m▄[38;2;0;193;253;48;2;0;168;253m▄[38;2;0;194;253;48;2;0;169;253m▄[38;2;0;167;253;48;2;0;157;253m▄[38;2;1;81;137;48;2;1;78;133m▄[38;2;0;7;16;48;2;0;4;12m▄[38;2;0;119;191;48;2;0;120;191m▄[38;2;0;0;2;48;2;0;0;3m▄[48;2;0;0;2m▄▄[48;2;0;0;3m▄[48;2;0;0;4m▄[48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄[0m
|
|
27
|
-
[38;2;0;0;2;48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[48;2;11;12;16m▄[38;2;29;30;36;48;2;76;80;92m▄[38;2;81;86;98;48;2;81;86;97m▄[48;2;81;87;98m▄[38;2;29;31;36;48;2;7;7;10m▄[38;2;0;0;2;48;2;0;0;2m▄▄▄[38;2;44;49;59;48;2;33;37;44m▄[38;2;49;55;65;48;2;49;55;65m▄[38;2;50;55;65;48;2;50;55;65m▄[38;2;50;55;66;48;2;50;55;66m▄[38;2;51;56;66m▄[38;2;51;56;67;48;2;51;56;67m▄[48;2;51;57;68m▄▄[38;2;51;57;68m▄[38;2;51;56;67m▄[38;2;52;57;68;48;2;52;57;68m▄[38;2;53;58;69;48;2;52;57;69m▄[38;2;39;43;51;48;2;52;57;68m▄[38;2;2;2;5;48;2;25;28;34m▄[38;2;1;1;4;48;2;21;23;29m▄[38;2;31;35;43;48;2;45;49;60m▄[38;2;44;49;60;48;2;44;50;60m▄[38;2;45;50;60;48;2;45;50;60m▄[38;2;45;50;61;48;2;45;50;61m▄[38;2;45;50;60m▄[38;2;45;50;61;48;2;46;51;62m▄[38;2;23;101;153;48;2;14;130;203m▄[38;2;16;125;200;48;2;23;104;158m▄[38;2;39;65;89;48;2;13;130;206m▄[38;2;43;50;64;48;2;19;123;189m▄[38;2;12;17;27;48;2;7;113;178m▄[38;2;0;3;11;48;2;1;107;173m▄[38;2;0;3;10;48;2;2;108;173m▄[38;2;1;127;200;48;2;0;140;222m▄[38;2;0;4;12;48;2;0;9;21m▄[38;2;0;74;127;48;2;0;80;135m▄[38;2;0;155;252;48;2;0;166;253m▄[38;2;0;165;253;48;2;0;190;253m▄[38;2;0;165;252;48;2;0;191;253m▄[38;2;0;156;253;48;2;0;165;253m▄[38;2;1;77;131;48;2;1;82;140m▄[38;2;0;4;11;48;2;0;7;17m▄[38;2;2;135;212;48;2;0;120;191m▄[38;2;0;105;170;48;2;0;0;2m▄[38;2;1;103;171m▄[38;2;1;107;171m▄[38;2;1;116;185;48;2;0;47;75m▄[38;2;1;106;174;48;2;0;50;82m▄[38;2;0;16;28;48;2;0;0;2m▄[38;2;0;0;2m▄▄▄▄▄▄▄▄▄▄[0m
|
|
28
|
-
[38;2;0;0;2;48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[38;2;3;3;6;48;2;50;53;61m▄[38;2;68;72;83;48;2;81;86;98m▄[38;2;76;80;91;48;2;53;56;64m▄[38;2;0;0;3;48;2;0;0;2m▄[38;2;0;0;2m▄[38;2;17;19;24;48;2;6;7;10m▄[38;2;49;54;64;48;2;49;54;65m▄[38;2;49;54;65m▄[48;2;50;55;65m▄[38;2;50;55;66;48;2;50;55;66m▄▄[38;2;51;56;67;48;2;51;56;67m▄▄▄[38;2;51;57;67m▄[38;2;52;57;68;48;2;51;57;68m▄[38;2;37;41;50;48;2;52;57;68m▄[38;2;1;2;4;48;2;38;42;50m▄[38;2;0;0;2;48;2;1;2;4m▄[38;2;14;16;23;48;2;0;0;2m▄[38;2;15;18;24m▄[38;2;0;0;2;48;2;1;1;3m▄[38;2;0;0;3;48;2;30;33;41m▄[38;2;28;32;39;48;2;45;50;61m▄[38;2;45;50;61m▄[38;2;46;50;61m▄[38;2;46;51;61m▄[38;2;46;51;62m▄[48;2;46;51;61m▄[48;2;45;50;61m▄[38;2;45;50;61m▄[38;2;8;9;13;48;2;11;13;17m▄[38;2;0;0;2;48;2;0;0;2m▄▄[38;2;0;129;203;48;2;0;127;199m▄[38;2;0;7;13;48;2;0;1;5m▄[38;2;0;1;5;48;2;0;29;54m▄[38;2;0;4;11;48;2;0;86;146m▄[38;2;0;5;14;48;2;0;88;149m▄[48;2;0;89;150m▄[38;2;0;4;11;48;2;0;85;146m▄[38;2;0;1;5;48;2;0;32;58m▄[38;2;0;7;13;48;2;0;1;6m▄[38;2;1;127;198;48;2;2;124;194m▄[38;2;0;0;2;48;2;0;13;25m▄▄[48;2;0;15;27m▄[48;2;1;107;172m▄[48;2;1;106;176m▄[48;2;0;3;9m▄[48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄[0m
|
|
29
|
-
[38;2;0;0;2;48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[48;2;14;15;19m▄[38;2;34;36;42;48;2;79;84;96m▄[38;2;43;46;53;48;2;18;19;23m▄[38;2;0;0;2;48;2;0;0;2m▄[38;2;1;1;3;48;2;19;21;26m▄[38;2;42;47;57;48;2;49;54;65m▄[38;2;50;55;66;48;2;49;55;65m▄[48;2;50;55;66m▄▄▄[48;2;50;56;66m▄[38;2;51;56;67;48;2;51;56;67m▄[38;2;51;57;68m▄[38;2;45;50;60;48;2;52;57;68m▄[38;2;3;3;6;48;2;38;42;50m▄[38;2;0;0;3;48;2;1;1;4m▄[38;2;21;24;32;48;2;0;1;3m▄[38;2;29;33;42;48;2;18;21;29m▄[38;2;29;33;43;48;2;29;34;43m▄[38;2;30;34;44;48;2;30;34;43m▄[38;2;30;35;44;48;2;21;25;32m▄[38;2;23;26;34;48;2;1;1;4m▄[38;2;1;1;4;48;2;0;0;2m▄[38;2;0;0;2;48;2;26;29;36m▄[38;2;28;32;40;48;2;46;51;61m▄[38;2;46;51;61;48;2;46;51;62m▄[38;2;46;51;62m▄[38;2;47;52;63;48;2;46;52;62m▄[38;2;25;28;35;48;2;47;52;63m▄[38;2;0;0;2;48;2;19;22;27m▄[48;2;0;0;2m▄[38;2;4;70;109m▄[38;2;0;89;143;48;2;2;68;110m▄[38;2;0;0;4;48;2;1;121;193m▄[38;2;0;24;40;48;2;2;129;211m▄[38;2;0;27;45;48;2;0;108;179m▄[38;2;0;70;111;48;2;0;111;180m▄[38;2;0;74;116;48;2;0;110;180m▄[38;2;0;27;44;48;2;0;111;180m▄[38;2;0;26;42m▄[38;2;1;114;184m▄[38;2;0;23;40;48;2;0;128;207m▄[38;2;0;0;2;48;2;1;78;125m▄[48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[0m
|
|
30
|
-
[38;2;0;0;2;48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[38;2;5;5;8;48;2;41;43;50m▄[38;2;0;0;3;48;2;0;0;2m▄[38;2;0;0;2m▄[48;2;15;17;22m▄[38;2;38;41;50;48;2;50;55;66m▄[38;2;50;55;66m▄[38;2;51;56;67m▄[48;2;51;56;66m▄[38;2;50;56;67;48;2;51;56;67m▄[38;2;51;56;67m▄[38;2;18;20;25;48;2;50;55;65m▄[38;2;0;0;2;48;2;9;10;14m▄[38;2;14;16;22;48;2;0;0;2m▄[38;2;29;33;42;48;2;17;20;27m▄[38;2;28;32;42;48;2;29;32;42m▄[38;2;29;33;42;48;2;29;33;42m▄[38;2;29;33;43;48;2;29;33;43m▄[48;2;30;34;44m▄[38;2;30;34;44m▄[38;2;30;35;44m▄[38;2;30;34;44;48;2;22;25;33m▄[38;2;20;24;31;48;2;0;0;3m▄[38;2;0;0;2m▄[38;2;1;1;4;48;2;32;35;44m▄[38;2;18;21;26;48;2;46;51;62m▄[38;2;0;1;3;48;2;29;33;40m▄[38;2;0;0;2;48;2;0;0;2m▄▄[38;2;1;49;79;48;2;1;38;61m▄[38;2;2;58;94;48;2;1;96;155m▄[38;2;0;0;2;48;2;0;0;3m▄[48;2;0;0;2m▄▄▄[38;2;0;75;117;48;2;0;54;85m▄[38;2;1;54;83;48;2;0;55;87m▄[38;2;0;0;2;48;2;0;0;2m▄▄[38;2;1;107;172;48;2;0;106;171m▄[38;2;0;0;2;48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[0m
|
|
31
|
-
[38;2;0;0;2;48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[48;2;10;11;15m▄[38;2;32;35;43;48;2;50;55;66m▄[38;2;50;55;66;48;2;51;56;66m▄[38;2;50;56;67;48;2;51;55;67m▄[38;2;36;40;48;48;2;50;55;67m▄[38;2;0;0;2;48;2;27;30;37m▄[38;2;7;8;12;48;2;0;0;2m▄[38;2;28;32;41;48;2;10;12;17m▄[38;2;28;32;42;48;2;28;32;42m▄[38;2;29;33;42;48;2;29;32;42m▄[38;2;29;33;43;48;2;29;33;42m▄[38;2;29;39;52;48;2;29;33;43m▄[38;2;10;124;199;48;2;30;35;45m▄[38;2;8;122;200m▄[38;2;24;63;91;48;2;30;34;43m▄[38;2;25;62;89m▄[38;2;25;63;89;48;2;30;35;44m▄[38;2;26;63;89;48;2;31;36;45m▄[38;2;26;64;90;48;2;18;21;28m▄[38;2;2;38;59;48;2;0;0;3m▄[38;2;0;35;56m▄[48;2;0;0;2m▄[38;2;0;35;57m▄[38;2;1;108;174;48;2;0;7;13m▄[38;2;1;40;67;48;2;2;112;179m▄[38;2;0;0;2;48;2;0;29;48m▄[48;2;0;0;2m▄▄[38;2;1;52;82m▄[38;2;1;108;168;48;2;0;56;87m▄[38;2;0;3;7;48;2;2;103;163m▄[38;2;0;0;2;48;2;0;2;5m▄[38;2;0;30;47;48;2;0;0;2m▄[38;2;1;118;185;48;2;1;30;48m▄[38;2;0;13;23;48;2;2;109;174m▄[38;2;0;0;2;48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[0m
|
|
32
|
-
[38;2;0;0;2;48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[48;2;5;6;9m▄[38;2;14;15;20;48;2;49;54;64m▄[38;2;7;7;11;48;2;44;48;58m▄[38;2;2;3;6;48;2;3;3;6m▄[38;2;25;29;37;48;2;5;5;9m▄[38;2;28;32;42;48;2;27;30;40m▄[38;2;28;32;41;48;2;28;32;41m▄[38;2;28;32;42;48;2;28;32;42m▄[38;2;29;32;42;48;2;29;33;43m▄[38;2;29;33;43m▄[48;2;28;42;58m▄[38;2;25;53;77;48;2;10;123;198m▄[38;2;25;54;78;48;2;9;121;196m▄[38;2;29;33;42;48;2;16;94;147m▄[38;2;29;33;43;48;2;15;92;142m▄[38;2;30;35;44;48;2;16;94;143m▄[38;2;22;25;33;48;2;17;95;144m▄[38;2;0;0;3;48;2;4;80;127m▄[38;2;0;0;2;48;2;0;77;123m▄[48;2;1;77;123m▄[48;2;1;77;124m▄[48;2;0;76;123m▄[48;2;0;37;62m▄[48;2;0;0;2m▄▄[38;2;0;41;64m▄[38;2;1;113;178;48;2;1;45;72m▄[38;2;0;6;12;48;2;1;111;176m▄[38;2;0;0;2;48;2;0;4;9m▄[48;2;0;0;2m▄[38;2;0;17;28;48;2;0;10;17m▄[38;2;2;86;138;48;2;2;117;185m▄[38;2;0;0;2;48;2;0;12;22m▄[48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[0m
|
|
33
|
-
[38;2;0;0;2;48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[48;2;2;3;6m▄[38;2;0;0;3;48;2;22;26;34m▄[38;2;8;9;14;48;2;29;33;42m▄[38;2;9;10;15;48;2;28;32;42m▄[38;2;8;10;14;48;2;28;32;41m▄[38;2;9;10;15;48;2;29;32;42m▄[48;2;29;33;43m▄▄[48;2;29;33;42m▄▄▄[38;2;9;10;14;48;2;29;33;43m▄[38;2;6;7;11;48;2;29;32;42m▄[38;2;0;0;2;48;2;4;4;8m▄[48;2;0;0;2m▄▄▄▄▄▄▄[38;2;1;44;73;48;2;0;38;60m▄[38;2;0;9;17;48;2;1;114;182m▄[38;2;0;0;2;48;2;0;7;15m▄[48;2;0;0;2m▄▄▄[38;2;0;3;8;48;2;0;18;29m▄[38;2;0;3;7;48;2;2;76;121m▄[38;2;0;0;2;48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[0m
|
|
34
|
-
[38;2;0;0;2;48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[38;2;0;0;3m▄[38;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[0m
|
|
35
|
-
[38;2;0;0;2;48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[0m
|
|
36
|
-
[38;2;0;0;2;48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[0m
|
|
37
|
-
[38;2;0;0;2;48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[0m
|
|
38
|
-
[38;2;0;0;2;48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[0m
|
|
39
|
-
[38;2;0;0;2;48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[0m
|
|
40
|
-
[38;2;0;0;2;48;2;0;0;2m▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄[0m
|
|
1
|
+
[?25l[0m [0m
|
|
2
|
+
[0m
|
|
3
|
+
[0m
|
|
4
|
+
[0m
|
|
5
|
+
[0m
|
|
6
|
+
[38;2;42;45;50m▄[38;2;72;78;86m▄[38;2;55;62;72m▄[38;2;68;74;84m▄[38;2;89;95;105m▄[38;2;53;57;65m▄[38;2;40;44;51m▄[38;2;85;91;100m▄[38;2;86;92;101m▄[38;2;85;91;100m▄[38;2;14;37;57m▄[38;2;6;35;55m▄[38;2;60;64;72m▄[38;2;89;96;106m▄[38;2;65;72;82m▄[38;2;58;65;76m▄[38;2;71;77;85m▄[0m [0m
|
|
7
|
+
[38;2;33;37;43m▄[38;2;61;70;80m▄[38;2;61;69;80;48;2;54;61;70m▄[48;2;63;70;81m▄[38;2;81;88;98;48;2;64;71;82m▄[38;2;17;24;36;48;2;70;77;87m▄[38;2;4;13;24;48;2;4;13;25m▄[38;2;12;20;31;48;2;4;12;24m▄[38;2;73;80;90;48;2;43;49;60m▄[38;2;92;99;109;48;2;63;69;80m▄[48;2;92;99;109m▄▄▄[38;2;91;98;109;48;2;91;98;109m▄[38;2;15;39;58;48;2;15;45;69m▄[38;2;3;64;102;48;2;2;43;71m▄[38;2;4;12;24;48;2;8;16;28m▄[38;2;3;12;24;48;2;38;45;56m▄[38;2;4;12;24;48;2;4;12;24m▄[48;2;5;13;25m▄[38;2;19;27;38;48;2;73;81;91m▄[38;2;80;87;98;48;2;63;71;81m▄[38;2;60;68;79;48;2;63;70;81m▄[38;2;61;69;80;48;2;55;61;70m▄[0m[38;2;61;69;80m▄[38;2;32;37;42m▄[0m [0m
|
|
8
|
+
[7m[38;2;32;36;41m▄[0m[38;2;61;69;80;48;2;61;69;80m▄▄[38;2;65;72;83m▄[38;2;68;75;86;48;2;73;81;91m▄[38;2;4;13;25;48;2;42;49;60m▄[38;2;11;19;31;48;2;4;13;25m▄[38;2;88;94;105;48;2;20;28;39m▄[38;2;92;99;109;48;2;82;88;99m▄[48;2;92;99;109m▄▄[38;2;83;89;99;48;2;83;90;100m▄[38;2;86;93;103;48;2;48;55;66m▄[38;2;26;34;45;48;2;80;87;97m▄[38;2;28;35;47;48;2;80;86;97m▄[38;2;88;94;104;48;2;9;17;28m▄[38;2;71;77;88;48;2;3;55;87m▄[38;2;7;58;90m▄[38;2;3;55;87;48;2;3;17;31m▄[38;2;3;33;54;48;2;3;126;191m▄[38;2;2;75;116;48;2;3;12;24m▄[38;2;4;12;24;48;2;4;12;24m▄[48;2;44;51;62m▄[38;2;68;75;86;48;2;71;79;90m▄[38;2;63;71;82;48;2;60;69;79m▄[38;2;61;69;80;48;2;61;69;80m▄▄[0m[7m[38;2;31;35;40m▄[0m [0m
|
|
9
|
+
[38;2;39;44;51;48;2;59;66;77m▄[38;2;61;69;80;48;2;61;69;80m▄[38;2;61;68;79;48;2;78;85;96m▄[38;2;4;12;25;48;2;15;23;35m▄[38;2;16;24;36;48;2;4;12;25m▄[38;2;90;98;108;48;2;54;61;72m▄[38;2;92;99;110;48;2;92;99;109m▄▄[38;2;84;91;101m▄[38;2;87;94;104;48;2;66;73;84m▄[38;2;72;79;89;48;2;54;60;71m▄[38;2;51;58;69;48;2;92;98;109m▄[38;2;59;66;77;48;2;59;66;77m▄[38;2;62;69;81;48;2;62;69;80m▄[38;2;47;54;65;48;2;91;98;109m▄[38;2;70;77;88;48;2;53;60;71m▄[38;2;87;94;104;48;2;45;52;63m▄[38;2;3;28;50;48;2;2;63;100m▄[38;2;3;26;44;48;2;3;26;43m▄[38;2;3;64;100;48;2;3;61;97m▄[38;2;3;25;43;48;2;3;12;24m▄[38;2;4;12;24;48;2;4;12;24m▄[48;2;15;23;35m▄[38;2;62;70;80;48;2;77;85;95m▄[38;2;61;69;80;48;2;61;69;80m▄[38;2;39;44;51;48;2;58;66;76m▄[0m [0m
|
|
10
|
+
[38;2;44;49;57;48;2;62;70;81m▄[38;2;5;12;22;48;2;32;40;51m▄[38;2;22;30;41;48;2;4;12;24m▄[38;2;92;100;110;48;2;63;70;81m▄[38;2;93;100;110;48;2;92;99;110m▄[38;2;82;89;99m▄[38;2;59;67;77;48;2;91;99;110m▄[38;2;33;41;52;48;2;92;99;110m▄[38;2;50;57;67m▄[38;2;92;99;110m▄[38;2;26;33;45;48;2;38;45;56m▄[38;2;10;18;30;48;2;58;66;76m▄[38;2;11;19;30;48;2;62;69;80m▄[38;2;24;31;42;48;2;32;39;50m▄[38;2;91;98;109;48;2;92;99;110m▄[38;2;35;43;53;48;2;93;100;111m▄[38;2;3;12;23;48;2;3;63;97m▄[38;2;3;33;56;48;2;3;96;148m▄[38;2;2;80;125;48;2;3;24;41m▄[38;2;3;31;51;48;2;2;82;126m▄[38;2;2;85;128;48;2;3;24;41m▄[38;2;3;12;24;48;2;4;12;24m▄[38;2;6;12;22;48;2;35;43;54m▄[38;2;47;53;62;48;2;61;70;80m▄[0m [0m
|
|
11
|
+
[38;2;35;43;54;48;2;36;43;54m▄[38;2;94;101;112;48;2;94;101;112m▄[38;2;8;16;27;48;2;15;23;34m▄[38;2;2;80;131;48;2;2;55;90m▄[38;2;1;81;130;48;2;3;52;84m▄[38;2;2;68;107;48;2;4;13;25m▄[38;2;18;27;38;48;2;5;13;25m▄[38;2;79;86;96;48;2;30;37;48m▄[38;2;79;86;97;48;2;40;47;58m▄[38;2;55;62;73;48;2;70;77;87m▄[38;2;57;63;74;48;2;69;76;86m▄[38;2;82;89;99;48;2;39;46;57m▄[38;2;77;84;95;48;2;28;35;46m▄[38;2;16;25;36;48;2;4;12;24m▄[38;2;2;66;106;48;2;3;12;24m▄[38;2;2;82;131;48;2;3;39;63m▄[38;2;2;72;117;48;2;2;54;88m▄[38;2;2;69;105;48;2;2;79;122m▄[38;2;2;70;112;48;2;2;70;112m▄[38;2;3;11;23;48;2;3;12;23m▄[0m [0m
|
|
12
|
+
[38;2;36;43;54;48;2;36;43;54m▄[38;2;89;95;105;48;2;92;99;109m▄[38;2;91;98;108;48;2;53;60;71m▄[38;2;26;33;45;48;2;4;17;31m▄[38;2;5;13;25;48;2;2;68;109m▄[38;2;79;86;96;48;2;14;44;66m▄[38;2;43;50;61;48;2;82;89;100m▄[38;2;24;32;44;48;2;49;56;67m▄[38;2;58;64;75;48;2;42;50;61m▄[38;2;52;58;69;48;2;79;85;96m▄[38;2;54;60;71;48;2;78;85;95m▄[38;2;57;64;75;48;2;43;50;61m▄[38;2;22;30;41;48;2;55;62;72m▄[38;2;47;54;65;48;2;80;86;97m▄[38;2;72;79;90;48;2;11;43;66m▄[38;2;3;12;25;48;2;2;66;105m▄[38;2;2;85;130;48;2;3;30;52m▄[38;2;3;44;65;48;2;2;75;117m▄[38;2;2;87;136;48;2;2;70;113m▄[38;2;3;23;40;48;2;3;11;24m▄[0m [0m
|
|
13
|
+
[38;2;16;22;31;48;2;36;43;54m▄[38;2;88;94;105;48;2;92;99;110m▄[38;2;52;59;69;48;2;53;59;70m▄[38;2;23;31;42;48;2;72;78;89m▄[38;2;37;45;56;48;2;25;33;44m▄[38;2;57;65;76;48;2;56;63;73m▄[38;2;59;66;78;48;2;45;53;64m▄[48;2;58;65;77m▄[48;2;59;66;78m▄[38;2;52;59;71;48;2;33;41;52m▄[38;2;51;58;70;48;2;33;40;51m▄[38;2;58;65;77;48;2;58;66;78m▄[38;2;57;67;81;48;2;58;65;77m▄[38;2;50;85;115;48;2;38;46;57m▄[38;2;34;41;53;48;2;45;53;64m▄[38;2;3;46;77;48;2;8;49;78m▄[38;2;3;74;126;48;2;4;77;125m▄[38;2;0;150;252;48;2;5;73;114m▄[38;2;1;120;202;48;2;5;68;108m▄[38;2;3;70;113;48;2;2;97;157m▄[0m [0m
|
|
14
|
+
[7m[38;2;32;39;49m▄[0m[38;2;53;60;70;48;2;84;91;101m▄[38;2;20;28;39;48;2;4;12;24m▄[38;2;54;62;73;48;2;45;53;64m▄[38;2;59;67;78;48;2;59;67;78m▄▄▄[38;2;27;35;47m▄[38;2;36;43;55;48;2;32;40;51m▄[38;2;32;40;51;48;2;32;40;52m▄[38;2;28;36;47;48;2;58;65;77m▄[38;2;54;62;74;48;2;53;73;91m▄[38;2;54;61;73;48;2;41;107;157m▄[38;2;15;23;35;48;2;28;88;128m▄[38;2;3;78;122;48;2;2;93;146m▄[38;2;3;94;144;48;2;4;73;121m▄[38;2;4;87;134;48;2;1;145;233m▄[38;2;4;88;136;48;2;2;116;187m▄[38;2;2;80;125;48;2;3;84;137m▄[0m [7m[38;2;1;85;143m▄[0m [0m
|
|
15
|
+
[7m[38;2;21;28;39m▄[0m[38;2;5;13;24;48;2;30;38;50m▄[38;2;53;60;71;48;2;58;66;77m▄[38;2;39;47;58m▄[38;2;35;42;54;48;2;31;39;50m▄[38;2;56;63;75;48;2;40;48;59m▄[38;2;48;88;121;48;2;55;62;74m▄[38;2;43;104;154;48;2;54;62;74m▄[38;2;44;95;138;48;2;39;47;58m▄[38;2;11;77;119;48;2;21;28;40m▄[38;2;3;75;117;48;2;13;21;33m▄[38;2;2;83;127;48;2;3;51;80m▄[38;2;3;16;30;48;2;3;39;61m▄[38;2;2;79;124;48;2;3;12;26m▄[38;2;3;48;81;48;2;2;69;106m▄[38;2;1;64;106;48;2;2;71;114m▄[0m [0m
|
|
16
|
+
[7m[38;2;16;21;29m▄[38;2;21;29;40m▄[38;2;55;62;74m▄[38;2;56;64;75m▄[38;2;53;71;89m▄[38;2;53;71;90m▄[38;2;30;38;51m▄[38;2;3;12;24m▄[38;2;4;12;25m▄[38;2;3;16;31m▄[38;2;3;73;115m▄[0m [7m[38;2;1;83;138m▄[0m [0m
|
|
17
|
+
[0m
|
|
18
|
+
[38;2;4;11;22;48;2;3;9;19m▄[0m[7m[38;2;4;11;22m▄▄▄[0m[38;2;4;10;20;48;2;3;10;20m▄[0m [38;2;3;8;17m▄[0m [38;2;2;6;12m▄[38;2;4;11;21m▄▄▄[0m [38;2;2;6;11m▄[0m [0m
|
|
19
|
+
[38;2;4;11;22;48;2;4;11;22m▄[0m [7m[38;2;4;12;22m▄[0m [38;2;4;11;21;48;2;4;11;22m▄[0m [38;2;3;8;16;48;2;3;8;16m▄[0m [38;2;4;10;21;48;2;4;10;21m▄[0m [38;2;2;6;13;48;2;2;6;12m▄[38;2;3;8;15;48;2;3;8;15m▄[0m [38;2;0;78;133;48;2;0;77;133m▄[0m [38;2;0;122;210;48;2;0;126;217m▄[0m [38;2;0;119;204;48;2;0;119;203m▄[0m [0m
|
|
20
|
+
[7m[38;2;4;11;21m▄[0m [7m[38;2;4;11;22m▄[38;2;3;10;20m▄[38;2;4;10;20m▄[38;2;5;13;25m▄[0m [7m[38;2;3;9;18m▄[38;2;4;10;20m▄[38;2;3;10;20m▄[38;2;4;11;22m▄[0m[38;2;2;6;12;48;2;2;6;12m▄[0m[7m[38;2;3;7;15m▄[0m [7m[38;2;0;78;133m▄[0m [7m[38;2;0;121;209m▄[38;2;0;100;170m▄[38;2;0;100;172m▄[38;2;0;108;185m▄[0m [0m
|
|
21
|
+
[7m[38;2;4;11;21m▄[38;2;4;11;22m▄[38;2;4;11;21m▄[0m [0m
|
|
22
|
+
[0m
|
|
23
|
+
[0m
|
|
24
|
+
[0m
|
|
25
|
+
[0m
|
|
41
26
|
[?25h
|
|
@@ -22,10 +22,7 @@ import { getJobRegistry, summarizeJobsForPrompt, } from '../jobs/registry.js';
|
|
|
22
22
|
const COMMON_LOCAL_FIRST_PREAMBLE = [
|
|
23
23
|
'You are the Pugi CLI agent running locally inside the operator\'s repository.',
|
|
24
24
|
'The local filesystem is the source of truth. Every change you make is committed locally; nothing is uploaded by default (ADR-0037 local-first).',
|
|
25
|
-
'You have a tool registry: read, write, edit, grep, glob, bash
|
|
26
|
-
'Use lsp_hover / lsp_definition / lsp_references when you need precise symbol intel — they are faster and more reliable than grep for typed languages (TS/JS/Python/Go/Rust). Fall back to grep when the LSP server is unavailable.',
|
|
27
|
-
'Use apply_patch when you have a complete unified diff in hand (e.g. forwarded from an external review). For incremental edits, prefer edit/write over apply_patch — the failure modes are clearer.',
|
|
28
|
-
'Use worktree_create + worktree_promote when a multi-file change needs validation before landing on the operator\'s working tree. Drop the worktree with worktree_drop when done; never leave scratch worktrees around.',
|
|
25
|
+
'You have a tool registry: read, write, edit, grep, glob, bash. Call tools to inspect and modify the workspace.',
|
|
29
26
|
'Cite file paths relative to the workspace root. Keep edits minimal and reversible.',
|
|
30
27
|
'When you are done, return a single final text answer that the operator can read on the CLI.',
|
|
31
28
|
].join(' ');
|
package/dist/runtime/cli.js
CHANGED
|
@@ -28,9 +28,11 @@ import { runUndoCommand } from './commands/undo.js';
|
|
|
28
28
|
import { runBudgetCommand } from './commands/budget.js';
|
|
29
29
|
import { runSkillsCommand } from './commands/skills.js';
|
|
30
30
|
import { runAgentsCommand } from './commands/agents.js';
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
// α7.7 lsp/patch/worktree command modules ship behind the α7.7
|
|
32
|
+
// implementer PR (in-flight). The dispatchers below print a clean
|
|
33
|
+
// "deferred" message so `pugi --help` still lists them without the
|
|
34
|
+
// REPL crashing at module load. When α7.7 lands, restore the real
|
|
35
|
+
// imports + delete the inline stubs.
|
|
34
36
|
import { resolveWorkspaceLabel } from '../core/repl/workspace-context.js';
|
|
35
37
|
import { runReviewConsensus } from './commands/review-consensus.js';
|
|
36
38
|
import { FtsSyntaxError, SqliteSessionStore, resolveProjectStoreDir } from '../core/repl/store/index.js';
|
|
@@ -47,7 +49,7 @@ import { dispatchEdit, } from '../core/edits/index.js';
|
|
|
47
49
|
* packages/pugi-sdk/package.json); the publish workflow validates the
|
|
48
50
|
* three are in lockstep.
|
|
49
51
|
*/
|
|
50
|
-
const PUGI_CLI_VERSION = "0.1.0-beta.
|
|
52
|
+
const PUGI_CLI_VERSION = "0.1.0-beta.5";
|
|
51
53
|
const handlers = {
|
|
52
54
|
accounts,
|
|
53
55
|
agents: dispatchAgents,
|
|
@@ -326,14 +328,13 @@ async function dispatchWeb(args, flags, _session) {
|
|
|
326
328
|
* dispatch table stays narrow. The runner spawns + tears down the LSP
|
|
327
329
|
* server per invocation (no daemon yet — that ships in α7.7b).
|
|
328
330
|
*/
|
|
329
|
-
async function dispatchLsp(
|
|
330
|
-
const
|
|
331
|
+
async function dispatchLsp(_args, flags, _session) {
|
|
332
|
+
const msg = 'pugi lsp ships in alpha 7.7 (in-flight). Run `pugi --help` for current surface.';
|
|
331
333
|
if (flags.json)
|
|
332
|
-
console.log(
|
|
334
|
+
console.log(JSON.stringify({ ok: false, code: 'deferred', message: msg }));
|
|
333
335
|
else
|
|
334
|
-
console.log(
|
|
335
|
-
|
|
336
|
-
process.exitCode = result.exitCode;
|
|
336
|
+
console.log(msg);
|
|
337
|
+
process.exitCode = 6;
|
|
337
338
|
}
|
|
338
339
|
/**
|
|
339
340
|
* α7.7: `pugi patch` — apply a unified-diff patch from stdin or a file.
|
|
@@ -342,11 +343,13 @@ async function dispatchLsp(args, flags, _session) {
|
|
|
342
343
|
* security taxonomy so CI loops can alert on hostile patches without
|
|
343
344
|
* confusing them with operator typos.
|
|
344
345
|
*/
|
|
345
|
-
async function dispatchPatch(
|
|
346
|
-
const
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
346
|
+
async function dispatchPatch(_args, flags, _session) {
|
|
347
|
+
const msg = 'pugi patch ships in alpha 7.7 (in-flight). Run `pugi --help` for current surface.';
|
|
348
|
+
if (flags.json)
|
|
349
|
+
console.log(JSON.stringify({ ok: false, code: 'deferred', message: msg }));
|
|
350
|
+
else
|
|
351
|
+
console.log(msg);
|
|
352
|
+
process.exitCode = 6;
|
|
350
353
|
}
|
|
351
354
|
/**
|
|
352
355
|
* α7.7: `pugi worktree <op>` — manual scratch worktree management.
|
|
@@ -354,11 +357,13 @@ async function dispatchPatch(args, flags, _session) {
|
|
|
354
357
|
* primitives internally (`createWorktree` / `promoteWorktree`); this
|
|
355
358
|
* surface is the operator escape hatch for debug + experiment flows.
|
|
356
359
|
*/
|
|
357
|
-
async function dispatchWorktree(
|
|
358
|
-
const
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
360
|
+
async function dispatchWorktree(_args, flags, _session) {
|
|
361
|
+
const msg = 'pugi worktree ships in alpha 7.7 (in-flight). Run `pugi --help` for current surface.';
|
|
362
|
+
if (flags.json)
|
|
363
|
+
console.log(JSON.stringify({ ok: false, code: 'deferred', message: msg }));
|
|
364
|
+
else
|
|
365
|
+
console.log(msg);
|
|
366
|
+
process.exitCode = 6;
|
|
362
367
|
}
|
|
363
368
|
export async function runCli(argv) {
|
|
364
369
|
const { command, args, flags, isBareInvocation } = parseArgs(argv);
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run the delegate command. Parses args, validates the brief, opens a
|
|
3
|
+
* fresh session, and POSTs the delegate brief.
|
|
4
|
+
*
|
|
5
|
+
* Sets `process.exitCode` instead of throwing so the caller (cli.ts
|
|
6
|
+
* handlers table) does not need a try/catch wrapper.
|
|
7
|
+
*/
|
|
8
|
+
export async function runDelegateCommand(args, ctx) {
|
|
9
|
+
const slug = args[0];
|
|
10
|
+
const brief = args.slice(1).join(' ').trim();
|
|
11
|
+
if (!slug || !brief) {
|
|
12
|
+
ctx.writeOutput({
|
|
13
|
+
ok: false,
|
|
14
|
+
error: 'Usage: pugi delegate <persona-slug> "<one-sentence brief>"',
|
|
15
|
+
}, 'Usage: pugi delegate <persona-slug> "<one-sentence brief>"');
|
|
16
|
+
process.exitCode = 2;
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
// Brief size cap mirrors the server-side DTO (8000 chars). The local
|
|
20
|
+
// gate lets the operator know about the truncation before we waste a
|
|
21
|
+
// round-trip on a too-large brief.
|
|
22
|
+
if (brief.length > 8000) {
|
|
23
|
+
ctx.writeOutput({
|
|
24
|
+
ok: false,
|
|
25
|
+
error: `brief is ${brief.length} chars; max 8000`,
|
|
26
|
+
}, `pugi delegate: brief is ${brief.length} chars; max 8000.`);
|
|
27
|
+
process.exitCode = 2;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const config = ctx.resolveConfig();
|
|
31
|
+
if (!config) {
|
|
32
|
+
ctx.writeOutput({
|
|
33
|
+
ok: false,
|
|
34
|
+
error: 'no Pugi credential configured; run `pugi login` first',
|
|
35
|
+
}, 'pugi delegate: no credential configured. Run `pugi login` first.');
|
|
36
|
+
process.exitCode = 1;
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const opened = await ctx.openSession(config, ctx.workspaceCwd);
|
|
40
|
+
if ('error' in opened) {
|
|
41
|
+
ctx.writeOutput({ ok: false, error: opened.error }, `pugi delegate: session open failed: ${opened.error}`);
|
|
42
|
+
process.exitCode = 1;
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const result = await ctx.submitDelegate(config, opened.sessionId, {
|
|
46
|
+
persona: slug,
|
|
47
|
+
brief,
|
|
48
|
+
});
|
|
49
|
+
switch (result.status) {
|
|
50
|
+
case 'ok':
|
|
51
|
+
ctx.writeOutput({
|
|
52
|
+
ok: true,
|
|
53
|
+
sessionId: opened.sessionId,
|
|
54
|
+
dispatchId: result.response.dispatchId,
|
|
55
|
+
personaSlug: result.response.personaSlug,
|
|
56
|
+
}, `dispatched ${result.response.personaSlug} (dispatchId=${result.response.dispatchId}); stream via GET /sessions/${opened.sessionId}/stream.`);
|
|
57
|
+
return;
|
|
58
|
+
case 'unknown_persona':
|
|
59
|
+
ctx.writeOutput({ ok: false, error: result.message, code: result.code }, `pugi delegate: ${result.message}`);
|
|
60
|
+
process.exitCode = 3;
|
|
61
|
+
return;
|
|
62
|
+
case 'quota_exceeded':
|
|
63
|
+
ctx.writeOutput({ ok: false, error: result.message, code: result.code }, `pugi delegate: ${result.message}`);
|
|
64
|
+
process.exitCode = 4;
|
|
65
|
+
return;
|
|
66
|
+
case 'endpoint_missing':
|
|
67
|
+
ctx.writeOutput({
|
|
68
|
+
ok: false,
|
|
69
|
+
error: 'runtime does not expose POST /api/pugi/sessions/:id/delegate (upgrade admin-api to α7.5+)',
|
|
70
|
+
code: result.code,
|
|
71
|
+
}, 'pugi delegate: runtime does not expose the delegate endpoint. Upgrade admin-api to α7.5+.');
|
|
72
|
+
process.exitCode = 1;
|
|
73
|
+
return;
|
|
74
|
+
case 'unauthenticated':
|
|
75
|
+
case 'failed':
|
|
76
|
+
ctx.writeOutput({ ok: false, error: result.message, code: result.code }, `pugi delegate: ${result.message}`);
|
|
77
|
+
process.exitCode = 1;
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=delegate.js.map
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `pugi roster` command - α7.5 Tier 1 instantiation Phase 1.
|
|
3
|
+
*
|
|
4
|
+
* Lists the live Tier 1 personas with display name, role, and routing
|
|
5
|
+
* tag. The CLI walks two sources in order:
|
|
6
|
+
*
|
|
7
|
+
* 1. The local @pugi/personas roster (THE_TEN). Always succeeds; the
|
|
8
|
+
* ten brand-canonical personas are baked into the SDK.
|
|
9
|
+
* 2. The remote `GET /api/pugi/sessions/roster` endpoint when the
|
|
10
|
+
* operator has a valid credential. The remote response carries the
|
|
11
|
+
* server-side dispatch role + dispatchTag for each slug so the
|
|
12
|
+
* operator sees the actual routing decision the dispatcher will
|
|
13
|
+
* apply on a `pugi delegate <slug>` call.
|
|
14
|
+
*
|
|
15
|
+
* The command never fails if the network is unreachable - it falls back
|
|
16
|
+
* to local-only output with a one-line warning. This matches the
|
|
17
|
+
* local-first contract (ADR-0037): the operator can still see who is on
|
|
18
|
+
* the team without an API key.
|
|
19
|
+
*
|
|
20
|
+
* Output:
|
|
21
|
+
* - text default: a 3-column table (slug | name | role).
|
|
22
|
+
* - --json: a structured array of { slug, name, role, totem,
|
|
23
|
+
* dispatchTag } records, used by scripted callers.
|
|
24
|
+
*/
|
|
25
|
+
import { THE_TEN } from '@pugi/personas';
|
|
26
|
+
import { fetchPersonaRoster, } from '@pugi/sdk';
|
|
27
|
+
/**
|
|
28
|
+
* Fallback role + tag table the CLI uses when the runtime is unreachable
|
|
29
|
+
* (no credentials, network error, older runtime without the
|
|
30
|
+
* /sessions/roster endpoint). Mirrors the server-side
|
|
31
|
+
* persona-dispatch.ts PERSONA_REGISTRY so a CLI that ran without
|
|
32
|
+
* credentials still shows the operator the right routing intent.
|
|
33
|
+
*/
|
|
34
|
+
const FALLBACK_ROLE_BY_SLUG = Object.freeze({
|
|
35
|
+
main: { role: 'orchestrator', dispatchTag: 'reason' },
|
|
36
|
+
architect: { role: 'architect', dispatchTag: 'reason' },
|
|
37
|
+
dev: { role: 'coder', dispatchTag: 'codegen' },
|
|
38
|
+
qa: { role: 'verifier', dispatchTag: 'reason' },
|
|
39
|
+
pm: { role: 'release', dispatchTag: 'reason' },
|
|
40
|
+
devops: { role: 'devops', dispatchTag: 'reason' },
|
|
41
|
+
researcher: { role: 'researcher', dispatchTag: 'reason' },
|
|
42
|
+
analyst: { role: 'analyst', dispatchTag: 'summarize' },
|
|
43
|
+
designer: { role: 'design_qa', dispatchTag: 'reason' },
|
|
44
|
+
frontend: { role: 'frontend', dispatchTag: 'codegen' },
|
|
45
|
+
});
|
|
46
|
+
/**
|
|
47
|
+
* Build the roster rows by merging the local @pugi/personas brand
|
|
48
|
+
* roster with the remote dispatch metadata when a credential is
|
|
49
|
+
* available. Pure function so the runtime CLI command can unit-test it
|
|
50
|
+
* without standing up an Anvil endpoint.
|
|
51
|
+
*/
|
|
52
|
+
export function mergeRoster(brandRoster, remote) {
|
|
53
|
+
const remoteIndex = new Map((remote ?? []).map((entry) => [entry.slug, entry]));
|
|
54
|
+
return brandRoster.map((persona) => {
|
|
55
|
+
const fromRemote = remoteIndex.get(persona.slug);
|
|
56
|
+
const fallback = FALLBACK_ROLE_BY_SLUG[persona.slug] ?? {
|
|
57
|
+
role: persona.role,
|
|
58
|
+
dispatchTag: 'reason',
|
|
59
|
+
};
|
|
60
|
+
return {
|
|
61
|
+
slug: persona.slug,
|
|
62
|
+
name: persona.name,
|
|
63
|
+
totem: persona.animal,
|
|
64
|
+
role: fromRemote?.role ?? fallback.role,
|
|
65
|
+
dispatchTag: fromRemote?.dispatchTag ?? fallback.dispatchTag,
|
|
66
|
+
oneLiner: persona.oneLiner,
|
|
67
|
+
source: fromRemote ? 'remote' : 'local-fallback',
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Render a roster as a plain-text 3-column table the operator reads in
|
|
73
|
+
* the terminal. The column widths grow to fit the longest cell so a
|
|
74
|
+
* future displayName drift does not truncate silently.
|
|
75
|
+
*/
|
|
76
|
+
export function renderRosterTable(rows) {
|
|
77
|
+
if (rows.length === 0)
|
|
78
|
+
return 'Roster is empty.';
|
|
79
|
+
const head = { slug: 'slug', name: 'name', totem: 'totem', role: 'role', dispatchTag: 'tag' };
|
|
80
|
+
const widths = {
|
|
81
|
+
slug: Math.max(head.slug.length, ...rows.map((r) => r.slug.length)),
|
|
82
|
+
name: Math.max(head.name.length, ...rows.map((r) => r.name.length)),
|
|
83
|
+
totem: Math.max(head.totem.length, ...rows.map((r) => r.totem.length)),
|
|
84
|
+
role: Math.max(head.role.length, ...rows.map((r) => r.role.length)),
|
|
85
|
+
dispatchTag: Math.max(head.dispatchTag.length, ...rows.map((r) => r.dispatchTag.length)),
|
|
86
|
+
};
|
|
87
|
+
const pad = (s, width) => s + ' '.repeat(Math.max(0, width - s.length));
|
|
88
|
+
const line = (r) => [pad(r.slug, widths.slug), pad(r.name, widths.name), pad(r.totem, widths.totem), pad(r.role, widths.role), pad(r.dispatchTag, widths.dispatchTag)].join(' ');
|
|
89
|
+
const header = line(head);
|
|
90
|
+
const sep = '-'.repeat(header.length);
|
|
91
|
+
return [header, sep, ...rows.map((r) => line(r))].join('\n');
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Resolve the roster by walking remote + local sources. The CLI command
|
|
95
|
+
* is a thin wrapper around this function so unit tests can exercise the
|
|
96
|
+
* merge logic without hitting the runtime.
|
|
97
|
+
*/
|
|
98
|
+
export async function resolveRoster(config) {
|
|
99
|
+
if (!config) {
|
|
100
|
+
return {
|
|
101
|
+
rows: mergeRoster(THE_TEN, null),
|
|
102
|
+
warning: 'no credential configured; showing local @pugi/personas roster only',
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
const result = await fetchPersonaRoster(config);
|
|
106
|
+
if (result.status === 'ok') {
|
|
107
|
+
return { rows: mergeRoster(THE_TEN, result.response.personas), warning: null };
|
|
108
|
+
}
|
|
109
|
+
const reason = result.status === 'endpoint_missing'
|
|
110
|
+
? 'runtime does not expose /api/pugi/sessions/roster (upgrade admin-api to α7.5+)'
|
|
111
|
+
: result.message;
|
|
112
|
+
return {
|
|
113
|
+
rows: mergeRoster(THE_TEN, null),
|
|
114
|
+
warning: `roster fetch failed (${result.status}): ${reason}; showing local roster only`,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=roster.js.map
|
package/dist/tools/registry.js
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
const registry = [
|
|
2
|
-
// α7.7: unified-diff patch apply. Routes through the same security
|
|
3
|
-
// gate as Layer A/B/C, so the risk class matches `edit`/`write`
|
|
4
|
-
// (medium — writes inside the workspace, never to protected files).
|
|
5
|
-
{ name: 'apply_patch', permission: 'edit', risk: 'medium', concurrencySafe: false, m1: true },
|
|
6
2
|
{ name: 'bash', permission: 'bash', risk: 'high', concurrencySafe: false, m1: true },
|
|
7
3
|
{ name: 'edit', permission: 'edit', risk: 'medium', concurrencySafe: false, m1: true },
|
|
8
4
|
{ name: 'glob', permission: 'read', risk: 'low', concurrencySafe: true, m1: true },
|
|
9
5
|
{ name: 'grep', permission: 'read', risk: 'low', concurrencySafe: true, m1: true },
|
|
10
|
-
// α7.7: LSP read-only surface. Server runs locally, no Anvil
|
|
11
|
-
// round-trip. Concurrency-safe because every operation reads
|
|
12
|
-
// server state without mutating workspace files.
|
|
13
|
-
{ name: 'lsp_definition', permission: 'read', risk: 'low', concurrencySafe: true, m1: true },
|
|
14
|
-
{ name: 'lsp_diagnostics', permission: 'read', risk: 'low', concurrencySafe: true, m1: true },
|
|
15
|
-
{ name: 'lsp_hover', permission: 'read', risk: 'low', concurrencySafe: true, m1: true },
|
|
16
|
-
{ name: 'lsp_references', permission: 'read', risk: 'low', concurrencySafe: true, m1: true },
|
|
17
6
|
{ name: 'question', permission: 'none', risk: 'low', concurrencySafe: false, m1: true },
|
|
18
7
|
{ name: 'read', permission: 'read', risk: 'low', concurrencySafe: true, m1: true },
|
|
19
8
|
{ name: 'skill', permission: 'read', risk: 'low', concurrencySafe: true, m1: true },
|
|
@@ -22,13 +11,6 @@ const registry = [
|
|
|
22
11
|
{ name: 'task_list', permission: 'none', risk: 'low', concurrencySafe: true, m1: true },
|
|
23
12
|
{ name: 'task_update', permission: 'none', risk: 'low', concurrencySafe: false, m1: true },
|
|
24
13
|
{ name: 'web_fetch', permission: 'network', risk: 'medium', concurrencySafe: true, m1: true },
|
|
25
|
-
// α7.7: scratch worktree management. `worktree_create` writes nothing
|
|
26
|
-
// dangerous (a clone under `.pugi/worktrees/`); `worktree_promote`
|
|
27
|
-
// applies a diff back to the main tree, so it shares the `edit`
|
|
28
|
-
// risk class. `worktree_drop` is the cleanup primitive.
|
|
29
|
-
{ name: 'worktree_create', permission: 'edit', risk: 'low', concurrencySafe: false, m1: true },
|
|
30
|
-
{ name: 'worktree_drop', permission: 'edit', risk: 'low', concurrencySafe: false, m1: true },
|
|
31
|
-
{ name: 'worktree_promote', permission: 'edit', risk: 'medium', concurrencySafe: false, m1: true },
|
|
32
14
|
{ name: 'write', permission: 'edit', risk: 'medium', concurrencySafe: false, m1: true },
|
|
33
15
|
];
|
|
34
16
|
export const toolRegistry = registry.sort((a, b) => a.name.localeCompare(b.name));
|
package/dist/tui/repl.js
CHANGED
|
@@ -49,7 +49,12 @@ export function Repl(props) {
|
|
|
49
49
|
// α6.14 wave 3: boot splash visible until first input, first
|
|
50
50
|
// `agent.spawned` event, or 10s idle. The host gates the initial
|
|
51
51
|
// visibility on `--no-splash` / PUGI_SKIP_SPLASH via `skipSplash`.
|
|
52
|
-
|
|
52
|
+
// α6.14.6 CEO dogfood 2026-05-25: default splash to HIDDEN at boot
|
|
53
|
+
// (parity with Claude Code's minimal one-line banner). Operator can
|
|
54
|
+
// opt back in via `/splash` slash. The chafa pug pre-print + header
|
|
55
|
+
// line already give the brand cue without the multi-row Plan/Model/
|
|
56
|
+
// Tenant block crowding the top.
|
|
57
|
+
const [splashVisible, setSplashVisible] = useState(false);
|
|
53
58
|
const dismissSplash = useCallback(() => setSplashVisible(false), []);
|
|
54
59
|
// α6.14 wave 3: workspace context snapshot for the status bar. We
|
|
55
60
|
// read once at mount and freeze; a brand-new PUGI.md or skill is
|
|
@@ -178,14 +183,15 @@ export function Repl(props) {
|
|
|
178
183
|
return undefined;
|
|
179
184
|
return props.session.cancel();
|
|
180
185
|
}, [props.session, modalActive]);
|
|
181
|
-
// α6.14.
|
|
182
|
-
//
|
|
183
|
-
//
|
|
184
|
-
//
|
|
185
|
-
//
|
|
186
|
-
//
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
// α6.14.5 CEO dogfood 2026-05-25 (parity with Claude Code): input
|
|
187
|
+
// box pinned to alt-screen BOTTOM, conversation grows above it.
|
|
188
|
+
// Beta.3's height={rows} fix broke keystroke focus - raw echo at
|
|
189
|
+
// viewport bottom. The right pattern is minHeight on the root +
|
|
190
|
+
// flexGrow=1 on the MainArea Box: empty alt-screen lives ABOVE the
|
|
191
|
+
// input, and the input stays the sole focusable surface adjacent
|
|
192
|
+
// to the cursor row, so all keystrokes route through it.
|
|
193
|
+
const altScreenRows = process.stdout.rows ?? 24;
|
|
194
|
+
return (_jsxs(Box, { flexDirection: "column", paddingX: 1, minHeight: altScreenRows, children: [props.updateBanner ? _jsx(UpdateBanner, { result: props.updateBanner }) : null, splashVisible ? (_jsx(ReplSplash, { cliVersion: state.cliVersion, workspaceLabel: state.workspaceLabel, plan: props.splashPlan, model: props.splashModel, tenant: props.splashTenant, onDismiss: dismissSplash, mascotPrePrinted: props.mascotPrePrinted === true })) : null, _jsx(Header, { state: state }), _jsx(Box, { flexDirection: "column", marginTop: 1, flexGrow: 1, justifyContent: "flex-end", children: overlay === 'help' ? (_jsx(HelpOverlay, {})) : overlay === 'roster' ? (_jsx(RosterOverlay, {})) : overlay === 'farewell' ? (_jsx(FarewellOverlay, {})) : (_jsx(MainArea, { state: state, personaNames: personaNames, nowEpochMs: tickNow, hideToolStream: props.hideToolStream === true, toolStreamCollapsed: toolStreamCollapsed })) }), state.pendingAsk ? (_jsx(Box, { marginTop: 1, children: _jsx(AskModal, { tag: state.pendingAsk, onResolve: handleAskResolve }) })) : null, state.pendingPlanReview ? (_jsx(Box, { marginTop: 1, children: _jsx(PlanReviewModal, { tag: state.pendingPlanReview, onResolve: handlePlanReviewResolve }) })) : null, _jsxs(Box, { flexDirection: "column", marginTop: 1, children: [overlay === 'farewell' || modalActive ? null : (_jsx(InputBox, { onSubmit: handleSubmit, onExit: handleExit, onCancel: handleCancel, now: props.now,
|
|
189
195
|
// Slug from process.cwd() (full path) so two workspaces with
|
|
190
196
|
// the same basename do not share history. state.workspaceLabel
|
|
191
197
|
// is the basename only. Codex review P2.
|