Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Intercode keeps repository guidance and sub-agent profiles separate:

- `AGENTS.md` — shared startup instructions and project context
- `CLAUDE.md` — Claude-specific workspace notes
- `packages/agents/` — built-in sub-agent profiles shipped with Intercode (`greybeard`, `critique`)
- `src/agent/default-agents.ts` — built-in sub-agent profiles shipped with Intercode (`greybeard`, `critique`)
- `.agents/agents/` — optional local profile overrides or additions; this directory is not required and may be absent

Named `task` sub-agents resolve from built-ins first, then enabled agent plugins, then local `.agents/agents/*.json|*.yaml` profiles. Add a local profile under `.agents/agents/` or use an installed profile id such as `greybeard`.
7 changes: 0 additions & 7 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
"./interchange/packages/mime",
"./interchange/packages/log",
"./interchange/packages/crypto-node",
"./interchange/packages/tools-lsp",
"./packages/agents"
"./interchange/packages/tools-lsp"
],
"catalog": {
"@types/semver": "^7.7.1",
Expand All @@ -42,7 +41,6 @@
"tar": "^7.5.1"
},
"dependencies": {
"@intercode/default-agents": "workspace:*",
"@intx/agent": "workspace:*",
"@intx/inference": "workspace:*",
"@intx/log": "workspace:*",
Expand Down
12 changes: 0 additions & 12 deletions packages/agents/package.json

This file was deleted.

4 changes: 0 additions & 4 deletions packages/agents/tsconfig.json

This file was deleted.

15 changes: 2 additions & 13 deletions packages/agents/src/index.ts → src/agent/default-agents.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
export type {
AgentProfile,
AgentPlugin,
CapabilityFilter,
CapabilityMode,
InferenceLeg,
InferenceSpec,
ReasoningEffort,
} from "./types.js";
export { REASONING_EFFORTS } from "./types.js";

import type { AgentPlugin } from "./types.js";
import type { AgentPlugin } from "./profile-types.js";

// Default agent profiles shipped with intercode. These are the sub-agents
// referenced by the built-in workflows. Repositories can override any of
// these by placing a same-id profile in .agents/agents/.
export const plugin: AgentPlugin = {
export const defaultAgentsPlugin: AgentPlugin = {
agents: [
{
id: "greybeard",
Expand Down
18 changes: 9 additions & 9 deletions packages/agents/src/types.ts → src/agent/profile-types.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// Public contract for agent plugin authors.
// Agent profile contract. External profiles are data (JSON/YAML under
// .agents/agents/ or contributed by agent-kind plugins) validated against
// this shape at load time; these types never cross the repo boundary.

// Reasoning-effort levels carried through to the provider. The canonical
// definition lives here so plugin authors and runtime stay in sync without
// re-declaring the literal set. Mirrored as a runtime array by
// src/provider/reasoning-effort.ts. Ordered from least to most effort; "ultra"
// is not simply a bigger thinking budget than "max" — it additionally enables
// automatic sub-task delegation, so code that treats effort as a scalar dial
// may need to branch on it separately.
// definition lives here; src/provider/reasoning-effort.ts mirrors it as the
// runtime array. Ordered from least to most effort; "ultra" is not simply a
// bigger thinking budget than "max" — it additionally enables automatic
// sub-task delegation, so code that treats effort as a scalar dial may need
// to branch on it separately.
export const REASONING_EFFORTS = [
"none",
"minimal",
Expand Down Expand Up @@ -76,8 +77,7 @@ export type AgentProfile = {
maxTurns?: number;
};

// The shape every agent plugin package must export as "plugin" or as the
// default export.
// The shape an agent-kind plugin contributes: a list of profiles.
export type AgentPlugin = {
agents: AgentProfile[];
};
12 changes: 4 additions & 8 deletions src/agent/profiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ import { join } from "node:path";

import { type } from "arktype";

import {
plugin as defaultPlugin,
REASONING_EFFORTS,
} from "@intercode/default-agents";
import { defaultAgentsPlugin as defaultPlugin } from "./default-agents.js";
import { REASONING_EFFORTS } from "./profile-types.js";

// Public agent profile types live in @intercode/default-agents so plugin
// authors can depend on that package without pulling in the full runtime.
export type { AgentProfile, AgentPlugin, CapabilityFilter, CapabilityMode, InferenceLeg, InferenceSpec, ReasoningEffort } from "@intercode/default-agents";
import type { AgentProfile } from "@intercode/default-agents";
export type { AgentProfile, AgentPlugin, CapabilityFilter, CapabilityMode, InferenceLeg, InferenceSpec, ReasoningEffort } from "./profile-types.js";
import type { AgentProfile } from "./profile-types.js";

// Exported so agent-kind plugins can validate contributed profiles.
export { AgentProfileSchema };
Expand Down
2 changes: 1 addition & 1 deletion src/config/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ export function resolveTier(tier: ProviderTier, settings: Settings): TierAssignm
};
}

import type { InferenceSpec } from "@intercode/default-agents";
import type { InferenceSpec } from "../agent/profile-types.js";

// A resolved inference leg, with reasoningEffort threaded through.
export type ResolvedInference = {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/data-only-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
ReasoningEffort,
} from "../agent/profiles.js";
import { AgentProfileSchema } from "../agent/profiles.js";
import { REASONING_EFFORTS } from "@intercode/default-agents";
import { REASONING_EFFORTS } from "../agent/profile-types.js";
import { splitFrontmatter } from "./frontmatter.js";
import { type } from "arktype";

Expand Down
8 changes: 4 additions & 4 deletions src/provider/reasoning-effort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// "variant" or a separate model — the same model accepts an effort level that
// trades latency and cost against reasoning depth.

// The canonical literal set lives in @intercode/default-agents so plugin
// authors and the runtime cannot drift. Re-exported here for callers that
// already import from this module.
import { REASONING_EFFORTS as CANONICAL_EFFORTS } from "@intercode/default-agents";
// The canonical literal set lives in the agent profile contract so the
// profile schema and the runtime cannot drift. Re-exported here for callers
// that already import from this module.
import { REASONING_EFFORTS as CANONICAL_EFFORTS } from "../agent/profile-types.js";

export const REASONING_EFFORTS = CANONICAL_EFFORTS;
export type ReasoningEffort = (typeof REASONING_EFFORTS)[number];
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/resolve-inference-spec.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
resolveInferenceWithPolicy,
type Settings,
} from "../../src/config/settings.js";
import type { InferenceSpec } from "@intercode/default-agents";
import type { InferenceSpec } from "../../src/agent/profile-types.js";

const baseSettings: Settings = {
providers: {
Expand Down