@archastro/sdk
    Preparing search index...
    Index

    Constructors

    Methods

    • List agent requests Lists requests visible under the context policy, newest first. Filters are combined. Pagination is not a snapshot; later pages continue after the last returned request.

      Parameters

      • Optionalparams: {
            agent?: string;
            approvable?: boolean;
            cursor?: string;
            kind?: string;
            limit?: number;
            status?: string;
        }

        Query parameters.

        • Optionalagent?: string

          Filter by agent ID.

        • Optionalapprovable?: boolean

          Only requests the viewer can approve, before pagination.

        • Optionalcursor?: string

          Opaque next_cursor from a prior page.

        • Optionalkind?: string

          Filter by registered kind.

        • Optionallimit?: number

          Page size, 1–100; default 25.

        • Optionalstatus?: string

          open, resolved, rejected, expired or cancelled.

      Returns Promise<AgentRequestListResponse>

      A page of visible requests.

    • Start an agent OAuth connection

      Parameters

      • agentRequest: string

        OAuth request ID

      Returns Promise<{ authorization_url?: string }>

      Successful response

    • Reject an agent request Uses the request context visibility and approver policy. Agents cannot resolve or reject requests.

      Parameters

      • agentRequest: string

        Request ID (arq_...).

      • input: { reason: string }

        Request body.

        • reason: string

          Reason for rejecting the request.

      Returns Promise<AgentRequest>

      The request, without secret input.

    • Resolve an agent request Uses the request context visibility and approver policy. Agents cannot resolve or reject requests.

      Parameters

      • agentRequest: string

        Request ID (arq_...).

      • input: { input: Record<string, unknown> }

        Request body.

        • input: Record<string, unknown>

          Kind-specific input. Questions accept {answer: text} or {choice: zero-based option index}. Secrets must use secret_value.

      Returns Promise<AgentRequest>

      The request, without secret input.