Skip to content

Commit e026c26

Browse files
feat(intern): ship intern as a workspace agent package (#1159)
* feat(intern): ship intern as a workspace agent package * chore(dead-exports): drop stale fixture allowlist entries Linux CI stopped reporting those path-loaded fixture exports after intern shipped as a workspace package. Ignore comments keep Darwin ts-prune from treating the same exports as new dead code.
1 parent 1e6f717 commit e026c26

13 files changed

Lines changed: 69 additions & 18 deletions

File tree

‎agents/intern/package.json‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "@corbits/agent-intern",
3+
"version": "0.1.0",
4+
"private": true,
5+
"type": "module",
6+
"license": "SEE LICENSE IN LICENSE.md",
7+
"exports": {
8+
".": {
9+
"types": "./src/index.ts",
10+
"default": "./src/index.ts"
11+
}
12+
}
13+
}
Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,38 @@
1-
import type { DirectorPackage } from "../types.js";
2-
import { INTERN_TOOLS } from "../tool-sets.js";
3-
41
/**
52
* Mechanical intern worker — 1:1 port of gaas intern.md
63
* (`abklabs/agents` plugins/gaas/agents/intern.md @ 6e16b6c).
74
* Tool-name mapping only (ask → ask_director). Path writes live on the
85
* intern mount and in the dispatch brief, not in extra prompt essays.
96
*/
10-
export const internPackage: DirectorPackage = {
7+
export type AgentPackage = {
8+
readonly id: "intern";
9+
readonly primaryIntent: string;
10+
readonly outOfLane: readonly string[];
11+
readonly description: string;
12+
readonly systemPrompt: string;
13+
readonly optionalSkills: readonly string[];
14+
readonly tools: {
15+
readonly allow: readonly string[];
16+
};
17+
readonly spawn: {
18+
readonly maySpawn: false;
19+
};
20+
readonly modelRole: "implement";
21+
readonly tier: "leaf";
22+
};
23+
24+
const INTERN_TOOLS = [
25+
"run_shell",
26+
"read_file",
27+
"list_dir",
28+
"write_file",
29+
"edit_file",
30+
"delete_file",
31+
"skill_search",
32+
"use_skill",
33+
] as const;
34+
35+
export const internPackage: AgentPackage = {
1136
id: "intern",
1237
primaryIntent:
1338
"Execute clear mechanical instructions exactly — zero judgment, zero invention",

‎bun.lock‎

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export const notes: string[] = [];
22

3+
// ts-prune-ignore-next
34
export function addNote(note: string): void {
45
notes.push(note);
56
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
// ts-prune-ignore-next
12
export const data = { seed: 7 };

‎evals/completion/tasks/sum-fix/fixture/sum.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// ts-prune-ignore-next
12
export function total(values: number[]): number {
23
let sum = 0;
34
for (const value of values) {

‎evals/completion/tasks/version-endpoint/fixture/service.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export interface Reply {
33
body: unknown;
44
}
55

6+
// ts-prune-ignore-next
67
export function handleRequest(method: string, path: string): Reply {
78
if (method === "GET" && path === "/health") {
89
return { status: 200, body: { ok: true } };

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
"tar": "^7.5.1"
8787
},
8888
"dependencies": {
89+
"@corbits/agent-intern": "workspace:*",
8990
"@corbits/codex-provider": "github:corbitsdev/corbits-codex-provider",
9091
"@corbits/oauth-core": "github:corbitsdev/corbits-oauth-core",
9192
"@corbits/openai-responses": "github:corbitsdev/corbits-openai-responses",

‎scripts/dead-export-allowlist.txt‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,6 @@ vendor/
2929
src/auth/codex/constants.ts: CODEX_REFRESH_SKEW_MS
3030
src/auth/codex/constants.ts: CODEX_HEADLESS_REFRESH_INTERVAL_MS
3131

32-
# Plugin fixture entry point. Loaded by file path from the fixture's plugin
33-
# manifest by the plugin-registration tests, so it has no static importers.
34-
tests/fixtures/plugins/implement-feature/src/index.ts
35-
36-
# Eval completion-harness task fixtures (CL-7932 lane). Loaded by file path
37-
# from each task's script.json by the harness runner, so they have no static
38-
# importers.
39-
evals/completion/tasks/decline-refactor/fixture/notes.ts: addNote
40-
evals/completion/tasks/stall-read/fixture/data.ts: data
41-
evals/completion/tasks/sum-fix/fixture/sum.ts: total
42-
evals/completion/tasks/version-endpoint/fixture/service.ts: handleRequest
43-
4432
# ts-prune parser false positives: bare tokens on `as const satisfies ...`
4533
# lines inside live exports. None of these is an export declaration.
4634
src/provider/reasoning-effort.ts: satisfies

‎src/agent/directors/intern/package.test.ts‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
import { describe, expect, test } from "bun:test";
22

3-
import { internPackage } from "./package.js";
3+
import { internPackage, type AgentPackage } from "@corbits/agent-intern";
4+
import { DIRECTOR_REGISTRY } from "../registry.js";
5+
import { INTERN_TOOLS } from "../tool-sets.js";
46

57
describe("internPackage", () => {
8+
test("workspace package is an AgentPackage used by the registry", () => {
9+
const pkg: AgentPackage = internPackage;
10+
expect(pkg.id).toBe("intern");
11+
expect(DIRECTOR_REGISTRY.intern).toBe(internPackage);
12+
expect([...(pkg.tools?.allow ?? [])]).toEqual([...INTERN_TOOLS]);
13+
});
14+
615
test("systemPrompt is mechanical executor (gaas intern port)", () => {
716
const p = internPackage.systemPrompt;
817
expect(p).toMatch(/intern assistant/);

0 commit comments

Comments
 (0)