@archastro/sdk
    Preparing search index...
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Claim a task for a coding session Atomically claims a user-assigned task for the authenticated user's coding session. The caller generates and retains both UUIDs. An exact retry returns the existing lease without extending it; another live holder produces a conflict. Developer and server-to-server credentials cannot impersonate the assigned user.

      Parameters

      • task: string

        Task ID (tsk_...).

      • input: {
            harness: string;
            lease_duration_seconds?: number;
            lease_id: string;
            require_ready?: boolean;
            session_id: string;
            session_name: string;
        }

        Request body.

        • harness: string

          Bounded harness identifier.

        • Optionallease_duration_seconds?: number

          Requested lease lifetime in seconds; the task aggregate enforces its bounds.

        • lease_id: string

          Caller-generated lease UUID.

        • Optionalrequire_ready?: boolean

          Conservatively reject the claim when the current task projection has unfinished blockers.

        • session_id: string

          Caller-generated coding-session UUID.

        • session_name: string

          Human-readable coding-session label.

      Returns Promise<TaskSessionLease>

      The caller-held lease, including its fencing token.

    • Retrieve a task's current session lease Returns the authenticated assignee's viewer-safe live lease summary, or null when no live lease exists. Fencing and opaque session identifiers are never included.

      Parameters

      • task: string

        Task ID (tsk_...).

      Returns Promise<TaskSessionLeaseSummary | null>

      Viewer-safe live lease summary, or null.

    • Release a task session lease Releases the authenticated assignee's matching live task lease. Repeating a release after the lease is absent succeeds. A different live successor lease returns a mismatch.

      Parameters

      • task: string

        Task ID (tsk_...).

      Returns Promise<void>

      Empty response. HTTP 204 is returned after release is accepted.

    • Renew a task session lease Renews the authenticated assignee's matching live task lease. Both caller-generated UUIDs must match the aggregate's current lease.

      Parameters

      • task: string

        Task ID (tsk_...).

      • input: { lease_duration_seconds?: number; lease_id: string; session_id: string }

        Request body.

        • Optionallease_duration_seconds?: number

          Requested renewed lifetime in seconds; the task aggregate enforces its bounds.

        • lease_id: string

          Current caller-held lease UUID.

        • session_id: string

          Current coding-session UUID.

      Returns Promise<TaskSessionLease>

      The renewed caller-held lease.