Skip to content

craft-hub / AgentActionService

Class: AgentActionService

Defined in: packages/craft-hub/src/agent-actions.ts:175

Coordinates deterministic project-description audits, agent proposals, and reviewed application.

Constructors

Constructor

new AgentActionService(tasks, projects, discover): AgentActionService

Defined in: packages/craft-hub/src/agent-actions.ts:176

Parameters

tasks

AgentTaskManager

projects

ProjectRegistry

discover

(projectId, locale) => Promise<CapabilityDiscoveryResult>

Returns

AgentActionService

Methods

apply()

apply(projectId, taskId, changes): Promise<ProjectDescriptionApplication>

Defined in: packages/craft-hub/src/agent-actions.ts:272

Apply only user-reviewed values from a still-current proposal.

Parameters

projectId

string

taskId

string

changes

ProjectDescriptionChange[]

Returns

Promise<ProjectDescriptionApplication>


audit()

audit(projectId, locale): Promise<ProjectDescriptionAudit>

Defined in: packages/craft-hub/src/agent-actions.ts:183

Find description gaps without invoking an external agent.

Parameters

projectId

string

locale

"en" | "zh-CN"

Returns

Promise<ProjectDescriptionAudit>


list()

list(projectId, locale): Promise<AgentActionSummary[]>

Defined in: packages/craft-hub/src/agent-actions.ts:227

Describe the built-in actions applicable to one project.

Parameters

projectId

string

locale

"en" | "zh-CN"

Returns

Promise<AgentActionSummary[]>


start()

start(projectId, id, locale): Promise<AgentTaskRecord>

Defined in: packages/craft-hub/src/agent-actions.ts:248

Start an analysis-only agent task that returns reviewable structured suggestions.

Parameters

projectId

string

id

"improve-project-config"

locale

"en" | "zh-CN"

Returns

Promise<AgentTaskRecord>

Released under the MIT License.