@archastro/sdk
    Preparing search index...
    Index

    Constructors

    Properties

    blockers: BlockerResource

    Methods

    • List a task's activity Returns a bounded chronological page of activity for the specified task. App-scoped developer and server-to-server callers explicitly provide the owning team, user, or agent and org.

      Parameters

      • task: string

        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 entries 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: { event_type?: string; sentence?: string; timestamp?: string }[];
              has_more: boolean;
          },
      >

      Successful response

    • List the tasks a task blocks Returns a bounded page of the tasks that the specified task is marked as blocking (the inverse of GET /tasks/{task}/blockers), newest first. The task's owner is resolved from the task itself.

      Parameters

      • task: string

        Blocking 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 tasks 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;
                  blockers?: string[];
                  closed_at?: string | null;
                  comments_count?: number;
                  created_at?: string;
                  created_by_actor?:
                      | {
                          alias?: string
                          | null;
                          id?: string | null;
                          name?: string | null;
                          profile_picture?:
                              | {
                                  content_url?: string
                                  | null;
                                  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;
                  human_answer_receipts?: Record<string, unknown>;
                  id: string;
                  is_blocked?: boolean;
                  is_stalled?: boolean;
                  links?: Record<string, unknown>;
                  machine_rescope_receipts?: 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?:
                              | {
                                  content_url?: string
                                  | null;
                                  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;
                  project_id?: string | null;
                  sandbox?: string | null;
                  source_id?: string | null;
                  source_scope?: string | null;
                  source_type?: string | null;
                  stalled_since?: string | null;
                  status: string;
                  subtasks_count?: number;
                  tags?: string[];
                  target_binary?: string | null;
                  target_version?: string | null;
                  task_epic?: string | null;
                  team?: string | null;
                  thread?: string | null;
                  updated_at?: string;
                  user?: string | null;
              }[];
              has_more: boolean;
          },
      >

      Successful response

    • Delete a task Deletes a task from task lists and detail views. The task event stream is retained for auditability, while comments are removed and direct subtasks are promoted to top-level tasks. The delete event is accepted before the read model is updated. Clients should remove the task from local collections immediately; subsequent reads converge once the projection processes the event. Authenticated users may delete tasks they can access using their session identity. App-scoped developer and server-to-server callers must explicitly supply the task's org and owner. team or user identifies that owner; when neither is present, agent identifies an agent-owned task. With a team or user owner, agent identifies the acting principal. Each reference is validated before deletion.

      Parameters

      • task: string

        Task ID (tsk_...).

      Returns Promise<void>

      Empty response. HTTP 204 is returned after the delete event is accepted.

    • Retrieve a task Returns the full task object for the specified task ID. Authenticated users and agents resolve access through their session. App-scoped developer and server-to-server callers explicitly provide the owning team, user, or agent and org. Callers without access receive a 404.

      Parameters

      • task: string

        Task ID (tsk_...).

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

        Query parameters.

        • Optionalagent?: string

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

        • 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 requested task.

    • Submit a structured human answer Records authenticated human owner intent. The receipt does not grant infrastructure authority.

      Parameters

      • task: string

        Task ID.

      • input: {
            drop_acceptance?: string;
            drop_verification?: string[];
            evidence?: string;
            expected_version: number;
            outcome?: string;
            standing?: boolean;
            text?: string;
        }

        Request body.

        • Optionaldrop_acceptance?: string

          Exact unique acceptance item to defer for rescope_local.

        • Optionaldrop_verification?: string[]

          Exact associated verification items to defer. Entries identical to the acceptance item move automatically.

        • Optionalevidence?: string

          Evidence link or attachment reference.

        • expected_version: number

          Version of the question answered.

        • Optionaloutcome?: string

          evidence, access_granted, or rescope_local.

        • Optionalstanding?: boolean

          Apply this explicit instruction to matching future pauses.

        • Optionaltext?: string

          Optional answer or required access note.

      Returns Promise<Record<string, unknown>>

      Server-owned answer receipt.

    • Apply a recommended local rescope to an unanswered pause Applies the rescope_local recommendation the Factory recorded with a pause, once the server's own clock shows the question has gone unanswered for the minimum age (24 hours). This is a different operation from submitting a human answer: it takes the caller's existing Task edit authority, records a machine receipt in machine_rescope_receipts and never a human one, and cannot grant access, attach evidence, approve a sign-off or close the Task. Selections come from the stored recommendation, never from the request.

      Parameters

      • task: string

        Task ID.

      • input: { expected_version: number }

        Request body.

        • expected_version: number

          Version of the question observed.

      Returns Promise<Record<string, unknown>>

      Server-owned machine rescope receipt.

    • Convert ownership of a connected task graph Queues ownership changes for the connected task graph across parent, child, blocker, and blocking relationships. The request checks access to the root and returns a job receipt. The worker discovers and validates the graph, then saves the selected tasks and versions before any transfer. Changes before preparation can affect the selection; retries reuse it. Validation failures are job outcomes. Each transfer checks the requesting user’s current authority; conflicts fail the job without undoing completed transfers.

      Parameters

      • task: string

        Root task (tsk_...).

      • input: {
            dest_agent?: string;
            dest_org?: string;
            dest_team?: string;
            dest_user?: string;
        }

        Request body.

        • Optionaldest_agent?: string

          Destination agent (agi_...).

        • Optionaldest_org?: string

          Destination organization (org_...).

        • Optionaldest_team?: string

          Destination team (tem_...).

        • Optionaldest_user?: string

          Destination user (usr_...). Supply exactly one destination.

      Returns Promise<TaskOwnershipJob>

      The queued background job.

    • Update a task Updates the supplied fields on a task and returns the complete updated task. Authenticated users use their session identity. App-scoped developer and server-to-server callers must explicitly supply the task's org and owner. team or user identifies that owner; when neither is present, agent identifies an agent-owned task. With a team or user owner, agent identifies the acting principal. Every reference is validated before the update. A cooperating coding-session client may supply both lease_id and lease_session_id. The task aggregate fences that update against the live lease and records server-sourced session provenance. Omitting both remains a normal authorized human/API update. Supply expected_version from the latest task representation to make the update conditional. A concurrent write returns task_version_conflict.

      Parameters

      • task: string

        Task ID (tsk_...).

      • input: {
            admin_override?: boolean;
            agent?: string;
            description?: string;
            due_date?: string;
            epic?: string;
            epic_id?: string;
            expected_version?: number;
            lease_id?: string;
            lease_session_id?: string;
            links?: Record<string, unknown>;
            metadata?: Record<string, unknown>;
            name?: string;
            org?: string;
            override_lease?: boolean;
            owner_agent?: string;
            owner_user?: string;
            parent?: string;
            priority?: number;
            project_id?: string;
            require_status_lease?: boolean;
            source_id?: string;
            source_scope?: string;
            source_type?: string;
            status?: string;
            tags?: string[];
            target_binary?: string;
            target_version?: string;
            team?: string;
            user?: string;
        }

        Request body.

        • Optionaladmin_override?: boolean

          Human org admins may override and release a live task lease; recorded in task history.

        • Optionalagent?: string

          Explicit agent (agi_...). It is the owner when team and user are absent; otherwise it is the acting principal.

        • Optionaldescription?: string

          Updated long-form description.

        • Optionaldue_date?: string

          Updated due date in ISO 8601 format, or null to clear it.

        • Optionalepic?: string

          Replacement grouping label. Pass null to clear it.

        • Optionalepic_id?: string

          First-class Epic ID; null clears membership.

        • Optionalexpected_version?: number

          Aggregate version returned by the latest task read. The update fails with task_version_conflict if the task changed first.

        • Optionallease_id?: string

          Current caller-held lease UUID. Must be paired with lease_session_id.

        • Optionallease_session_id?: string

          Current coding-session UUID. Must be paired with lease_id.

        • Optionallinks?: Record<string, unknown>

          Replacement related-links object.

        • Optionalmetadata?: Record<string, unknown>

          Replacement task metadata object.

        • Optionalname?: string

          Updated display name for the task.

        • Optionalorg?: string

          Explicit organization (org_...) for a developer or server-to-server call. Pass null for an owner outside an organization.

        • Optionaloverride_lease?: boolean

          Explicit direct-human takeover: release the current lease and apply this update atomically.

        • Optionalowner_agent?: string

          Assign to an agent by public ID (agi_...).

        • Optionalowner_user?: string

          Assign to a user by public ID (usr_...).

        • Optionalparent?: string

          Move this task under a top-level parent (tsk_...), or pass null to promote it to a top-level task. A task that has subtasks cannot become one.

        • Optionalpriority?: number

          Updated priority from 0 (highest) to 4 (lowest).

        • Optionalproject_id?: string

          Project ID (prj_...). Omit to preserve; pass null to clear.

        • Optionalrequire_status_lease?: boolean

          Compatibility flag. All updates now require the live holder's lease identity or an explicitly authorized human takeover, regardless of this flag.

        • Optionalsource_id?: string

          Replacement source object identity. Must be supplied with the other source fields.

        • Optionalsource_scope?: string

          Replacement source container. Pass together with source_type and source_id, or pass all three as null to clear the source.

        • Optionalsource_type?: string

          Replacement source object kind. Must be supplied with the other source fields.

        • Optionalstatus?: string

          Updated status: open, in_progress, in_review, or done.

        • Optionaltags?: string[]

          Replacement tag list (max 20, each up to 40 characters; normalized to lowercase). Pass an empty array to clear all tags.

        • Optionaltarget_binary?: string

          Replacement target binary (for example my-cli): a lowercase identifier of 1-64 characters. Pass together with target_version, or pass both as null to clear the target.

        • Optionaltarget_version?: string

          Replacement minimum semantic version of target_binary (for example 0.48.9). Must be supplied with target_binary.

        • Optionalteam?: string

          Explicit owning team (tem_...) for a developer or server-to-server call.

        • Optionaluser?: string

          Explicit user (usr_...) for a developer or server-to-server call. With team, this identifies the acting team member.

      Returns Promise<Task>

      The updated task.

    • List a task's subtasks Returns a bounded page of the specified task's subtasks (tasks whose parent is this task), newest first. Subtasks nest exactly one level, so entries never have subtasks of their own. Privileged callers explicitly provide the owning team, user, or agent and org.

      Parameters

      • task: string

        Parent 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 subtasks 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;
                  blockers?: string[];
                  closed_at?: string | null;
                  comments_count?: number;
                  created_at?: string;
                  created_by_actor?:
                      | {
                          alias?: string
                          | null;
                          id?: string | null;
                          name?: string | null;
                          profile_picture?:
                              | {
                                  content_url?: string
                                  | null;
                                  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;
                  human_answer_receipts?: Record<string, unknown>;
                  id: string;
                  is_blocked?: boolean;
                  is_stalled?: boolean;
                  links?: Record<string, unknown>;
                  machine_rescope_receipts?: 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?:
                              | {
                                  content_url?: string
                                  | null;
                                  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;
                  project_id?: string | null;
                  sandbox?: string | null;
                  source_id?: string | null;
                  source_scope?: string | null;
                  source_type?: string | null;
                  stalled_since?: string | null;
                  status: string;
                  subtasks_count?: number;
                  tags?: string[];
                  target_binary?: string | null;
                  target_version?: string | null;
                  task_epic?: string | null;
                  team?: string | null;
                  thread?: string | null;
                  updated_at?: string;
                  user?: string | null;
              }[];
              has_more: boolean;
          },
      >

      Successful response

    • Transfer one task to a different owner Changes one task’s privacy owner at the supplied aggregate version. Assignment, creator, source identity, comments, and relationship IDs remain unchanged. Source and destination must have the same app and sandbox; the authenticated user must have authority over both scopes.

      Parameters

      • task: string

        Task (tsk_...).

      • input: {
            dest_agent?: string;
            dest_org?: string;
            dest_team?: string;
            dest_user?: string;
            expected_version: number;
        }

        Request body.

        • Optionaldest_agent?: string

          Destination agent (agi_...).

        • Optionaldest_org?: string

          Destination organization (org_...).

        • Optionaldest_team?: string

          Destination team (tem_...).

        • Optionaldest_user?: string

          Destination user (usr_...). Supply exactly one destination.

        • expected_version: number

          The task version reviewed by the caller.

      Returns Promise<Task>

      The task with its new owner.