operon-agents-core 0.1.0-alpha.36 → 0.1.0-alpha.37

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.
@@ -1,6 +1,7 @@
1
1
  import type { Environment } from "../tool/environment.ts";
2
2
  /** Runtime-only values used to render a profile system prompt. */
3
3
  export interface SystemPromptContext {
4
+ readonly environmentName?: string;
4
5
  readonly osKind: string;
5
6
  readonly osArch?: string;
6
7
  readonly osVersion?: string;
@@ -11,6 +11,7 @@ export function formatSystemPromptDate(date) {
11
11
  /** Build the environment portion of a profile prompt from the active runtime environment. */
12
12
  export async function prepareSystemPromptContext(environment, now = formatSystemPromptDate(new Date()), cwd = environment.normpath(environment.getcwd())) {
13
13
  return {
14
+ environmentName: environment.name,
14
15
  osKind: environment.osInfo.osKind,
15
16
  osArch: environment.osInfo.osArch,
16
17
  osVersion: environment.osInfo.osVersion,
@@ -4,10 +4,12 @@ import { loadAgentProfilesFromSources } from "./profiles.js";
4
4
  // filesystem needed); `loadAgentProfilesFromSources` parses + resolves `extends` at module load.
5
5
  // Original system-prompt template (nunjucks). Vars: os/osArch/osVersion, shell, now, workDir,
6
6
  // agentsMd, roleAdditional (see buildTemplateVars in profiles.ts).
7
- const SYSTEM_MD = `You are a capable software-engineering agent working directly in the user's environment. Operate autonomously and precisely: understand the task, make the change, and verify it.
7
+ const SYSTEM_MD = `You are a capable software-engineering agent working with the user. Operate autonomously and precisely: understand the task, make the change, and verify it.
8
8
 
9
9
  ## Environment
10
- - OS: {{ os }}{% if osVersion %} ({{ osVersion }}{% if osArch %}, {{ osArch }}{% endif %}){% endif %}
10
+ Your agent loop runs on a host machine. File and shell tools operate in your default environment unless you select another target. An environment can be on the host or on a different machine. Interpret paths, processes, and working directories in the environment of the tool call. Host-provided tools use the location described by each tool.
11
+ {% if environmentName %}- Default environment: {{ environmentName }}
12
+ {% endif %}- OS: {{ os }}{% if osVersion %} ({{ osVersion }}{% if osArch %}, {{ osArch }}{% endif %}){% endif %}
11
13
  - Shell: {{ shell }}
12
14
  - Working directory: {{ workDir }}
13
15
  - Date: {{ now }}
@@ -34,6 +34,7 @@ function buildTemplateVars(context, promptVars) {
34
34
  const now = context.now instanceof Date ? formatSystemPromptDate(context.now) : (context.now ?? "");
35
35
  return {
36
36
  ...promptVars,
37
+ environmentName: context.environmentName ?? "",
37
38
  os: context.osKind,
38
39
  osArch: context.osArch ?? "",
39
40
  osVersion: context.osVersion ?? "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "operon-agents-core",
3
- "version": "0.1.0-alpha.36",
3
+ "version": "0.1.0-alpha.37",
4
4
  "description": "Internal engine for operon-agents. Prefer operon-agents for application code.",
5
5
  "type": "module",
6
6
  "engines": {