@gajae-code/coding-agent 0.8.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -0
- package/dist/types/append-only-mode.d.ts +31 -0
- package/dist/types/capability/rule.d.ts +8 -0
- package/dist/types/cli/completion-cli.d.ts +41 -0
- package/dist/types/cli/config-cli.d.ts +1 -0
- package/dist/types/cli/fixture-report.d.ts +20 -0
- package/dist/types/cli/fixture-report.test.d.ts +1 -0
- package/dist/types/cli/nofile-limit.d.ts +11 -0
- package/dist/types/cli/notify-cli.d.ts +7 -0
- package/dist/types/cli/update-cli.d.ts +22 -0
- package/dist/types/cli.d.ts +124 -1
- package/dist/types/commands/completion.d.ts +29 -0
- package/dist/types/commands/config.d.ts +3 -0
- package/dist/types/commands/deep-interview.d.ts +3 -0
- package/dist/types/config/file-lock.d.ts +7 -6
- package/dist/types/config/keybindings.d.ts +2 -2
- package/dist/types/config/model-profile-activation.d.ts +6 -0
- package/dist/types/config/settings-schema.d.ts +105 -1
- package/dist/types/config/settings.d.ts +8 -0
- package/dist/types/discovery/index.d.ts +1 -0
- package/dist/types/export/html/template.generated.d.ts +1 -1
- package/dist/types/export/ttsr.d.ts +14 -3
- package/dist/types/extensibility/extensions/runner.d.ts +2 -1
- package/dist/types/extensibility/extensions/types.d.ts +8 -0
- package/dist/types/gjc-runtime/deep-interview-ambiguity.d.ts +39 -0
- package/dist/types/gjc-runtime/deep-interview-recorder.d.ts +10 -1
- package/dist/types/gjc-runtime/deep-interview-runtime.d.ts +1 -1
- package/dist/types/gjc-runtime/deep-interview-state.d.ts +17 -2
- package/dist/types/gjc-runtime/session-state-sidecar.d.ts +7 -0
- package/dist/types/gjc-runtime/state-writer.d.ts +3 -0
- package/dist/types/gjc-runtime/team-runtime.d.ts +28 -1
- package/dist/types/gjc-runtime/ultragoal-receipt-freshness.d.ts +42 -0
- package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +120 -13
- package/dist/types/goals/runtime.d.ts +1 -0
- package/dist/types/hooks/native-skill-hook.d.ts +12 -0
- package/dist/types/main.d.ts +4 -1
- package/dist/types/modes/components/assistant-message.d.ts +5 -1
- package/dist/types/modes/components/model-selector.d.ts +4 -0
- package/dist/types/modes/components/queued-message-selector.d.ts +12 -0
- package/dist/types/modes/components/settings-selector.d.ts +2 -0
- package/dist/types/modes/components/status-line.d.ts +9 -0
- package/dist/types/modes/controllers/command-controller.d.ts +1 -0
- package/dist/types/modes/controllers/event-controller.d.ts +5 -0
- package/dist/types/modes/controllers/input-controller.d.ts +1 -3
- package/dist/types/modes/interactive-mode.d.ts +2 -0
- package/dist/types/modes/print-mode.d.ts +13 -1
- package/dist/types/modes/prompt-action-autocomplete.d.ts +1 -1
- package/dist/types/modes/rpc/rpc-types.d.ts +14 -0
- package/dist/types/modes/shared/agent-wire/event-contract.d.ts +19 -0
- package/dist/types/modes/shared/agent-wire/event-envelope.d.ts +23 -1
- package/dist/types/modes/types.d.ts +1 -0
- package/dist/types/modes/utils/ui-helpers.d.ts +1 -0
- package/dist/types/notifications/config.d.ts +14 -1
- package/dist/types/notifications/daemon-paths.d.ts +1 -0
- package/dist/types/notifications/index.d.ts +6 -3
- package/dist/types/notifications/lifecycle-commands.d.ts +11 -3
- package/dist/types/notifications/telegram-daemon.d.ts +23 -3
- package/dist/types/notifications/telegram-reference.d.ts +0 -5
- package/dist/types/notifications/threaded-render.d.ts +6 -0
- package/dist/types/runtime-api-key.d.ts +7 -0
- package/dist/types/sdk.d.ts +3 -0
- package/dist/types/session/agent-session.d.ts +53 -1
- package/dist/types/session/agent-storage.d.ts +1 -0
- package/dist/types/session/file-mention-pruning.d.ts +8 -0
- package/dist/types/session/messages.d.ts +4 -0
- package/dist/types/session/session-manager.d.ts +17 -1
- package/dist/types/skill-state/active-state.d.ts +18 -1
- package/dist/types/system-prompt.d.ts +18 -2
- package/dist/types/task/executor.d.ts +3 -0
- package/dist/types/task/fork-context-budget.d.ts +7 -0
- package/dist/types/task/token-log.d.ts +30 -0
- package/dist/types/task/token-log.test.d.ts +1 -0
- package/dist/types/tools/bisect.d.ts +81 -0
- package/dist/types/tools/computer.d.ts +2 -2
- package/dist/types/tools/index.d.ts +1 -0
- package/dist/types/tools/search.d.ts +2 -2
- package/dist/types/utils/file-mentions.d.ts +14 -0
- package/dist/types/utils/git.d.ts +32 -0
- package/dist/types/web/scrapers/youtube.d.ts +8 -0
- package/dist/types/workflow/workflow-intent-diff.d.ts +8 -2
- package/dist/types/workflow/workflow-intent-report-consumer.d.ts +50 -0
- package/dist/types/workflow/workflow-intent-report-schema.d.ts +2 -0
- package/dist/types/workflow/workflow-intent-report.d.ts +48 -0
- package/package.json +7 -7
- package/src/append-only-mode.ts +58 -0
- package/src/autoresearch/prompt.md +1 -1
- package/src/autoresearch/tools/log-experiment.ts +1 -1
- package/src/capability/rule.ts +9 -0
- package/src/cli/completion-cli.ts +234 -0
- package/src/cli/config-cli.ts +61 -9
- package/src/cli/fast-help.ts +1 -0
- package/src/cli/fixture-report.test.ts +230 -0
- package/src/cli/fixture-report.ts +171 -0
- package/src/cli/nofile-limit.ts +48 -0
- package/src/cli/notify-cli.ts +91 -7
- package/src/cli/update-cli.ts +85 -9
- package/src/cli.ts +29 -1
- package/src/commands/completion.ts +84 -0
- package/src/commands/config.ts +2 -0
- package/src/commands/contribution-prep.ts +1 -1
- package/src/commands/deep-interview.ts +2 -1
- package/src/config/file-lock.ts +73 -34
- package/src/config/keybindings.ts +2 -2
- package/src/config/model-profile-activation.ts +65 -0
- package/src/config/model-registry.ts +14 -2
- package/src/config/settings-schema.ts +68 -1
- package/src/config/settings.ts +22 -0
- package/src/coordinator-mcp/server.ts +34 -8
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +50 -18
- package/src/defaults/gjc/skills/ralplan/SKILL.md +40 -99
- package/src/defaults/gjc/skills/team/SKILL.md +17 -14
- package/src/defaults/gjc/skills/ultragoal/SKILL.md +59 -4
- package/src/defaults/gjc/skills/ultragoal/pipeline-validation-contracts.md +30 -0
- package/src/defaults/gjc-defaults.ts +9 -0
- package/src/discovery/helpers.ts +10 -0
- package/src/discovery/index.ts +1 -0
- package/src/export/html/template.generated.ts +1 -1
- package/src/export/html/template.js +60 -2
- package/src/export/ttsr.ts +96 -18
- package/src/extensibility/extensions/runner.ts +183 -219
- package/src/extensibility/extensions/types.ts +9 -0
- package/src/extensibility/gjc-plugins/runtime-adapters.ts +156 -44
- package/src/gjc-runtime/deep-interview-ambiguity.ts +206 -0
- package/src/gjc-runtime/deep-interview-recorder.ts +62 -8
- package/src/gjc-runtime/deep-interview-runtime.ts +210 -2
- package/src/gjc-runtime/deep-interview-state.ts +44 -2
- package/src/gjc-runtime/session-state-sidecar.ts +263 -20
- package/src/gjc-runtime/state-runtime.ts +12 -2
- package/src/gjc-runtime/state-writer.ts +15 -0
- package/src/gjc-runtime/team-runtime.ts +187 -15
- package/src/gjc-runtime/ultragoal-guard.ts +55 -66
- package/src/gjc-runtime/ultragoal-receipt-freshness.ts +315 -0
- package/src/gjc-runtime/ultragoal-runtime.ts +1663 -159
- package/src/gjc-runtime/workflow-manifest.generated.json +113 -2
- package/src/gjc-runtime/workflow-manifest.ts +74 -1
- package/src/goals/runtime.ts +10 -2
- package/src/hindsight/backend.ts +1 -3
- package/src/hooks/native-skill-hook.ts +124 -4
- package/src/internal-urls/docs-index.generated.ts +16 -7
- package/src/main.ts +95 -43
- package/src/memories/index.ts +12 -1
- package/src/modes/components/assistant-message.ts +241 -82
- package/src/modes/components/custom-editor.ts +1 -0
- package/src/modes/components/model-selector.ts +54 -11
- package/src/modes/components/queued-message-selector.ts +92 -0
- package/src/modes/components/settings-selector.ts +4 -0
- package/src/modes/components/status-line.ts +167 -54
- package/src/modes/components/tool-execution.ts +44 -19
- package/src/modes/components/welcome.ts +160 -44
- package/src/modes/controllers/command-controller.ts +40 -4
- package/src/modes/controllers/event-controller.ts +66 -47
- package/src/modes/controllers/extension-ui-controller.ts +4 -10
- package/src/modes/controllers/input-controller.ts +180 -18
- package/src/modes/controllers/selector-controller.ts +122 -27
- package/src/modes/interactive-mode.ts +51 -16
- package/src/modes/print-mode.ts +43 -4
- package/src/modes/prompt-action-autocomplete.ts +21 -20
- package/src/modes/rpc/rpc-mode.ts +29 -3
- package/src/modes/rpc/rpc-types.ts +9 -0
- package/src/modes/shared/agent-wire/command-validation.ts +4 -0
- package/src/modes/shared/agent-wire/event-contract.ts +22 -0
- package/src/modes/shared/agent-wire/event-envelope.ts +82 -0
- package/src/modes/shared/agent-wire/scopes.ts +1 -0
- package/src/modes/types.ts +1 -0
- package/src/modes/utils/hotkeys-markdown.ts +1 -0
- package/src/modes/utils/ui-helpers.ts +19 -6
- package/src/notifications/config.ts +25 -5
- package/src/notifications/daemon-paths.ts +2 -0
- package/src/notifications/index.ts +117 -14
- package/src/notifications/lifecycle-commands.ts +37 -7
- package/src/notifications/lifecycle-orchestrator.ts +19 -6
- package/src/notifications/telegram-daemon-cli.ts +2 -2
- package/src/notifications/telegram-daemon-control.ts +5 -3
- package/src/notifications/telegram-daemon.ts +302 -51
- package/src/notifications/telegram-reference.ts +0 -16
- package/src/notifications/threaded-render.ts +17 -1
- package/src/prompts/agents/architect.md +19 -10
- package/src/prompts/agents/critic.md +16 -18
- package/src/prompts/agents/executor.md +14 -11
- package/src/prompts/agents/planner.md +18 -13
- package/src/prompts/ci-green-request.md +3 -8
- package/src/prompts/goals/goal-continuation.md +0 -5
- package/src/prompts/goals/goal-mode-active.md +0 -5
- package/src/prompts/system/agent-creation-architect.md +2 -2
- package/src/prompts/system/plan-mode-active.md +1 -1
- package/src/prompts/system/plan-mode-subagent.md +3 -3
- package/src/prompts/system/project-prompt.md +0 -13
- package/src/prompts/system/subagent-system-prompt.md +3 -2
- package/src/prompts/system/system-prompt.md +29 -19
- package/src/prompts/system/volatile-project-context.md +10 -0
- package/src/prompts/system/web-search.md +4 -7
- package/src/prompts/tools/apply-patch.md +6 -0
- package/src/prompts/tools/ast-edit.md +1 -0
- package/src/prompts/tools/bash.md +1 -1
- package/src/prompts/tools/bisect.md +22 -0
- package/src/prompts/tools/browser.md +1 -1
- package/src/prompts/tools/computer.md +2 -2
- package/src/prompts/tools/cron.md +0 -2
- package/src/prompts/tools/eval.md +2 -2
- package/src/prompts/tools/find.md +1 -1
- package/src/prompts/tools/github.md +6 -6
- package/src/prompts/tools/goal.md +1 -3
- package/src/prompts/tools/image-gen.md +12 -5
- package/src/prompts/tools/irc.md +5 -4
- package/src/prompts/tools/job.md +2 -2
- package/src/prompts/tools/lsp.md +1 -1
- package/src/prompts/tools/monitor.md +2 -2
- package/src/prompts/tools/patch.md +2 -2
- package/src/prompts/tools/replace.md +2 -21
- package/src/prompts/tools/rewind.md +1 -1
- package/src/prompts/tools/search-tool-bm25.md +1 -11
- package/src/prompts/tools/search.md +1 -1
- package/src/prompts/tools/skill.md +3 -2
- package/src/prompts/tools/ssh.md +2 -1
- package/src/prompts/tools/subagent.md +2 -2
- package/src/prompts/tools/task.md +4 -5
- package/src/prompts/tools/todo-write.md +1 -1
- package/src/prompts/tools/vim.md +1 -0
- package/src/prompts/tools/web-search.md +2 -0
- package/src/prompts/tools/write.md +8 -2
- package/src/runtime-api-key.ts +16 -0
- package/src/sdk.ts +52 -28
- package/src/session/agent-session.ts +951 -132
- package/src/session/agent-storage.ts +4 -0
- package/src/session/file-mention-pruning.ts +64 -0
- package/src/session/messages.ts +4 -0
- package/src/session/session-manager.ts +103 -4
- package/src/skill-state/active-state.ts +141 -5
- package/src/skill-state/deep-interview-mutation-guard.ts +67 -3
- package/src/slash-commands/builtin-registry.ts +218 -71
- package/src/system-prompt.ts +57 -16
- package/src/task/executor.ts +132 -24
- package/src/task/fork-context-advisory.ts +2 -7
- package/src/task/fork-context-budget.ts +9 -0
- package/src/task/index.ts +13 -6
- package/src/task/output-manager.ts +20 -8
- package/src/task/receipt.ts +26 -7
- package/src/task/token-log.test.ts +188 -0
- package/src/task/token-log.ts +179 -0
- package/src/tools/bisect.ts +367 -0
- package/src/tools/computer.ts +246 -43
- package/src/tools/index.ts +3 -0
- package/src/tools/output-meta.ts +116 -4
- package/src/tools/search.ts +8 -2
- package/src/tools/skill.ts +15 -0
- package/src/tools/telegram-send.ts +6 -0
- package/src/utils/file-mentions.ts +39 -7
- package/src/utils/git.ts +73 -0
- package/src/web/scrapers/youtube.ts +24 -12
- package/src/workflow/workflow-intent-diff.ts +29 -6
- package/src/workflow/workflow-intent-report-consumer.ts +221 -0
- package/src/workflow/workflow-intent-report-schema.ts +129 -0
- package/src/workflow/workflow-intent-report.ts +135 -0
package/src/sdk.ts
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
type AgentMessage,
|
|
5
5
|
type AgentTelemetryConfig,
|
|
6
6
|
type AgentTool,
|
|
7
|
-
AppendOnlyContextManager,
|
|
7
|
+
type AppendOnlyContextManager,
|
|
8
8
|
INTENT_FIELD,
|
|
9
9
|
type ThinkingLevel,
|
|
10
10
|
} from "@gajae-code/agent-core";
|
|
@@ -31,7 +31,11 @@ import {
|
|
|
31
31
|
prompt,
|
|
32
32
|
Snowflake,
|
|
33
33
|
} from "@gajae-code/utils";
|
|
34
|
-
|
|
34
|
+
import {
|
|
35
|
+
createAppendOnlyContextManager,
|
|
36
|
+
providerSupportsAppendOnlyAuto,
|
|
37
|
+
resolveAppendOnlyMode,
|
|
38
|
+
} from "./append-only-mode";
|
|
35
39
|
import { type AsyncJob, AsyncJobManager, isBackgroundJobSupportEnabled, jobElapsedMs } from "./async";
|
|
36
40
|
import { loadCapability } from "./capability";
|
|
37
41
|
import { type Rule, ruleCapability, setActiveRules } from "./capability/rule";
|
|
@@ -615,23 +619,12 @@ function registerJsVmCleanup(): void {
|
|
|
615
619
|
postmortem.register("js-vm-cleanup", disposeAllVmContexts);
|
|
616
620
|
}
|
|
617
621
|
|
|
618
|
-
|
|
619
|
-
*
|
|
620
|
-
*
|
|
621
|
-
*
|
|
622
|
-
* - `"off"` → never enable
|
|
623
|
-
* - `"auto"` → enable for DeepSeek (prefix-caching provider)
|
|
622
|
+
/*
|
|
623
|
+
* Append-only context-mode resolution + manager construction live in
|
|
624
|
+
* ./append-only-mode so the initial build, the runtime model/setting-change
|
|
625
|
+
* path, and the status UI share one implementation. Re-exported for importers/tests.
|
|
624
626
|
*/
|
|
625
|
-
|
|
626
|
-
switch (setting ?? "auto") {
|
|
627
|
-
case "on":
|
|
628
|
-
return true;
|
|
629
|
-
case "off":
|
|
630
|
-
return false;
|
|
631
|
-
default:
|
|
632
|
-
return provider === "deepseek";
|
|
633
|
-
}
|
|
634
|
-
}
|
|
627
|
+
export { createAppendOnlyContextManager, providerSupportsAppendOnlyAuto, resolveAppendOnlyMode };
|
|
635
628
|
|
|
636
629
|
function customToolToDefinition(tool: CustomTool): ToolDefinition {
|
|
637
630
|
const definition: ToolDefinition & { [TOOL_DEFINITION_MARKER]: true } = {
|
|
@@ -866,6 +859,10 @@ function withEmbeddedDefaultGjcSkills(skills: Skill[]): Skill[] {
|
|
|
866
859
|
return [...byName.values()];
|
|
867
860
|
}
|
|
868
861
|
|
|
862
|
+
export function resolveIntentTracingEnabled(intentTracingSetting: boolean | undefined, hasUI: boolean): boolean {
|
|
863
|
+
return (!!intentTracingSetting || $flag("PI_INTENT_TRACING")) && hasUI;
|
|
864
|
+
}
|
|
865
|
+
|
|
869
866
|
export async function createAgentSession(options: CreateAgentSessionOptions = {}): Promise<CreateAgentSessionResult> {
|
|
870
867
|
const cwd = options.cwd ?? getProjectDir();
|
|
871
868
|
const agentDir = options.agentDir ?? getDefaultAgentDir();
|
|
@@ -1125,8 +1122,15 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
|
|
|
1125
1122
|
rulebookRules.push(rule);
|
|
1126
1123
|
}
|
|
1127
1124
|
}
|
|
1128
|
-
if (
|
|
1129
|
-
|
|
1125
|
+
if (ttsrManager.getSettings().enabled !== false) {
|
|
1126
|
+
if ((existingSession.ttsrMessageCount ?? 0) > 0) {
|
|
1127
|
+
ttsrManager.restoreMessageCount(existingSession.ttsrMessageCount ?? 0);
|
|
1128
|
+
}
|
|
1129
|
+
if (existingSession.injectedTtsrRuleRecords && existingSession.injectedTtsrRuleRecords.length > 0) {
|
|
1130
|
+
ttsrManager.restoreInjected(existingSession.injectedTtsrRuleRecords);
|
|
1131
|
+
} else if (existingSession.injectedTtsrRules.length > 0) {
|
|
1132
|
+
ttsrManager.restoreInjected(existingSession.injectedTtsrRules);
|
|
1133
|
+
}
|
|
1130
1134
|
}
|
|
1131
1135
|
return { ttsrManager, rulebookRules, alwaysApplyRules };
|
|
1132
1136
|
});
|
|
@@ -1214,8 +1218,8 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
|
|
|
1214
1218
|
|
|
1215
1219
|
const agentRegistry = options.agentRegistry ?? AgentRegistry.global();
|
|
1216
1220
|
const resolvedAgentId = options.agentId ?? options.parentTaskPrefix ?? MAIN_AGENT_ID;
|
|
1217
|
-
const
|
|
1218
|
-
|
|
1221
|
+
const isSubSession = taskDepth > 0 || Boolean(options.parentTaskPrefix) || Boolean(options.currentAgentType);
|
|
1222
|
+
const resolvedAgentDisplayName = options.agentDisplayName ?? (isSubSession ? "sub" : "main");
|
|
1219
1223
|
const evalKernelOwnerId = `agent-session:${Snowflake.next()}`;
|
|
1220
1224
|
|
|
1221
1225
|
try {
|
|
@@ -1520,12 +1524,20 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
|
|
|
1520
1524
|
}
|
|
1521
1525
|
let notificationCfg: NotificationConfig | undefined;
|
|
1522
1526
|
try {
|
|
1523
|
-
notificationCfg = getNotificationConfig(
|
|
1527
|
+
notificationCfg = getNotificationConfig(settings);
|
|
1524
1528
|
} catch {
|
|
1525
1529
|
notificationCfg = undefined;
|
|
1526
1530
|
}
|
|
1527
|
-
if (
|
|
1528
|
-
|
|
1531
|
+
if (
|
|
1532
|
+
shouldRegisterNotificationsExtension({
|
|
1533
|
+
env: process.env,
|
|
1534
|
+
cfg: notificationCfg,
|
|
1535
|
+
taskDepth,
|
|
1536
|
+
parentTaskPrefix: options.parentTaskPrefix,
|
|
1537
|
+
currentAgentType: options.currentAgentType,
|
|
1538
|
+
})
|
|
1539
|
+
) {
|
|
1540
|
+
inlineExtensions.push(api => createNotificationsExtension(api, { settings }));
|
|
1529
1541
|
}
|
|
1530
1542
|
|
|
1531
1543
|
// Extension/module discovery is quarantined; retain only the private
|
|
@@ -1632,6 +1644,12 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
|
|
|
1632
1644
|
cwd,
|
|
1633
1645
|
sessionManager,
|
|
1634
1646
|
modelRegistry,
|
|
1647
|
+
{
|
|
1648
|
+
kind: isSubSession ? "sub" : "main",
|
|
1649
|
+
taskDepth,
|
|
1650
|
+
...(options.parentTaskPrefix ? { parentTaskPrefix: options.parentTaskPrefix } : {}),
|
|
1651
|
+
...(options.currentAgentType ? { currentAgentType: options.currentAgentType } : {}),
|
|
1652
|
+
},
|
|
1635
1653
|
);
|
|
1636
1654
|
}
|
|
1637
1655
|
|
|
@@ -1751,7 +1769,11 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
|
|
|
1751
1769
|
|
|
1752
1770
|
const repeatToolDescriptions = settings.get("repeatToolDescriptions");
|
|
1753
1771
|
const eagerTasks = settings.get("task.eager");
|
|
1754
|
-
const
|
|
1772
|
+
const intentTracingEnabled = resolveIntentTracingEnabled(
|
|
1773
|
+
settings.get("tools.intentTracing"),
|
|
1774
|
+
options.hasUI ?? false,
|
|
1775
|
+
);
|
|
1776
|
+
const intentField = intentTracingEnabled ? INTENT_FIELD : undefined;
|
|
1755
1777
|
const rebuildSystemPrompt = async (
|
|
1756
1778
|
toolNames: string[],
|
|
1757
1779
|
tools: Map<string, AgentTool>,
|
|
@@ -1823,6 +1845,7 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
|
|
|
1823
1845
|
eagerTasks,
|
|
1824
1846
|
secretsEnabled,
|
|
1825
1847
|
workspaceTree: workspaceTreePromise,
|
|
1848
|
+
subagent: options.parentTaskPrefix !== undefined,
|
|
1826
1849
|
});
|
|
1827
1850
|
|
|
1828
1851
|
if (options.systemPrompt === undefined) {
|
|
@@ -1924,7 +1947,7 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
|
|
|
1924
1947
|
agentRegistry.register({
|
|
1925
1948
|
id: resolvedAgentId,
|
|
1926
1949
|
displayName: resolvedAgentDisplayName,
|
|
1927
|
-
kind:
|
|
1950
|
+
kind: isSubSession ? "sub" : "main",
|
|
1928
1951
|
parentId: options.parentTaskPrefix,
|
|
1929
1952
|
session: null,
|
|
1930
1953
|
sessionFile: sessionManager.getSessionFile() ?? null,
|
|
@@ -2031,7 +2054,7 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
|
|
|
2031
2054
|
|
|
2032
2055
|
const appendOnlyContext =
|
|
2033
2056
|
model && resolveAppendOnlyMode(settings.get("provider.appendOnlyContext"), model.provider)
|
|
2034
|
-
?
|
|
2057
|
+
? createAppendOnlyContextManager(model.provider)
|
|
2035
2058
|
: undefined;
|
|
2036
2059
|
if (appendOnlyContext && options.forkContextSeed && !hasExistingSession) {
|
|
2037
2060
|
if (options.forkContextSeed.appendOnlyPrefixSnapshot) {
|
|
@@ -2202,6 +2225,7 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
|
|
|
2202
2225
|
onResponse,
|
|
2203
2226
|
convertToLlm: convertToLlmFinal,
|
|
2204
2227
|
rebuildSystemPrompt,
|
|
2228
|
+
workspaceTree: resolvedWorkspaceTree,
|
|
2205
2229
|
reloadSshTool,
|
|
2206
2230
|
requestedToolNames: requestedToolNameSet,
|
|
2207
2231
|
discoverableToolAllowedNames: options.discoverableToolAllowedNames,
|