@gajae-code/coding-agent 0.9.0 → 0.9.1
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/CHANGELOG.md +24 -0
- package/dist/types/config/settings-schema.d.ts +14 -0
- package/dist/types/gjc-runtime/tmux-common.d.ts +1 -0
- package/dist/types/modes/components/thinking-selector.d.ts +2 -2
- package/dist/types/modes/controllers/selector-controller.d.ts +1 -0
- package/dist/types/modes/interactive-mode.d.ts +2 -0
- package/dist/types/modes/rpc/rpc-mode.d.ts +1 -3
- package/dist/types/modes/rpc/rpc-socket-security.d.ts +3 -0
- package/dist/types/modes/types.d.ts +2 -0
- package/dist/types/modes/utils/injected-user-submission.d.ts +52 -0
- package/dist/types/notifications/config-commands.d.ts +9 -0
- package/dist/types/notifications/config.d.ts +16 -0
- package/dist/types/notifications/index.d.ts +2 -0
- package/dist/types/notifications/lifecycle-commands.d.ts +1 -0
- package/dist/types/notifications/lifecycle-control-runtime.d.ts +2 -1
- package/dist/types/notifications/reply-sent-store.d.ts +53 -0
- package/dist/types/notifications/rich-draft.d.ts +68 -0
- package/dist/types/notifications/rich-render.d.ts +90 -0
- package/dist/types/notifications/telegram-daemon-cli.d.ts +3 -3
- package/dist/types/notifications/telegram-daemon.d.ts +22 -0
- package/dist/types/notifications/telegram-reference.d.ts +7 -0
- package/dist/types/notifications/threaded-render.d.ts +8 -0
- package/dist/types/utils/pasted-image-path.d.ts +30 -0
- package/package.json +8 -11
- package/src/cli/notify-cli.ts +11 -9
- package/src/config/keybindings.ts +1 -1
- package/src/config/settings-schema.ts +8 -0
- package/src/gjc-runtime/launch-tmux.ts +6 -0
- package/src/gjc-runtime/team-runtime.ts +11 -4
- package/src/gjc-runtime/tmux-common.ts +1 -0
- package/src/gjc-runtime/ultragoal-runtime.ts +10 -1
- package/src/internal-urls/docs-index.generated.ts +6 -6
- package/src/lsp/client.ts +1 -0
- package/src/modes/components/footer.ts +7 -2
- package/src/modes/components/thinking-selector.ts +10 -8
- package/src/modes/controllers/event-controller.ts +11 -2
- package/src/modes/controllers/extension-ui-controller.ts +8 -1
- package/src/modes/controllers/input-controller.ts +12 -17
- package/src/modes/controllers/selector-controller.ts +41 -0
- package/src/modes/interactive-mode.ts +5 -0
- package/src/modes/rpc/rpc-mode.ts +3 -9
- package/src/modes/rpc/rpc-socket-security.ts +13 -1
- package/src/modes/types.ts +2 -0
- package/src/modes/utils/injected-user-submission.ts +94 -0
- package/src/notifications/config-commands.ts +20 -0
- package/src/notifications/config.ts +27 -0
- package/src/notifications/index.ts +28 -5
- package/src/notifications/lifecycle-commands.ts +37 -16
- package/src/notifications/lifecycle-control-runtime.ts +8 -3
- package/src/notifications/reply-sent-store.ts +134 -0
- package/src/notifications/rich-draft.ts +107 -0
- package/src/notifications/rich-render.ts +142 -0
- package/src/notifications/telegram-daemon-cli.ts +52 -5
- package/src/notifications/telegram-daemon.ts +346 -89
- package/src/notifications/telegram-reference.ts +17 -0
- package/src/notifications/threaded-render.ts +28 -1
- package/src/prompts/tools/search-tool-bm25.md +5 -0
- package/src/sdk.ts +36 -8
- package/src/session/agent-session.ts +6 -4
- package/src/slash-commands/builtin-registry.ts +78 -1
- package/src/utils/pasted-image-path.ts +170 -0
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@gajae-code/coding-agent",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.1",
|
|
5
5
|
"description": "Gajae Code CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://gajae-code.com",
|
|
7
|
-
"author": "Yeachan-Heo",
|
|
8
|
-
"contributors": [
|
|
9
|
-
"Mario Zechner"
|
|
10
|
-
],
|
|
7
|
+
"author": "Yeachan-Heo and Gajae Code Contributors",
|
|
11
8
|
"license": "MIT",
|
|
12
9
|
"repository": {
|
|
13
10
|
"type": "git",
|
|
@@ -52,12 +49,12 @@
|
|
|
52
49
|
"@agentclientprotocol/sdk": "0.21.0",
|
|
53
50
|
"@babel/parser": "^7.29.3",
|
|
54
51
|
"@mozilla/readability": "^0.6.0",
|
|
55
|
-
"@gajae-code/stats": "0.9.
|
|
56
|
-
"@gajae-code/agent-core": "0.9.
|
|
57
|
-
"@gajae-code/ai": "0.9.
|
|
58
|
-
"@gajae-code/natives": "0.9.
|
|
59
|
-
"@gajae-code/tui": "0.9.
|
|
60
|
-
"@gajae-code/utils": "0.9.
|
|
52
|
+
"@gajae-code/stats": "0.9.1",
|
|
53
|
+
"@gajae-code/agent-core": "0.9.1",
|
|
54
|
+
"@gajae-code/ai": "0.9.1",
|
|
55
|
+
"@gajae-code/natives": "0.9.1",
|
|
56
|
+
"@gajae-code/tui": "0.9.1",
|
|
57
|
+
"@gajae-code/utils": "0.9.1",
|
|
61
58
|
"@puppeteer/browsers": "^2.13.0",
|
|
62
59
|
"@types/turndown": "5.0.6",
|
|
63
60
|
"@xterm/headless": "^6.0.0",
|
package/src/cli/notify-cli.ts
CHANGED
|
@@ -249,18 +249,18 @@ export async function promptForToken(
|
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
const THREADED_ENABLED_SUCCESS =
|
|
252
|
-
"Telegram Threaded Mode capability verified for this bot. GJC will request a private-chat topic per session; if Telegram ever refuses topic creation, notifications fall back to this flat chat with a one-time nudge.\n";
|
|
252
|
+
"Telegram Threaded Mode capability verified for this bot. GJC will request a private-chat topic per session; if Telegram ever refuses topic creation, notifications fall back to this flat chat with inline ask buttons only and a one-time Threaded Mode nudge.\n";
|
|
253
253
|
|
|
254
254
|
const THREADED_MISSING_WARNING =
|
|
255
|
-
"Warning: Telegram getMe did not include has_topics_enabled, so GJC cannot verify private-chat Threaded Mode capability for this bot. Setup will continue;
|
|
255
|
+
"Warning: Telegram getMe did not include has_topics_enabled, so GJC cannot verify private-chat Threaded Mode capability for this bot. Setup will continue; flat private-chat fallback supports outbound notifications and inline ask buttons only. Free-text replies and session commands require Threaded Mode/topic routing.\n";
|
|
256
256
|
|
|
257
257
|
const THREADED_NONINTERACTIVE_WARNING =
|
|
258
|
-
"Warning: Telegram Threaded Mode capability is OFF for this bot. Setup will be saved because this run is non-interactive
|
|
258
|
+
"Warning: Telegram Threaded Mode capability is OFF for this bot. Setup will be saved because this run is non-interactive. Flat private-chat fallback supports outbound notifications and inline ask buttons only; free-text replies and session commands require enabling Threaded Mode in @BotFather > Bot Settings > Threads Settings.\n";
|
|
259
259
|
|
|
260
260
|
const THREADED_DISABLED_GUIDANCE =
|
|
261
261
|
"Telegram Threaded Mode is OFF for this bot. GJC needs Telegram private-chat topics so each session can use its own thread.\n" +
|
|
262
|
-
"GJC cannot enable this through the Bot API. Open @BotFather
|
|
263
|
-
"
|
|
262
|
+
"GJC cannot enable this through the Bot API. Open @BotFather > Bot Settings > Threads Settings for this bot, enable Threaded Mode / forum topics for private chats, then return here.\n" +
|
|
263
|
+
"Without Threaded Mode, flat private-chat fallback supports outbound notifications and inline ask buttons only; free-text replies and session commands require topic routing.\n";
|
|
264
264
|
|
|
265
265
|
const THREADED_DISABLED_PROMPT =
|
|
266
266
|
"Press Enter after enabling Threaded Mode, or type skip to finish setup with a warning: ";
|
|
@@ -270,7 +270,7 @@ const THREADED_STILL_OFF = "Telegram still reports Threaded Mode OFF for this bo
|
|
|
270
270
|
const THREADED_RETRY_PROMPT = "Press Enter to check again, or type skip to finish setup with a warning: ";
|
|
271
271
|
|
|
272
272
|
const THREADED_SKIP_WARNING =
|
|
273
|
-
"Warning: continuing without verified Telegram Threaded Mode capability. Setup will be saved
|
|
273
|
+
"Warning: continuing without verified Telegram Threaded Mode capability. Setup will be saved. Flat private-chat fallback supports outbound notifications and inline ask buttons only; free-text replies and session commands require enabling Threaded Mode in BotFather.\n";
|
|
274
274
|
|
|
275
275
|
const THREADED_INVALID_INPUT = "Type Enter to retry or skip to continue with a warning.\n";
|
|
276
276
|
|
|
@@ -500,8 +500,10 @@ ${chalk.bold("Examples:")}
|
|
|
500
500
|
|
|
501
501
|
${chalk.bold("Threaded Mode:")}
|
|
502
502
|
GJC uses Telegram private-chat topics for per-session threads. Setup verifies the bot
|
|
503
|
-
capability via getMe.has_topics_enabled.
|
|
504
|
-
bots cannot toggle it through the Bot API. If Telegram refuses topic
|
|
505
|
-
GJC delivers flat to the paired private chat
|
|
503
|
+
capability via getMe.has_topics_enabled. Enable Threaded Mode in @BotFather > Bot Settings
|
|
504
|
+
> Threads Settings; bots cannot toggle it through the Bot API. If Telegram refuses topic
|
|
505
|
+
creation at runtime, GJC delivers flat to the paired private chat with outbound notifications
|
|
506
|
+
and inline ask buttons only, then nudges you to enable Threaded Mode for free-text replies
|
|
507
|
+
and session commands.
|
|
506
508
|
`);
|
|
507
509
|
}
|
|
@@ -61,7 +61,7 @@ declare module "@gajae-code/tui" {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
export function defaultMessageQueueKeysForPlatform(platform: NodeJS.Platform = process.platform): KeyId {
|
|
64
|
-
return platform === "win32" ? "alt+q" : "alt+enter";
|
|
64
|
+
return platform === "win32" || platform === "darwin" ? "alt+q" : "alt+enter";
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/**
|
|
@@ -258,6 +258,8 @@ export const SETTINGS_SCHEMA = {
|
|
|
258
258
|
"notifications.enabled": { type: "boolean", default: false },
|
|
259
259
|
"notifications.telegram.botToken": { type: "string", default: undefined },
|
|
260
260
|
"notifications.telegram.chatId": { type: "string", default: undefined },
|
|
261
|
+
"notifications.telegram.rich.enabled": { type: "boolean", default: true },
|
|
262
|
+
"notifications.telegram.richDraft.enabled": { type: "boolean", default: false },
|
|
261
263
|
"notifications.discord.botToken": { type: "string", default: undefined },
|
|
262
264
|
"notifications.discord.channelId": { type: "string", default: undefined },
|
|
263
265
|
"notifications.slack.botToken": { type: "string", default: undefined },
|
|
@@ -3408,6 +3410,12 @@ export interface NotificationsSettings {
|
|
|
3408
3410
|
telegram: {
|
|
3409
3411
|
botToken: string | undefined;
|
|
3410
3412
|
chatId: string | undefined;
|
|
3413
|
+
rich: {
|
|
3414
|
+
enabled: boolean;
|
|
3415
|
+
};
|
|
3416
|
+
richDraft: {
|
|
3417
|
+
enabled: boolean;
|
|
3418
|
+
};
|
|
3411
3419
|
};
|
|
3412
3420
|
discord: {
|
|
3413
3421
|
botToken: string | undefined;
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
buildGjcTmuxSessionName,
|
|
14
14
|
buildGjcTmuxSessionSlug,
|
|
15
15
|
GJC_DEFAULT_TMUX_SESSION,
|
|
16
|
+
GJC_TMUX_ACTIVE_SESSION_ENV,
|
|
16
17
|
GJC_TMUX_COMMAND_ENV,
|
|
17
18
|
GJC_TMUX_MOUSE_ENV,
|
|
18
19
|
GJC_TMUX_PROFILE_ENV,
|
|
@@ -688,6 +689,11 @@ export function buildDefaultTmuxLaunchPlan(context: TmuxLaunchContext): TmuxLaun
|
|
|
688
689
|
extraEnv: {
|
|
689
690
|
[GJC_COORDINATOR_SESSION_ID_ENV]: sessionId,
|
|
690
691
|
[GJC_COORDINATOR_SESSION_STATE_FILE_ENV]: sessionStateFile,
|
|
692
|
+
// Carry the GJC-managed session name into the child so `gjc team`
|
|
693
|
+
// can target the correct leader session by name. Under psmux on
|
|
694
|
+
// Windows the inherited TMUX_PANE can resolve to the wrong/default
|
|
695
|
+
// session, which would split/send workers into the wrong session.
|
|
696
|
+
[GJC_TMUX_ACTIVE_SESSION_ENV]: sessionName,
|
|
691
697
|
},
|
|
692
698
|
platform,
|
|
693
699
|
},
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
import {
|
|
23
23
|
buildGjcTmuxExactOptionTarget,
|
|
24
24
|
buildGjcTmuxUntaggedSessionHint,
|
|
25
|
+
GJC_TMUX_ACTIVE_SESSION_ENV,
|
|
25
26
|
GJC_TMUX_PROFILE_OPTION,
|
|
26
27
|
GJC_TMUX_PROFILE_VALUE,
|
|
27
28
|
resolveGjcTmuxCommand,
|
|
@@ -1922,16 +1923,22 @@ function tagTmuxSessionAsGjcLeader(tmuxCommand: string, sessionName: string): bo
|
|
|
1922
1923
|
function readCurrentTmuxLeaderContext(tmuxCommand: string, env: NodeJS.ProcessEnv): GjcTmuxLeaderContext {
|
|
1923
1924
|
if (Bun.which(tmuxCommand) === null)
|
|
1924
1925
|
throw new Error(buildTeamTmuxLeaderRequirementMessage(`tmux_not_installed:${tmuxCommand}`));
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1926
|
+
// Prefer the explicit GJC-managed session name propagated by `gjc --tmux`
|
|
1927
|
+
// (GJC_TMUX_ACTIVE_SESSION). Under psmux on Windows the inherited TMUX_PANE
|
|
1928
|
+
// can resolve to the wrong/default session, so querying the tagged session
|
|
1929
|
+
// by name is authoritative for GJC-launched leaders. Fall back to TMUX_PANE,
|
|
1930
|
+
// then to the ambient session, to keep native tmux/WSL flows unchanged.
|
|
1931
|
+
const activeSession = env[GJC_TMUX_ACTIVE_SESSION_ENV]?.trim();
|
|
1932
|
+
const displayTarget = activeSession ? buildGjcTmuxExactOptionTarget(activeSession, { env }) : env.TMUX_PANE?.trim();
|
|
1933
|
+
const args = displayTarget
|
|
1934
|
+
? ["display-message", "-p", "-t", displayTarget, "#S:#I #{pane_id}"]
|
|
1928
1935
|
: ["display-message", "-p", "#S:#I #{pane_id}"];
|
|
1929
1936
|
const result = Bun.spawnSync([tmuxCommand, ...args], { stdout: "pipe", stderr: "pipe" });
|
|
1930
1937
|
if (result.exitCode !== 0) {
|
|
1931
1938
|
// Distinguish "you are not inside any tmux session" from a genuine tmux
|
|
1932
1939
|
// query failure so the caller gets actionable guidance instead of raw
|
|
1933
1940
|
// tmux stderr. `gjc team` needs a tmux leader; outside tmux there is none.
|
|
1934
|
-
const insideTmux = Boolean(env.TMUX?.trim() || env.TMUX_PANE?.trim());
|
|
1941
|
+
const insideTmux = Boolean(env.TMUX?.trim() || env.TMUX_PANE?.trim() || activeSession);
|
|
1935
1942
|
const stderr = result.stderr.toString().trim();
|
|
1936
1943
|
throw new Error(
|
|
1937
1944
|
buildTeamTmuxLeaderRequirementMessage(
|
|
@@ -4,6 +4,7 @@ import { resolveGjcTmuxBinary } from "./psmux-detect";
|
|
|
4
4
|
export const GJC_DEFAULT_TMUX_SESSION = "gajae_code";
|
|
5
5
|
export const GJC_TMUX_SESSION_PREFIX = `${GJC_DEFAULT_TMUX_SESSION}_`;
|
|
6
6
|
export const GJC_TMUX_COMMAND_ENV = "GJC_TMUX_COMMAND";
|
|
7
|
+
export const GJC_TMUX_ACTIVE_SESSION_ENV = "GJC_TMUX_ACTIVE_SESSION";
|
|
7
8
|
export const GJC_TMUX_PROFILE_ENV = "GJC_TMUX_PROFILE";
|
|
8
9
|
export const GJC_TMUX_MOUSE_ENV = "GJC_MOUSE";
|
|
9
10
|
export const GJC_TMUX_PROFILE_OPTION = "@gjc-profile";
|
|
@@ -4544,6 +4544,15 @@ function parseGitNameStatus(output: string): UltragoalChangeSetPath[] {
|
|
|
4544
4544
|
return rows;
|
|
4545
4545
|
}
|
|
4546
4546
|
|
|
4547
|
+
function categorizeCiChangedPath(value: string): UltragoalChangeCategory {
|
|
4548
|
+
// CI_DEV_CHANGED_PATHS intentionally carries path names only. Mixed registries
|
|
4549
|
+
// such as settings-schema.ts require diff-level narrowing; without the diff,
|
|
4550
|
+
// treating the whole registry as computer-control source forces the mandatory
|
|
4551
|
+
// computer red-team suite on unrelated settings changes.
|
|
4552
|
+
if (isSettingsSchemaPath(value)) return "other";
|
|
4553
|
+
return categorizeComputerChangePath(value);
|
|
4554
|
+
}
|
|
4555
|
+
|
|
4547
4556
|
function ciDevChangedPathRows(): UltragoalChangeSetPath[] {
|
|
4548
4557
|
const raw = process.env.CI_DEV_CHANGED_PATHS;
|
|
4549
4558
|
if (!raw) return [];
|
|
@@ -4554,7 +4563,7 @@ function ciDevChangedPathRows(): UltragoalChangeSetPath[] {
|
|
|
4554
4563
|
.map(pathValue => ({
|
|
4555
4564
|
path: normalizeRepoPath(pathValue),
|
|
4556
4565
|
status: "unknown" as UltragoalChangeStatus,
|
|
4557
|
-
category:
|
|
4566
|
+
category: categorizeCiChangedPath(pathValue),
|
|
4558
4567
|
}));
|
|
4559
4568
|
}
|
|
4560
4569
|
|