Skip to content

[P0] Introduce canonical compiled job contract into agenc-core executor boundary #1559

Description

@signerless

Summary

Introduce a canonical compiled job contract and executor boundary in agenc-core so runtime execution is driven by a versioned structured plan instead of raw task handler/context orchestration.

This is a direct blocker for #1557.

Current Evidence

The current task executor path is built around raw task execution primitives, not a marketplace compiled-job contract:

  • /Users/tetsuoarena/agenc-umbrella/agenc-core/runtime/src/task/executor.ts
  • /Users/tetsuoarena/agenc-umbrella/agenc-core/runtime/src/task/types.ts

I did not find a canonical runtime contract that carries:

  • job_type
  • risk_tier
  • allowed_tools
  • allowed_domains
  • memory_scope
  • write_scope
  • network_policy
  • compiled_plan_hash
  • compiler_version
  • policy_version

Goal

Define and wire a canonical compiled job contract into runtime execution so the executor receives only:

  • compiled plan
  • resolved policy output
  • scoped runtime credentials / tokens
  • bounded budgets and approval requirements

Raw freeform task text must never be the permissions source.

Scope

Primary repo:

  • agenc-core

Expected architectural work:

  • define the runtime-facing compiled job type
  • map marketplace job execution onto that type
  • persist plan and policy audit fields per run
  • fail closed on unknown job type / policy state / tool scope mismatch

Acceptance Criteria

  • executable marketplace jobs run through a canonical compiled job contract
  • runtime receives a structured, versioned plan instead of freeform permissions
  • compiled_plan_hash, compiler_version, and policy_version are stored with each run
  • runtime rejects unknown or incomplete compiled plans
  • executor cannot broaden scope from raw prompt text at runtime

Notes

This is the core technical boundary change in #1557. Without it, the epic remains architecture only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions