39 lines
1.6 KiB
TypeScript
39 lines
1.6 KiB
TypeScript
// Shared, runtime-neutral agent manifest data. The normal app binds the worker implementation of
|
|
// agent.run; the Convex binding file (module.convex.ts) ships fail-closed for a future wiring —
|
|
// the module stays Postgres-only until the run job has its composed Node action (see README.md).
|
|
|
|
import { AGENT_ENTITIES } from "@conusai-kit/agent"
|
|
import type { ModuleManifest } from "@conusai-kit/core"
|
|
import { repositoryBindings } from "@conusai-kit/data"
|
|
import { AGENT_PROCEDURE_IMPLS } from "./adapters/procedures.js"
|
|
import { APPROVAL_REVIEWED, RUN_CANCELLED_ACTION } from "./contract/index.js"
|
|
import { en, lt } from "./i18n/index.js"
|
|
|
|
const tables = repositoryBindings(...AGENT_ENTITIES)
|
|
|
|
export const AGENT_MODULE_BASE: ModuleManifest = {
|
|
id: "agent",
|
|
version: "0.1.0",
|
|
kit: "^0.1.0",
|
|
requires: ["tenancy"],
|
|
permissions: {
|
|
// Watching runs and reading one is open to the project's readers.
|
|
"agent.run.read": "viewer",
|
|
// Starting, cancelling and reviewing are a person's acts on the project's behalf.
|
|
"agent.run.start": "editor",
|
|
"agent.run.cancel": "editor",
|
|
"agent.approval.review": "editor",
|
|
},
|
|
procedures: AGENT_PROCEDURE_IMPLS,
|
|
repositories: { postgres: tables },
|
|
migrations: { postgres: "migrations" },
|
|
// The module ships the Postgres profile; module.convex.ts is the fail-closed Convex binding,
|
|
// deliberately not registered until the run job has its composed Node action (see README.md).
|
|
profiles: ["postgres"],
|
|
audit: [RUN_CANCELLED_ACTION, APPROVAL_REVIEWED],
|
|
ui: {
|
|
nav: [{ scope: "project", label: "agent.title", href: "agent", permission: "agent.run.read" }],
|
|
},
|
|
i18n: { en, lt },
|
|
}
|