@sema-agent/core
Version:
Stateless, task-oriented AI agent core
99 lines (98 loc) • 6.14 kB
JavaScript
const HARNESS = { id: "harness.context" };
export const SECTIONS = [
{ id: "core/role.base", band: "role", rank: 100, block: { id: "role.base" }, body: { renderer: "role-base" } },
{
id: "core/harness.head",
band: "constitution",
rank: 200,
block: HARNESS,
body: {
joiner: "\n",
lines: [
{ message: "core/harness.head.anchor" },
{ message: "core/harness.head.reminder-tag" },
{ message: "core/harness.head.untrusted-results" },
{ message: "core/harness.head.context" },
{ message: "core/harness.head.hooks", admit: { hooksEnabled: true } },
{ message: "core/harness.head.hook-deny", admit: { hooksEnabled: true, policyEnabled: false, isolationEnabled: false } },
],
},
},
{ id: "core/security.cyber-risk", band: "constitution", rank: 210, block: HARNESS, body: { message: "core/security.cyber-risk" } },
{ id: "core/security.url-safety", band: "constitution", rank: 220, block: HARNESS, body: { message: "core/security.url-safety" } },
{ id: "core/harness.tool-result-retention", band: "constitution", rank: 230, block: HARNESS, body: { message: "core/harness.tool-result-retention" } },
{
id: "core/harness.execution-environment",
band: "constitution",
rank: 240,
block: HARNESS,
admit: { executionEnvironmentDeclared: true },
body: {
joiner: "\n",
lines: [
{ message: "core/harness.execution-environment.head" },
{ message: "core/harness.execution-environment.faces" },
{ message: "core/harness.execution-environment.body" },
],
},
},
{ id: "core/simple.communicating", band: "core-behavior", rank: 250, block: HARNESS, body: { message: "core/simple.communicating" } },
{ id: "core/simple.pronouns", band: "core-behavior", rank: 252, block: HARNESS, body: { message: "core/simple.pronouns" } },
{ id: "core/simple.action-caution", band: "core-behavior", rank: 254, block: HARNESS, body: { message: "core/simple.action-caution" } },
{ id: "core/simple.tool-param-json", band: "core-behavior", rank: 258, block: HARNESS, body: { message: "core/simple.tool-param-json" } },
{
id: "core/simple.context-management",
band: "constitution",
rank: 262,
block: HARNESS,
admit: { withinTaskCompactionEnabled: true },
body: { message: "core/simple.context-management" },
},
{ id: "core/simple.act-dont-rederive", band: "core-behavior", rank: 264, block: HARNESS, body: { message: "core/simple.act-dont-rederive" } },
{ id: "core/simple.delivering-work", band: "core-behavior", rank: 265, block: HARNESS, body: { message: "core/simple.delivering-work" } },
{ id: "core/simple.corrections", band: "core-behavior", rank: 267, block: HARNESS, body: { message: "core/simple.corrections" } },
{ id: "core/simple.autonomy", band: "core-behavior", rank: 270, block: HARNESS, body: { message: "core/simple.autonomy" } },
{ id: "core/sema.verify-fresh", band: "core-behavior", rank: 272, block: HARNESS, body: { message: "core/sema.verify-fresh" } },
{ id: "core/sema.evidence-audit", band: "core-behavior", rank: 274, block: HARNESS, body: { message: "core/sema.evidence-audit" } },
{
id: "core/mode.subagent-consent",
band: "constitution",
rank: 280,
block: { id: "mode.subagent-consent" },
admit: { isSubagent: true },
body: { message: "core/mode.subagent-consent" },
},
{ id: "core/mode.subagent-notes", band: "constitution", rank: 282, block: { id: "mode.subagent-notes" }, admit: { isSubagent: true }, body: { message: "core/mode.subagent-notes" } },
{ id: "core/mode.supervisor", band: "constitution", rank: 300, block: { id: "mode.supervisor" }, admit: { supervisorEnabled: true }, body: { message: "core/mode.supervisor" } },
{
id: "core/mode.orchestration",
band: "constitution",
rank: 310,
block: { id: "mode.orchestration" },
admit: { orchestrationEnabled: true },
body: { message: "core/mode.orchestration" },
},
{ id: "core/mode.awareness", band: "constitution", rank: 320, block: { id: "mode.awareness" }, admit: { awarenessEnabled: true }, body: { message: "core/mode.awareness" } },
{ id: "core/mode.worktree", band: "constitution", rank: 330, block: { id: "mode.worktree" }, admit: { worktreeIsolated: true }, body: { message: "core/mode.worktree" } },
{ id: "core/mode.goal", band: "constitution", rank: 340, block: { id: "mode.goal" }, admit: { goalEnabled: true }, body: { message: "core/mode.goal" } },
{ id: "core/mode.teammate", band: "constitution", rank: 405, block: { id: "mode.teammate" }, admit: { teammateEnabled: true }, body: { message: "core/mode.teammate" } },
{
id: "core/behavior.fable-classic-guidance",
band: "core-behavior",
rank: 448,
block: { id: "behavior.fable-classic-guidance" },
body: {
joiner: "\n\n",
lines: [
{ message: "core/behavior.fable-classic.final-message" },
{ message: "core/behavior.fable-classic.autonomy" },
{ message: "core/behavior.fable-classic.tool-json" },
],
},
},
{ id: "core/behavior.model-guidance", band: "behavior", rank: 450, block: { id: "model.guidance" }, body: { renderer: "model-guidance" } },
{ id: "core/discovery.mcp-instructions", band: "discovery", rank: 500, block: { id: "mcp.instructions" }, body: { renderer: "mcp-instructions" } },
{ id: "core/harness.reminder-mark", band: "constitution", rank: 590, block: { id: "harness.reminder-mark" }, body: { renderer: "reminder-mark" } },
{ id: "core/environment.context", band: "environment", rank: 600, block: { id: "env.context" }, body: { renderer: "environment" } },
{ id: "core/memory.tail", band: "memory", rank: 700, block: { id: "memory.tail" }, body: { renderer: "memory" } },
];