From c7209218ecd1b4acccb45e4c6a7ca96bcd5aaf43 Mon Sep 17 00:00:00 2001 From: elkaix Date: Fri, 28 Aug 2026 19:37:04 -0400 Subject: [PATCH 01/10] refactor(agent-core-v2): remove now prompt variable Remove clock-derived template state from profile rendering. Make the date-change reminder the single current-date source. --- .changeset/remove-now-template-variable.md | 5 + docs/customization/agents.md | 1 - .../agent-core-v2/docs/state-manifest.d.ts | 9 - .../agent-core-v2/docs/wire-manifest.d.ts | 2 - .../src/agent/profile/profileService.ts | 6 - .../agentProfileCatalog.ts | 7 +- .../app/agentProfileCatalog/profile-shared.ts | 51 +----- .../dateChange/dateChangeAgentRuntime.ts | 19 +-- .../test/agent/profile/binding.test.ts | 15 +- .../test/agent/profile/profileOps.test.ts | 16 +- .../profile-shared.test.ts | 86 ++-------- .../test/app/config/config.test.ts | 2 +- .../dateChange/dateChangeInjection.test.ts | 160 ++++++------------ packages/agent-core-v2/test/harness/agent.ts | 27 +-- .../agentFile.test.ts | 21 +-- 15 files changed, 101 insertions(+), 326 deletions(-) create mode 100644 .changeset/remove-now-template-variable.md diff --git a/.changeset/remove-now-template-variable.md b/.changeset/remove-now-template-variable.md new file mode 100644 index 000000000..b13fc4f10 --- /dev/null +++ b/.changeset/remove-now-template-variable.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Remove the `${now}` variable from custom system prompt templates. diff --git a/docs/customization/agents.md b/docs/customization/agents.md index bca7089e2..9515db936 100644 --- a/docs/customization/agents.md +++ b/docs/customization/agents.md @@ -153,7 +153,6 @@ Like the body of a regular agent file, SYSTEM.md is rendered as a template each | `${cwd_listing}` | Listing of the working directory | | `${os}` | Operating system kind | | `${shell}` | Shell name and path, for example `bash (\`/bin/bash\`)` | -| `${now}` | Current time in ISO format | | `${additional_dirs_info}` | Additional directories added to the workspace; empty when there are none | | `${base_prompt}` | The default system prompt. Inside `SYSTEM.md` itself this is the built-in default; inside an agent file it is the effective default — the built-in default, or your `SYSTEM.md` override when present | | `${plugin_sections}` | A complete Plugin Instructions block contributed by enabled plugins; empty when no enabled plugin contributes instructions | diff --git a/packages/agent-core-v2/docs/state-manifest.d.ts b/packages/agent-core-v2/docs/state-manifest.d.ts index 46c3906e7..f72698fdb 100644 --- a/packages/agent-core-v2/docs/state-manifest.d.ts +++ b/packages/agent-core-v2/docs/state-manifest.d.ts @@ -1322,15 +1322,6 @@ export interface AgentStateSnapshot { readonly systemPrompt: string; readonly environmentDisclosure?: /* EnvironmentDisclosureSnapshot — packages/agent-core-v2/src/app/agentProfileCatalog/agentProfileCatalog.ts */ { readonly cwd: string; - readonly date: { - readonly disclosed: true; - readonly value: { - readonly localDate: string; - readonly timeZone: string; - }; - } | { - readonly disclosed: false; - }; }; readonly renderGeneration: number; readonly agentsMdPaths?: readonly string[]; diff --git a/packages/agent-core-v2/docs/wire-manifest.d.ts b/packages/agent-core-v2/docs/wire-manifest.d.ts index 78a427045..211e395fa 100644 --- a/packages/agent-core-v2/docs/wire-manifest.d.ts +++ b/packages/agent-core-v2/docs/wire-manifest.d.ts @@ -99,7 +99,6 @@ interface ConfigUpdatePayload { /** EnvironmentDisclosureSnapshot */ environmentDisclosure?: { cwd: string; - date: { disclosed: true, value: { localDate: string, timeZone: string } } | { disclosed: false }; }; renderGeneration?: number; agentsMdPaths?: string[]; @@ -516,7 +515,6 @@ interface ProfileBindPayload { /** EnvironmentDisclosureSnapshot */ environmentDisclosure?: { cwd: string; - date: { disclosed: true, value: { localDate: string, timeZone: string } } | { disclosed: false }; }; renderGeneration?: number; agentsMdPaths?: string[]; diff --git a/packages/agent-core-v2/src/agent/profile/profileService.ts b/packages/agent-core-v2/src/agent/profile/profileService.ts index 67e1d8c87..b21caca97 100644 --- a/packages/agent-core-v2/src/agent/profile/profileService.ts +++ b/packages/agent-core-v2/src/agent/profile/profileService.ts @@ -28,7 +28,6 @@ import { IConfigService } from '#/app/config/config'; import type { LoopControl } from '#/agent/loop/configSection'; import { IAgentRuntimeService } from '#/agent/runtimeBinding/agentRuntime'; import { RuntimeWorkspaceView } from '#/runtime/runtimeWorkspaceView'; -import { IHostClock } from '#/os/interface/hostClock'; import { ISessionContext } from '#/session/sessionContext/sessionContext'; import type { ToolSource } from '#/tool/toolContract'; import { ISessionWorkspaceContext } from '#/session/workspaceContext/workspaceContext'; @@ -150,7 +149,6 @@ export class AgentProfileService extends Disposable implements IAgentProfileServ @IModelCatalog private readonly modelCatalog: IModelCatalog, @IProtocolAdapterRegistry private readonly protocolAdapters: IProtocolAdapterRegistry, @IAgentRuntimeService private readonly runtime: IAgentRuntimeService, - @IHostClock private readonly clock: IHostClock, @ISessionContext private readonly sessionContext: ISessionContext, @IBootstrapService private readonly bootstrap: IBootstrapService, @ISessionWorkspaceContext private readonly workspace: ISessionWorkspaceContext, @@ -816,16 +814,12 @@ export class AgentProfileService extends Disposable implements IAgentProfileServ } const skills = await this.resolveSkillListing(); const pluginSections = await this.resolvePluginSections(); - const now = this.clock.now(); - const timeZone = this.clock.timeZone(); return { ...base, cwd: view.workDir, osKind: env.osKind, shellName: env.shellName, shellPath: env.shellPath, - now: now.toISOString(), - timeZone, skills, pluginSections, skillActive: this.isToolActiveForProfile(profile, 'Skill'), diff --git a/packages/agent-core-v2/src/app/agentProfileCatalog/agentProfileCatalog.ts b/packages/agent-core-v2/src/app/agentProfileCatalog/agentProfileCatalog.ts index 1e13f5f12..6ff7be2ba 100644 --- a/packages/agent-core-v2/src/app/agentProfileCatalog/agentProfileCatalog.ts +++ b/packages/agent-core-v2/src/app/agentProfileCatalog/agentProfileCatalog.ts @@ -23,8 +23,6 @@ export interface AgentProfileContext { readonly osKind?: string; readonly shellName?: string; readonly shellPath?: string; - readonly now?: string; - readonly timeZone?: string; readonly skills?: string; readonly skillActive?: boolean; readonly pluginSections?: string; @@ -35,9 +33,6 @@ export interface AgentProfileContext { export interface EnvironmentDisclosureSnapshot { readonly cwd: string; - readonly date: - | { readonly disclosed: true; readonly value: { readonly localDate: string; readonly timeZone: string } } - | { readonly disclosed: false }; } export interface SystemPromptRenderResult { @@ -89,7 +84,7 @@ export function normalizeAgentProfile(input: AgentProfileInput): AgentProfile { systemPrompt, renderSystemPrompt: (context) => ({ text: systemPrompt(context), - environment: { cwd: context.cwd ?? '', date: { disclosed: false } }, + environment: { cwd: context.cwd ?? '' }, }), }; } diff --git a/packages/agent-core-v2/src/app/agentProfileCatalog/profile-shared.ts b/packages/agent-core-v2/src/app/agentProfileCatalog/profile-shared.ts index f1703ea4f..3f9669b32 100644 --- a/packages/agent-core-v2/src/app/agentProfileCatalog/profile-shared.ts +++ b/packages/agent-core-v2/src/app/agentProfileCatalog/profile-shared.ts @@ -138,7 +138,6 @@ export function systemPromptVars( os: context.osKind ?? '', windows_notes: context.osKind === 'Windows' ? `\n\n${WINDOWS_NOTES}\n\n` : '', shell: shellName.length > 0 ? `${shellName} (\`${shellPath}\`)` : '', - now: context.now ?? new Date().toISOString(), cwd: context.cwd ?? '', cwd_listing: context.cwdListing ?? '', agents_md: context.agentsMd ?? '', @@ -171,10 +170,7 @@ export function renderPromptTemplateResult( } return { text: renderPrompt(template, vars), - environment: mergeEnvironmentDisclosure( - environmentForTemplate(template, context), - baseResult?.environment, - ), + environment: mergeEnvironmentDisclosure(environmentForTemplate(context), baseResult?.environment), }; } @@ -188,28 +184,12 @@ export function renderSystemPromptResult( ...systemPromptVars(context, options), role_additional: roleAdditional, }), - environment: environmentForTemplate(SYSTEM_PROMPT_TEMPLATE, context), + environment: environmentForTemplate(context), }; } -function environmentForTemplate( - template: string, - context: AgentProfileContext, -): EnvironmentDisclosureSnapshot { - const usesNow = template.includes('${now}'); - const timeZone = context.timeZone ?? localTimeZone(); - return { - cwd: context.cwd ?? '', - date: usesNow - ? { - disclosed: true, - value: { - localDate: localDateKey(context.now, timeZone), - timeZone, - }, - } - : { disclosed: false }, - }; +function environmentForTemplate(context: AgentProfileContext): EnvironmentDisclosureSnapshot { + return { cwd: context.cwd ?? '' }; } function mergeEnvironmentDisclosure( @@ -217,26 +197,5 @@ function mergeEnvironmentDisclosure( base: EnvironmentDisclosureSnapshot | undefined, ): EnvironmentDisclosureSnapshot { if (base === undefined) return direct; - return { - cwd: direct.cwd || base.cwd, - date: direct.date.disclosed ? direct.date : base.date, - }; -} - -function localDateKey(now: string | undefined, timeZone: string): string { - const date = now === undefined ? new Date() : new Date(now); - if (Number.isNaN(date.getTime())) return localDateKey(undefined, timeZone); - const parts = new Intl.DateTimeFormat('en-US', { - timeZone, - year: 'numeric', - month: '2-digit', - day: '2-digit', - }).formatToParts(date); - const part = (type: Intl.DateTimeFormatPartTypes): string => - parts.find((candidate) => candidate.type === type)?.value ?? ''; - return `${part('year')}-${part('month')}-${part('day')}`; -} - -function localTimeZone(): string { - return Intl.DateTimeFormat().resolvedOptions().timeZone || 'UTC'; + return { cwd: direct.cwd || base.cwd }; } diff --git a/packages/agent-core-v2/src/features/dateChange/dateChangeAgentRuntime.ts b/packages/agent-core-v2/src/features/dateChange/dateChangeAgentRuntime.ts index 833a145f9..3bbda6352 100644 --- a/packages/agent-core-v2/src/features/dateChange/dateChangeAgentRuntime.ts +++ b/packages/agent-core-v2/src/features/dateChange/dateChangeAgentRuntime.ts @@ -76,16 +76,6 @@ const dateChangeInjection = fromCallback(({ environment.cwd !== sessionContext.cwd ); }; - const dateFromProfile = (): DateDisclosure | undefined => { - if (!belongsToCurrentCwd()) return undefined; - const profileData = profile.data(); - const date = profileData.environmentDisclosure?.date; - if (!date?.disclosed) return undefined; - return { - ...date.value, - renderGeneration: profileData.renderGeneration ?? 0, - }; - }; const registration = reminder.register( DATE_CHANGE_INJECTION_VARIANT, ({ @@ -95,13 +85,8 @@ const dateChangeInjection = fromCallback(({ if (!belongsToCurrentCwd()) return undefined; const renderGeneration = profileData.renderGeneration ?? 0; const current = currentDateDisclosure(clock); - const profileDate = dateFromProfile(); const seed = runtime.getLogicState().seed; - const baseline = pickDisclosureBaseline( - lastDisclosure, - profileDate, - seed, - ); + const baseline = pickDisclosureBaseline(lastDisclosure, seed); if (baseline !== undefined && baseline.localDate !== current.localDate) { return { content: `The date has changed. Today's date is now ${current.localDate}. Rely on this reminder over any earlier date statement for the current date. DO NOT mention this to the user explicitly.`, @@ -113,7 +98,7 @@ const dateChangeInjection = fromCallback(({ }, }; } - if (lastDisclosure !== undefined || profileDate !== undefined) return undefined; + if (lastDisclosure !== undefined) return undefined; if (seed === undefined) { runtime.send({ type: 'dateChange.disclose', diff --git a/packages/agent-core-v2/test/agent/profile/binding.test.ts b/packages/agent-core-v2/test/agent/profile/binding.test.ts index c24b6912e..6c0b07dff 100644 --- a/packages/agent-core-v2/test/agent/profile/binding.test.ts +++ b/packages/agent-core-v2/test/agent/profile/binding.test.ts @@ -17,7 +17,6 @@ import { BuiltinAgentProfileLoaderService } from '#/app/agentProfileCatalog/buil import { registerAgentProfile } from '#/app/agentProfileCatalog/contribution'; import type { ToolCall } from '#/kosong/contract/message'; import { IAgentProfileService, type ResolvedAgentProfile } from '#/agent/profile/profile'; -import { IHostClock } from '#/os/interface/hostClock'; import type { HostFsChange } from '#/os/interface/hostFsWatch'; import { IAgentAgentsMdReminderService } from '#/agent/agentsMdReminder/agentsMdReminder'; import { IAgentToolPolicyService } from '#/agent/toolPolicy/toolPolicy'; @@ -26,6 +25,7 @@ import { IAgentToolRegistryService } from '#/agent/toolRegistry/toolRegistry'; import { SELECT_TOOLS_TOOL_NAME } from '#/agent/toolSelect/toolSelect'; import { IAtomicDocumentStore, type IAtomicDocumentStore as AtomicDocumentStore } from '#/persistence/interface/atomicDocumentStore'; import { ISessionAgentProfileCatalog } from '#/session/sessionAgentProfileCatalog/sessionAgentProfileCatalog'; +import { ISessionContext } from '#/session/sessionContext/sessionContext'; import { ISessionInstructionsProvider } from '#/session/sessionInstructions/instructionsProvider'; import { ISessionSkillCatalog } from '#/features/skill/session/skillCatalog'; import { ISessionToolPolicy } from '#/session/sessionToolPolicy/sessionToolPolicy'; @@ -141,21 +141,14 @@ describe('AgentProfileService.bind', () => { expect(svc.isRunnable()).toBe(true); }); - it('keeps the rendered prompt and disclosure free of clock-dependent content', async () => { - const hostClock: IHostClock = { - _serviceBrand: undefined, - now: () => new Date('2026-07-29T04:00:00.000Z'), - timeZone: () => 'Asia/Shanghai', - }; - ctx = createTestAgent(appService(IHostClock, hostClock), hostEnvironmentServices(homeDir)); + it('binds an environment disclosure snapshot with only the session cwd', async () => { + ctx = createTestAgent(hostEnvironmentServices(homeDir)); const svc = ctx.get(IAgentProfileService); await svc.bind({ profile: DEFAULT_AGENT_PROFILE_NAME, model: MOCK_MODEL }); expect(svc.getSystemPrompt()).not.toContain('2026-07-29'); - expect(svc.data().environmentDisclosure).toMatchObject({ - date: { disclosed: false }, - }); + expect(svc.data().environmentDisclosure).toEqual({ cwd: ctx.get(ISessionContext).cwd }); }); it('persists the complete binding in one journal record', async () => { diff --git a/packages/agent-core-v2/test/agent/profile/profileOps.test.ts b/packages/agent-core-v2/test/agent/profile/profileOps.test.ts index 5b48f0da3..91cf9f675 100644 --- a/packages/agent-core-v2/test/agent/profile/profileOps.test.ts +++ b/packages/agent-core-v2/test/agent/profile/profileOps.test.ts @@ -352,13 +352,7 @@ describe('AgentProfileService (wire-backed config.update)', () => { }); it('persists the rendered prompt and disclosure snapshot in one bind record', async () => { - const environment: EnvironmentDisclosureSnapshot = { - cwd: '/work', - date: { - disclosed: true, - value: { localDate: '2026-07-29', timeZone: 'Asia/Shanghai' }, - }, - }; + const environment: EnvironmentDisclosureSnapshot = { cwd: '/work' }; svc.applyBindingSnapshot({ modelAlias: 'pythinker-code', profileName: 'agent', @@ -397,13 +391,7 @@ describe('AgentProfileService (wire-backed config.update)', () => { }); it('replays a legacy config.update record with an explicit renderGeneration verbatim', async () => { - const environment: EnvironmentDisclosureSnapshot = { - cwd: '/work', - date: { - disclosed: true, - value: { localDate: '2026-07-29', timeZone: 'Asia/Shanghai' }, - }, - }; + const environment: EnvironmentDisclosureSnapshot = { cwd: '/work' }; const replay = buildHost('profile-replay-legacy-generation'); await restoreTestEventDispatcher( diff --git a/packages/agent-core-v2/test/app/agentProfileCatalog/profile-shared.test.ts b/packages/agent-core-v2/test/app/agentProfileCatalog/profile-shared.test.ts index 7491454bb..e5654df42 100644 --- a/packages/agent-core-v2/test/app/agentProfileCatalog/profile-shared.test.ts +++ b/packages/agent-core-v2/test/app/agentProfileCatalog/profile-shared.test.ts @@ -39,7 +39,6 @@ describe('systemPromptVars', () => { osKind: 'macOS', shellName: 'zsh', shellPath: '/bin/zsh', - now: 'NOW', additionalDirsInfo: '/extra', }, { skillActive: true }, @@ -49,7 +48,6 @@ describe('systemPromptVars', () => { expect(vars['os']).toBe('macOS'); expect(vars['windows_notes']).toBe(''); expect(vars['shell']).toBe('zsh (`/bin/zsh`)'); - expect(vars['now']).toBe('NOW'); expect(vars['cwd']).toBe('/work'); expect(vars['cwd_listing']).toBe('LISTING'); expect(vars['agents_md']).toBe('AGENTS'); @@ -61,7 +59,7 @@ describe('systemPromptVars', () => { expect(vars['skills_section']).toContain('SKILLS'); }); - it('renders missing context fields as empty strings and defaults ${now}', () => { + it('renders missing context fields as empty strings', () => { const vars = systemPromptVars({}, { skillActive: true }); expect(vars['cwd']).toBe(''); @@ -74,7 +72,6 @@ describe('systemPromptVars', () => { expect(vars['skills_section']).toBe(''); expect(vars['windows_notes']).toBe(''); expect(vars['role_additional']).toBe(''); - expect(Number.isNaN(Date.parse(vars['now'] ?? ''))).toBe(false); }); it('empties skills and the skills section when the Skill tool is off', () => { @@ -140,7 +137,7 @@ describe('renderPromptTemplateResult', () => { calls += 1; return { text: 'BASE', - environment: { cwd: '', date: { disclosed: false } }, + environment: { cwd: '' }, }; }; @@ -162,51 +159,30 @@ describe('renderPromptTemplateResult', () => { ); }); - it('records the environment facts used by the now placeholder', () => { + it('keeps ${now} verbatim as an unknown placeholder', () => { const result = renderPromptTemplateResult( 'date=${now} agents=${agents_md}', - { - cwd: '/work', - now: '2026-07-29T00:30:00.000Z', - timeZone: 'America/Los_Angeles', - agentsMd: 'AGENTS', - }, + { cwd: '/work', agentsMd: 'AGENTS' }, { skillActive: true }, ); - expect(result.text).toBe('date=2026-07-29T00:30:00.000Z agents=AGENTS'); - expect(result.environment.cwd).toBe('/work'); - expect(result.environment.date).toMatchObject({ - disclosed: true, - value: { localDate: '2026-07-28', timeZone: 'America/Los_Angeles' }, - }); + expect(result.text).toBe('date=${now} agents=AGENTS'); + expect(result.environment).toEqual({ cwd: '/work' }); }); - it('merges disclosure metadata from a structured base_prompt render', () => { + it('merges environment metadata from a structured base_prompt render', () => { const result = renderPromptTemplateResult( 'custom\n\n${base_prompt}', { cwd: '/work' }, { skillActive: true }, () => ({ text: 'BASE', - environment: { - cwd: '/base', - date: { - disclosed: true, - value: { localDate: '2026-07-28', timeZone: 'UTC' }, - }, - }, + environment: { cwd: '/base' }, }), ); expect(result.text).toBe('custom\n\nBASE'); - expect(result.environment).toEqual({ - cwd: '/work', - date: { - disclosed: true, - value: { localDate: '2026-07-28', timeZone: 'UTC' }, - }, - }); + expect(result.environment).toEqual({ cwd: '/work' }); }); }); @@ -275,7 +251,6 @@ describe('renderSystemPromptResult', () => { osKind: 'Windows', shellName: 'cmd', shellPath: 'C:\\cmd.exe', - now: 'NOW', additionalDirsInfo: '/extra', }, { skillActive: true }, @@ -299,21 +274,6 @@ describe('renderSystemPromptResult', () => { expect(overridden).not.toContain('Pythinker Code CLI'); }); - it('renders identical text regardless of the render-time clock', () => { - const earlier = renderSystemPromptResult( - '', - { cwd: '/work', now: '2026-07-29T12:00:00', timeZone: 'UTC' }, - { skillActive: true }, - ); - const later = renderSystemPromptResult( - '', - { cwd: '/work', now: '2026-08-19T01:00:00', timeZone: 'UTC' }, - { skillActive: true }, - ); - - expect(later.text).toBe(earlier.text); - expect(earlier.environment).toEqual({ cwd: '/work', date: { disclosed: false } }); - }); }); describe('normalizeAgentProfile', () => { @@ -325,24 +285,18 @@ describe('normalizeAgentProfile', () => { expect(profile.renderSystemPrompt({ cwd: '/work' })).toEqual({ text: 'cwd:/work', - environment: { cwd: '/work', date: { disclosed: false } }, + environment: { cwd: '/work' }, }); expect(profile.renderSystemPrompt({})).toEqual({ text: 'cwd:', - environment: { cwd: '', date: { disclosed: false } }, + environment: { cwd: '' }, }); }); it('derives systemPrompt from renderSystemPrompt for structured input', () => { const render = (context: AgentProfileContext): SystemPromptRenderResult => ({ text: `structured:${context.cwd ?? ''}`, - environment: { - cwd: context.cwd ?? '', - date: { - disclosed: true, - value: { localDate: '2026-07-29', timeZone: 'UTC' }, - }, - }, + environment: { cwd: context.cwd ?? '' }, }); const profile = normalizeAgentProfile({ name: 'structured', renderSystemPrompt: render }); @@ -350,13 +304,7 @@ describe('normalizeAgentProfile', () => { expect(profile.systemPrompt({ cwd: '/work' })).toBe( profile.renderSystemPrompt({ cwd: '/work' }).text, ); - expect(profile.renderSystemPrompt({ cwd: '/work' }).environment).toEqual({ - cwd: '/work', - date: { - disclosed: true, - value: { localDate: '2026-07-29', timeZone: 'UTC' }, - }, - }); + expect(profile.renderSystemPrompt({ cwd: '/work' }).environment).toEqual({ cwd: '/work' }); }); it('falls back to systemPrompt when renderSystemPrompt is explicitly undefined', () => { @@ -369,7 +317,7 @@ describe('normalizeAgentProfile', () => { expect(profile.systemPrompt({})).toBe('text-entry'); expect(profile.renderSystemPrompt({})).toEqual({ text: 'text-entry', - environment: { cwd: '', date: { disclosed: false } }, + environment: { cwd: '' }, }); }); @@ -399,7 +347,7 @@ describe('normalizeAgentProfile', () => { renderSystemPrompt(): SystemPromptRenderResult { return { text: `name:${this.name}`, - environment: { cwd: '', date: { disclosed: false } }, + environment: { cwd: '' }, }; }, }; @@ -418,7 +366,7 @@ describe('normalizeAgentProfile', () => { renderSystemPrompt(context: AgentProfileContext): SystemPromptRenderResult { return { text: `structured:${this.systemPrompt(context)}`, - environment: { cwd: context.cwd ?? '', date: { disclosed: false } }, + environment: { cwd: context.cwd ?? '' }, }; }, }; @@ -426,7 +374,7 @@ describe('normalizeAgentProfile', () => { expect(profile.renderSystemPrompt({})).toEqual({ text: 'structured:text-entry', - environment: { cwd: '', date: { disclosed: false } }, + environment: { cwd: '' }, }); expect(profile.systemPrompt({})).toBe('structured:text-entry'); }); diff --git a/packages/agent-core-v2/test/app/config/config.test.ts b/packages/agent-core-v2/test/app/config/config.test.ts index c380db601..d9c7e1393 100644 --- a/packages/agent-core-v2/test/app/config/config.test.ts +++ b/packages/agent-core-v2/test/app/config/config.test.ts @@ -220,7 +220,7 @@ describe('Agent config', () => { }); expect(ctx.newEvents()).toMatchInlineSnapshot(` - [wire] config.update { "agentId": "main", "profileName": "test-profile", "systemPrompt": "Profile system prompt.", "environmentDisclosure": { "cwd": "", "date": { "disclosed": false } }, "agentsMdPaths": [], "disallowedTools": [], "time": "