export declare const TRIGGER_USAGE = "usage: agentworkforce trigger [payload-json] [flags]\n agentworkforce deployments trigger [payload-json] [flags]\n\nManually fire an active deployed persona through the cloud trigger endpoint.\nThe selector may be an agent id, compact agent id, deployed name, persona slug,\nor persona id. Use this to force a fresh run for testing without waiting for\nthe persona's normal schedule or integration event.\n\nA payload is optional. With one, this is the same call a product makes to wake\nan agent with data: the JSON object reaches the handler as the event payload.\nWithout one the agent gets a contentless fire, which is what a schedule looks\nlike \u2014 so an agent whose real work is payload-driven cannot be exercised by a\nbare trigger.\n\nExamples:\n agentworkforce trigger app-signal '{\"accountId\":\"acme\",\"reason\":\"usage_spike\"}'\n agentworkforce trigger app-signal --payload-file ./signal.json\n echo '{\"accountId\":\"acme\"}' | agentworkforce trigger app-signal --payload-file -\n\nFlags:\n --payload JSON object to send as the event payload.\n --payload-file Read the payload JSON from a file, or \"-\" for stdin.\n --idempotency-key Retrying with the same key returns the original run\n instead of starting a second one.\n --workspace Workforce workspace; defaults to the active one.\n --cloud-url Override the workforce cloud base URL.\n --json Emit the trigger response JSON.\n --no-prompt Fail instead of prompting for login.\n -h, --help Print this message.\n"; export interface TriggerOptions { selector: string; /** * Parsed JSON object sent as the request body. Absent means a contentless * fire — the endpoint treats a body-less POST and a `{}` body differently, * so this stays undefined rather than defaulting to an empty object. */ payload?: Record; /** Sent as `Idempotency-Key`; a repeat returns the original run. */ idempotencyKey?: string; workspace?: string; cloudUrl?: string; json?: boolean; noPrompt?: boolean; } /** Where the payload comes from, before any I/O has happened. */ export interface PayloadSource { kind: 'inline' | 'file'; value: string; } /** * Argument parsing stays synchronous and side-effect free, so it can be tested * without a filesystem or stdin. Reading `--payload-file` is deferred to * {@link resolvePayload}, which `runTrigger` calls before dispatching. */ export interface TriggerArgs extends Omit { payloadSource?: PayloadSource; } export type ParsedTriggerArgs = TriggerArgs | { help: true; }; export interface TriggerResponse { agentId: string; workspaceId: string; deploymentId: string; status: string; } export interface TriggerIO { stdout: (text: string) => void; stderr: (text: string) => void; } export declare function parseTriggerArgs(args: readonly string[]): ParsedTriggerArgs; export declare function runTrigger(args: readonly string[], io?: TriggerIO): Promise; export declare function triggerDeployment(opts: TriggerOptions): Promise; /** * Turn `--payload` / `--payload-file` into the object to send, or undefined for * a contentless fire. * * The payload must be a JSON **object**: cloud wraps the body as * `{ source: 'app.trigger', payload: }` and handlers read named fields * off it, so an array or a bare scalar would arrive as something no handler can * use. Rejecting it here beats a 202 followed by a run that silently does * nothing. */ export declare function resolvePayload(source: PayloadSource | undefined, io: TriggerIO): Promise | undefined>; /** * Build the POST for the trigger endpoint. * * A body-less POST and a `{}` body are NOT the same thing to cloud: the first * is a contentless fire (indistinguishable from a schedule firing), the second * is an app trigger carrying an empty object. So Content-Type and body are * attached only when there is a payload, never defaulted. */ export declare function buildTriggerRequest(opts: Pick, token: string): RequestInit; export declare function formatTriggerAuthHint(ctx: { authSource?: 'env' | 'cloud-session'; workspace: string; }): string; export declare function formatTriggerResult(result: TriggerResponse): string; export declare function parseTriggerResponse(value: unknown, selector: string): TriggerResponse; export declare function buildTriggerUrl(input: { cloudUrl: string; workspace: string; agentId: string; }): URL; //# sourceMappingURL=trigger-command.d.ts.map