@archastro/sdk
    Preparing search index...
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Mark a task as blocked by another task Records that the task in blocker blocks the specified task and returns the updated task. Blocking is informational — the blocked task can still change status — and derived at read time, so the task stops reporting is_blocked as soon as every blocker is done. The blocker must belong to the same owner (team or user) as the task; self-blocking and blocking a task that already blocks the blocker (a direct cycle) are rejected.

      Parameters

      • task: string

        Blocked task ID (tsk_...).

      • input: { agent?: string; blocker: string; org?: string; team?: string; user?: string }

        Request body.

        • Optionalagent?: string

          Explicit owning agent (agi_...) for privileged calls.

        • blocker: string

          ID of the task that blocks this task (tsk_...).

        • Optionalorg?: string

          Explicit organization (org_...) for privileged calls; pass null when unscoped.

        • Optionalteam?: string

          Explicit owning team (tem_...) for privileged calls.

        • Optionaluser?: string

          Explicit owning user (usr_...) for privileged calls.

      Returns Promise<Task>

      The updated (blocked) task.

    • Remove a blocker from a task Removes the blocking relationship between the task in blocker and the specified task. Returns 204 No Content on success, or 404 if the given task is not currently marked as blocking this task.

      Parameters

      • task: string

        Blocked task ID (tsk_...).

      • blocker: string

        ID of the blocking task to remove (tsk_...).

      Returns Promise<void>

      Empty response body. HTTP 204 No Content on success.

    • List a task's blockers Returns a bounded page of the tasks currently marked as blocking the specified task, newest first. Blocking is informational: a blocked task can still change status, and it stops counting as blocked as soon as every blocker is done. The task's owner is resolved from the task itself.

      Parameters

      • task: string

        Blocked task ID (tsk_...).

      • Optionalparams: {
            afterCursor?: string;
            agent?: string;
            limit?: number;
            org?: string;
            team?: string;
            user?: string;
        }

        Query parameters.

        • OptionalafterCursor?: string

          Opaque cursor returned by the previous page.

        • Optionalagent?: string

          Explicit owning agent (agi_...) for privileged calls.

        • Optionallimit?: number

          Maximum blockers to return. Capped at 100.

        • Optionalorg?: string

          Explicit organization (org_...) for privileged calls; pass null when unscoped.

        • Optionalteam?: string

          Explicit owning team (tem_...) for privileged calls.

        • Optionaluser?: string

          Explicit owning user (usr_...) for privileged calls.

      Returns Promise<
          {
              after_cursor?: string;
              before_cursor?: string;
              data: {
                  agent?: string
                  | null;
                  aggregate_version?: number | null;
                  blocked_by_count?: number;
                  closed_at?: string | null;
                  comments_count?: number;
                  created_at?: string;
                  created_by_actor?:
                      | {
                          alias?: string
                          | null;
                          id?: string | null;
                          name?: string | null;
                          profile_picture?:
                              | {
                                  file?: string
                                  | null;
                                  height?: number | null;
                                  media?: string | null;
                                  mime_type?: string | null;
                                  refresh_url?: string | null;
                                  url?: string | null;
                                  width?: number | null;
                              }
                              | null;
                      }
                      | null;
                  created_by_agent?: string
                  | null;
                  created_by_user?: string | null;
                  current_lease?:
                      | { expires_at: string; harness: string; session_name: string }
                      | null;
                  description?: string | null;
                  due_date?: string | null;
                  epic?: string | null;
                  id: string;
                  is_blocked?: boolean;
                  links?: Record<string, unknown>;
                  metadata?: Record<string, unknown>;
                  name: string;
                  org?: string | null;
                  owner_actor?:
                      | {
                          alias?: string
                          | null;
                          id?: string | null;
                          name?: string | null;
                          profile_picture?:
                              | {
                                  file?: string
                                  | null;
                                  height?: number | null;
                                  media?: string | null;
                                  mime_type?: string | null;
                                  refresh_url?: string | null;
                                  url?: string | null;
                                  width?: number | null;
                              }
                              | null;
                      }
                      | null;
                  owner_agent?: string
                  | null;
                  owner_user?: string | null;
                  parent?: string | null;
                  priority?: number;
                  sandbox?: string | null;
                  source_id?: string | null;
                  source_scope?: string | null;
                  source_type?: string | null;
                  status: string;
                  subtasks_count?: number;
                  tags?: string[];
                  team?: string | null;
                  thread?: string | null;
                  updated_at?: string;
                  user?: string | null;
              }[];
              has_more: boolean;
          },
      >

      Successful response