UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

103 lines (102 loc) • 7.21 kB
import { ACTING_FACE, ANSWERING_FACE } from "./schema.js"; const HARNESS = { id: "harness.context" }; const ACTING = ACTING_FACE; const CALLING = { workToolsAbsent: false }; 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.finishing", admit: { ...ANSWERING_FACE, ...CALLING } }, { message: "core/harness.head.hooks", admit: { hooksEnabled: true, ...ACTING } }, { message: "core/harness.head.hook-deny", admit: { hooksEnabled: true, policyEnabled: false, isolationEnabled: false, ...ACTING } }, ], }, }, { 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, admit: ACTING, body: { message: "core/harness.tool-result-retention" } }, { id: "core/harness.execution-environment", band: "constitution", rank: 240, block: HARNESS, admit: { executionEnvironmentDeclared: true, ...ACTING }, 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, admit: ACTING, body: { message: "core/simple.action-caution" } }, { id: "core/model.fable-identity", band: "constitution", rank: 255, block: HARNESS, body: { message: "core/model.fable-identity" } }, { id: "core/model.llm-rnd-capabilities", band: "constitution", rank: 256, block: HARNESS, body: { message: "core/model.llm-rnd-capabilities" } }, { id: "core/simple.tool-param-json", band: "core-behavior", rank: 258, block: HARNESS, admit: CALLING, body: { message: "core/simple.tool-param-json" } }, { id: "core/simple.skill-invocation", band: "core-behavior", rank: 260, block: HARNESS, admit: { skillToolMounted: true, isSubagent: false }, body: { message: "core/simple.skill-invocation" }, }, { 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.reduced-delegation", band: "core-behavior", rank: 267.1, block: HARNESS, admit: ACTING, body: { message: "core/simple.reduced-delegation" } }, { id: "core/simple.early-stopping", band: "core-behavior", rank: 267.3, block: HARNESS, admit: ACTING, body: { message: "core/simple.early-stopping" } }, { id: "core/simple.finishing-work", band: "core-behavior", rank: 268, block: HARNESS, admit: ACTING, body: { message: "core/simple.finishing-work" } }, { id: "core/simple.memory-guidance", band: "core-behavior", rank: 269, block: HARNESS, admit: ACTING, body: { message: "core/simple.memory-guidance" } }, { id: "core/simple.writing-for-user", band: "core-behavior", rank: 269.5, block: HARNESS, body: { message: "core/simple.writing-for-user" } }, { id: "core/simple.autonomy", band: "core-behavior", rank: 270, block: HARNESS, admit: ACTING, body: { message: "core/simple.autonomy" } }, { id: "core/sema.verify-fresh", band: "core-behavior", rank: 272, block: HARNESS, admit: ACTING, body: { message: "core/sema.verify-fresh" } }, { id: "core/sema.evidence-audit", band: "core-behavior", rank: 274, block: HARNESS, admit: ACTING, 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, ...ACTING }, 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/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" } }, ];