picocode-core 0.9.159 → 0.9.160

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "picocode-core",
3
- "version": "0.9.159",
3
+ "version": "0.9.160",
4
4
  "description": "The agent runtime behind pico: sessions, tools, subagents, MCP, memory, and model access",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/controller.js CHANGED
@@ -205,7 +205,7 @@ export function createController({ boot }) {
205
205
  const requestedTools = agent.tools?.length ? agent.tools.filter((name) => WORKER_TOOLS.includes(name)) : WORKER_TOOLS
206
206
  const { tools, recorder } = createToolset({
207
207
  cwd: boot.cwd,
208
- env: { PICO_SCRATCHPAD: scratchpad },
208
+ env: { ...boot.env, PICO_SCRATCHPAD: scratchpad },
209
209
  // a private tracker seeded from the main one: a worker may read an
210
210
  // AGENTS.md the main agent has not seen, and consuming it from the
211
211
  // shared set would mean the main agent never receives it
@@ -279,7 +279,7 @@ export function createController({ boot }) {
279
279
  const scratchpad = ensureDir(agentScratchDir(boot.root, sessionId, `deliberation-${id}-${role}`))
280
280
  const toolset = createToolset({
281
281
  cwd: boot.cwd,
282
- env: { PICO_SCRATCHPAD: scratchpad },
282
+ env: { ...boot.env, PICO_SCRATCHPAD: scratchpad },
283
283
  tracker: createContextTracker({ stopDir: boot.startupContext.stopDir, loaded: new Set(boot.tracker.loaded) }),
284
284
  shells: boot.shells,
285
285
  sessionId,
@@ -609,6 +609,8 @@ export function createController({ boot }) {
609
609
  const freshSkills = boot.skills
610
610
  const { tools, recorder } = createToolset({
611
611
  cwd: boot.cwd,
612
+ env: boot.env,
613
+ hostTools: boot.hostTools ?? [],
612
614
  tracker,
613
615
  skills: freshSkills,
614
616
  shells: boot.shells,
@@ -1194,6 +1196,8 @@ export function createController({ boot }) {
1194
1196
  function baseToolset(extra = {}) {
1195
1197
  return createToolset({
1196
1198
  cwd: boot.cwd,
1199
+ env: boot.env,
1200
+ hostTools: boot.hostTools ?? [],
1197
1201
  tracker: boot.tracker,
1198
1202
  skills: boot.skills,
1199
1203
  shells: boot.shells,
package/src/shells.js CHANGED
@@ -22,6 +22,7 @@ export function createShellManager({ onChange = () => {}, onExit = () => {} } =
22
22
  id: shell.id,
23
23
  command: shell.command,
24
24
  description: shell.description,
25
+ pid: shell.child?.pid ?? null,
25
26
  sessionId: shell.sessionId,
26
27
  sessionFile: shell.sessionFile,
27
28
  cwd: shell.cwd,
@@ -8,7 +8,7 @@ import { createGrep } from './grep.js'
8
8
  import { createWebTools } from './web.js'
9
9
  import { createView } from './view.js'
10
10
 
11
- export function createToolset({ cwd, env, tracker, skills, shells, sessionId, sessionFile, wakeups, memory, agents, deliberations, onAgentsCollected, askUser, dredge, mcpTools = [], userTools = [], signal, maxToolCalls, maxAgentStarts, requireAgentPlan = false, allowNames, onToolUpdate, viewer }) {
11
+ export function createToolset({ cwd, env, tracker, skills, shells, sessionId, sessionFile, wakeups, memory, agents, deliberations, onAgentsCollected, askUser, dredge, mcpTools = [], userTools = [], hostTools = [], signal, maxToolCalls, maxAgentStarts, requireAgentPlan = false, allowNames, onToolUpdate, viewer }) {
12
12
  const recorder = createRecorder(onToolUpdate)
13
13
  let agentStarts = 0
14
14
  let plannedAgentStarts = requireAgentPlan ? null : maxAgentStarts
@@ -286,7 +286,7 @@ export function createToolset({ cwd, env, tracker, skills, shells, sessionId, se
286
286
  const describedToolNames = new Set(['read', 'write', 'edit', 'bash', 'glob', 'grep', 'web_search', 'schedule_wakeup'])
287
287
  const describedTools = new Set(local.filter((tool) => describedToolNames.has(tool.name)).map((tool) => tool.name))
288
288
  const byName = new Map()
289
- for (const tool of [...local, ...userTools, ...mcpTools]) {
289
+ for (const tool of [...local, ...hostTools, ...userTools, ...mcpTools]) {
290
290
  if (allowNames && !allowNames.includes(tool.name)) continue
291
291
  if (!byName.has(tool.name)) byName.set(tool.name, tool)
292
292
  }