code-yeongyu / code-yeongyu/senpi

feat(eval): fenced JS kernel tools and reentrant worker pump (S6)

Closed
#1,647 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
429
Forks
98
Avg merge
5h 3m
Merged PRs (30d)
526

Description

## Summary
Define fenced JavaScript kernel-tool descriptors and add a reentrant worker invoke pump in senpi.

## Expected
HC13: only JavaScript workers and in-process children receive kernel tools; Python, Ruby, Julia parents and process/RPC/team children receive typed `tools_unavailable`. Descriptors resolve live names and are fenced by kernel generation and definition revision. A parent JavaScript worker awaiting a child can service nested kernel-tool calls without deadlock, with typed stale, missing, recursion, and failure results.

## Scope + acceptance criteria
- Make named JavaScript `tool(fn, metadata?)` definitions produce validated JSON schemas and descriptors without persisting closures.
- Normalize names with existing MCP rules, reject reserved names/collisions, and invalidate descriptors on reset/kill/redefinition.
- Extend the worker protocol with correlated describe/invoke/reply messages and independent pending-call pumping; preserve one top-level cell and clean cancellation/reset semantics.
- Prove parent-awaits-child ordering over real worker transport and typed fail-closed behavior.

## Related
- Sibling units: [senpi#1637](https://github.com/code-yeongyu/senpi/issues/1637) (merged S8), [senpi#1639](https://github.com/code-yeongyu/senpi/issues/1639) (S1), [oh-my-openagent#8211](https://github.com/code-yeongyu/oh-my-openagent/issues/8211) (O9), [oh-my-openagent#8213](https://github.com/code-yeongyu/oh-my-openagent/issues/8213) (O2).
- Copy-on-write isolation [oh-my-openagent#8181](https://github.com/code-yeongyu/oh-my-openagent/issues/8181) is explicitly out of scope.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the existing JavaScript worker tool definitions and worker protocol entry points, then inspect how child-worker transport and reset or cancellation are handled. Verify the design against the stated acceptance criteria: fenced descriptors, correlated describe/invoke/reply messages, reentrant parent-awaits-child behavior, and typed fail-closed results.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend-api-design, cli, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.