@atlasharness/atlascode 0.1.90 → 0.1.92
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/dist/cli.js +28 -20
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -27524,7 +27524,7 @@ async function buildOpenAITools(tools, options, emptyPermissionContext) {
|
|
|
27524
27524
|
let desc;
|
|
27525
27525
|
try {
|
|
27526
27526
|
desc = await tool.description({}, {
|
|
27527
|
-
isNonInteractiveSession: options
|
|
27527
|
+
isNonInteractiveSession: options?.isNonInteractiveSession,
|
|
27528
27528
|
toolPermissionContext,
|
|
27529
27529
|
tools: tools ?? []
|
|
27530
27530
|
});
|
|
@@ -30197,7 +30197,7 @@ var init_hooksSchema = __esm(() => {
|
|
|
30197
30197
|
});
|
|
30198
30198
|
|
|
30199
30199
|
// src/engine/config/types.ts
|
|
30200
|
-
var SettingsSchema = () => object({
|
|
30200
|
+
var autoCompactWindowSettingSchema, SettingsSchema = () => object({
|
|
30201
30201
|
model: string2().optional(),
|
|
30202
30202
|
modelRoles: record(string2(), any()).optional(),
|
|
30203
30203
|
defaultRole: string2().optional(),
|
|
@@ -30230,6 +30230,10 @@ var SettingsSchema = () => object({
|
|
|
30230
30230
|
search: object({ tavilyApiKey: string2().optional() }).optional(),
|
|
30231
30231
|
tui: object({ fullscreen: boolean2().optional() }).optional(),
|
|
30232
30232
|
idleCompaction: boolean2().optional(),
|
|
30233
|
+
autoCompactWindow: union([
|
|
30234
|
+
autoCompactWindowSettingSchema,
|
|
30235
|
+
record(string2(), autoCompactWindowSettingSchema)
|
|
30236
|
+
]).optional(),
|
|
30233
30237
|
skillOverrides: union([
|
|
30234
30238
|
literal("off"),
|
|
30235
30239
|
literal("user-invocable-only"),
|
|
@@ -30239,6 +30243,12 @@ var SettingsSchema = () => object({
|
|
|
30239
30243
|
var init_types3 = __esm(() => {
|
|
30240
30244
|
init_zod();
|
|
30241
30245
|
init_hooksSchema();
|
|
30246
|
+
autoCompactWindowSettingSchema = discriminatedUnion("kind", [
|
|
30247
|
+
object({ kind: literal("auto") }),
|
|
30248
|
+
object({ kind: literal("off") }),
|
|
30249
|
+
object({ kind: literal("window"), tokens: number2().int().min(1000) }),
|
|
30250
|
+
object({ kind: literal("pct"), pct: number2().min(1).max(100) })
|
|
30251
|
+
]);
|
|
30242
30252
|
});
|
|
30243
30253
|
|
|
30244
30254
|
// src/engine/config/restrictedMode.ts
|
|
@@ -84906,6 +84916,8 @@ async function createAgentLoopDeps(config = {}) {
|
|
|
84906
84916
|
messages: [...compactMsgs, prompt],
|
|
84907
84917
|
role,
|
|
84908
84918
|
sessionModel,
|
|
84919
|
+
systemPrompt: config.systemPrompt,
|
|
84920
|
+
tools: tools.length > 0 ? tools : undefined,
|
|
84909
84921
|
signal: config.signal
|
|
84910
84922
|
});
|
|
84911
84923
|
const content = resp.message?.content;
|
|
@@ -89042,11 +89054,14 @@ async function runHeadless(inputPrompt, options) {
|
|
|
89042
89054
|
const resp = await modelProvider.chat({
|
|
89043
89055
|
messages: [...msgs, prompt],
|
|
89044
89056
|
role: "small",
|
|
89057
|
+
systemPrompt: bundle.deps.systemPrompt,
|
|
89058
|
+
tools,
|
|
89045
89059
|
signal: abortController.signal
|
|
89046
89060
|
});
|
|
89047
89061
|
return resp.message.content.filter((block) => block.type === "text" && typeof block.text === "string").map((block) => block.text).join("");
|
|
89048
89062
|
},
|
|
89049
|
-
countTokens: (msgs) => modelProvider.countTokens("small", undefined, msgs)
|
|
89063
|
+
countTokens: (msgs) => modelProvider.countTokens("small", undefined, msgs),
|
|
89064
|
+
keepRecent: AUTOCOMPACT_KEEP_RECENT
|
|
89050
89065
|
};
|
|
89051
89066
|
const loopDeps = {
|
|
89052
89067
|
...bundle.deps,
|
|
@@ -89054,8 +89069,11 @@ async function runHeadless(inputPrompt, options) {
|
|
|
89054
89069
|
checkPermission,
|
|
89055
89070
|
toolContext: makeCtx()
|
|
89056
89071
|
};
|
|
89072
|
+
const mergedAutoCompact = mergeAutoCompactOverrides(getAutoCompactEnvOverrides(), getInitialSettings().autoCompactWindow, roleModel);
|
|
89057
89073
|
const autoCompact = {
|
|
89058
89074
|
contextWindow: (roleModel ? getProviderContextWindow(roleModel) : undefined) ?? 200000,
|
|
89075
|
+
countTokens: (msgs) => modelProvider.countTokens("small", undefined, msgs),
|
|
89076
|
+
enabled: mergedAutoCompact.autoCompactDisabled ? false : undefined,
|
|
89059
89077
|
compact: (msgs) => compactConversation(msgs, compactDeps)
|
|
89060
89078
|
};
|
|
89061
89079
|
let turnRunning = false;
|
|
@@ -126236,7 +126254,7 @@ var init_internalWrites = __esm(() => {
|
|
|
126236
126254
|
timestamps = new Map;
|
|
126237
126255
|
});
|
|
126238
126256
|
// src/tui/utils/settings/types.ts
|
|
126239
|
-
var isMcpServerCommandEntry = () => ({}), isMcpServerNameEntry = () => ({}), isMcpServerUrlEntry = () => ({}),
|
|
126257
|
+
var isMcpServerCommandEntry = () => ({}), isMcpServerNameEntry = () => ({}), isMcpServerUrlEntry = () => ({}), autoCompactWindowSettingSchema2, SettingsSchema2 = () => object({
|
|
126240
126258
|
model: string2().optional(),
|
|
126241
126259
|
modelRoles: record(string2(), any()).optional(),
|
|
126242
126260
|
defaultRole: string2().optional(),
|
|
@@ -126280,8 +126298,8 @@ var isMcpServerCommandEntry = () => ({}), isMcpServerNameEntry = () => ({}), isM
|
|
|
126280
126298
|
theme: string2().optional(),
|
|
126281
126299
|
tui: object({ fullscreen: boolean2().optional() }).optional(),
|
|
126282
126300
|
autoCompactWindow: union([
|
|
126283
|
-
|
|
126284
|
-
record(string2(),
|
|
126301
|
+
autoCompactWindowSettingSchema2,
|
|
126302
|
+
record(string2(), autoCompactWindowSettingSchema2)
|
|
126285
126303
|
]).optional(),
|
|
126286
126304
|
llmTimeoutMs: number2().int().positive().optional(),
|
|
126287
126305
|
prefersReducedMotion: boolean2().optional(),
|
|
@@ -126326,7 +126344,7 @@ var isMcpServerCommandEntry = () => ({}), isMcpServerNameEntry = () => ({}), isM
|
|
|
126326
126344
|
}).passthrough(), CUSTOMIZATION_SURFACES;
|
|
126327
126345
|
var init_types7 = __esm(() => {
|
|
126328
126346
|
init_zod();
|
|
126329
|
-
|
|
126347
|
+
autoCompactWindowSettingSchema2 = discriminatedUnion("kind", [
|
|
126330
126348
|
object({ kind: literal("auto") }),
|
|
126331
126349
|
object({ kind: literal("off") }),
|
|
126332
126350
|
object({ kind: literal("window"), tokens: number2().int().min(1000) }),
|
|
@@ -437095,12 +437113,6 @@ async function streamCompactSummary({
|
|
|
437095
437113
|
let hasStartedStreaming = false;
|
|
437096
437114
|
let response;
|
|
437097
437115
|
context.setResponseLength?.(() => 0);
|
|
437098
|
-
const useToolSearch = await isToolSearchEnabled(compactModel, context.options.tools, async () => appState.toolPermissionContext, context.options.agentDefinitions.activeAgents, "compact");
|
|
437099
|
-
const tools = useToolSearch ? uniqBy_default([
|
|
437100
|
-
FileReadTool,
|
|
437101
|
-
ToolSearchTool2,
|
|
437102
|
-
...context.options.tools.filter((t) => t.isMcp)
|
|
437103
|
-
], "name") : [FileReadTool];
|
|
437104
437116
|
const compactMessages = normalizeMessagesForAPI(stripImagesFromMessages2(stripReinjectedAttachments([
|
|
437105
437117
|
...getMessagesAfterCompactBoundary(messages),
|
|
437106
437118
|
summaryRequest
|
|
@@ -437108,11 +437120,9 @@ async function streamCompactSummary({
|
|
|
437108
437120
|
const compactRole = modelToRole(compactModel);
|
|
437109
437121
|
const params = await buildOpenAIParams({
|
|
437110
437122
|
messages: compactMessages,
|
|
437111
|
-
systemPrompt: asSystemPrompt2(
|
|
437112
|
-
"You are a helpful AI assistant tasked with summarizing conversations."
|
|
437113
|
-
]),
|
|
437123
|
+
systemPrompt: asSystemPrompt2(appendSystemContext(cacheSafeParams.systemPrompt, cacheSafeParams.systemContext)),
|
|
437114
437124
|
thinkingConfig: { type: "disabled" },
|
|
437115
|
-
tools,
|
|
437125
|
+
tools: context.options.tools,
|
|
437116
437126
|
options: {
|
|
437117
437127
|
model: compactModel,
|
|
437118
437128
|
async getToolPermissionContext() {
|
|
@@ -437342,14 +437352,12 @@ var POST_COMPACT_MAX_FILES_TO_RESTORE = 5, POST_COMPACT_TOKEN_BUDGET = 50000, PO
|
|
|
437342
437352
|
var init_compact4 = __esm(() => {
|
|
437343
437353
|
init_shared();
|
|
437344
437354
|
init_shared();
|
|
437345
|
-
|
|
437355
|
+
init_api2();
|
|
437346
437356
|
init_atlas();
|
|
437347
437357
|
init_compactModelSwitch();
|
|
437348
437358
|
init_bootstrapState();
|
|
437349
437359
|
init_bootstrapState();
|
|
437350
|
-
init_FileReadTool();
|
|
437351
437360
|
init_prompt2();
|
|
437352
|
-
init_ToolSearchTool();
|
|
437353
437361
|
init_attachments();
|
|
437354
437362
|
init_config6();
|
|
437355
437363
|
init_context2();
|
package/package.json
CHANGED