@archastro/sdk
    Preparing search index...
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Add an external link to a task Adds an indexed identity without changing the referenced object's ownership or ACL. For private files, upload with POST /api/v1/files, then pass external_scope=platform, object_type=file and object_id=fil_.... The reserved platform namespace means the authenticated current backend/app/sandbox, not a hostname or stored URL. File attachment requires both task mutation permission and current file read access. List and reverse lookup omit files that are missing or no longer readable, including thread-restricted files. Generic identities are not resolved as local files. GET /api/v1/files/:file rechecks permission and returns a fresh expiring download URL; never persist that URL as the link identity. Existing signed URLs remain usable until their expiry. Task activity and replay may retain opaque file IDs, not file metadata, and confer no file access. Retain the upload response's file ID if attachment fails and retry the link request. Detaching or deleting a task does not delete the file. Deleting a file leaves historical link events intact; replay does not restore bytes or access. No ACL grant is implicit. Agent-owned uploads use an authorized human session; agent-only file credentials remain unsupported. Download URLs depend on the configured storage provider. The development local provider returns a local URL prefix plus a storage path, but Platform does not serve that path over HTTP. Local-provider verification reads bytes from the running Platform's configured storage directory after authorized metadata reads; it does not prove HTTP download authorization. Serving local downloads through an authorization-preserving route is a separate follow-up, not a public /storage mount. Served providers are verified through their HTTP download URLs.

      Parameters

      • task: string

        Task ID (tsk_...).

      • input: { external_scope: string; object_id: string; object_type: string }

        Request body.

        • external_scope: string

          External container ID.

        • object_id: string

          External object ID.

        • object_type: string

          External object type.

      Returns Promise<TaskExternalLink>

      The created external link, with its identity normalized.

    • List a task's external links Returns indexed link identities ordered by external_scope, object_type, then object_id ascending. This does not read the legacy Task links map.

      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 for privileged calls.

        • Optionallimit?: number

          Maximum links to return. Capped at 100.

        • Optionalorg?: string

          Explicit organization for privileged calls; must agree with owner.

        • Optionalteam?: string

          Explicit owning team for privileged calls.

        • Optionaluser?: string

          Explicit owning user for privileged calls.

      Returns Promise<
          {
              after_cursor?: string;
              before_cursor?: string;
              data: { external_scope: string; object_id: string; object_type: string }[];
              has_more: boolean;
          },
      >

      Successful response