@archastro/sdk
    Preparing search index...
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Clone a system config Creates a copy of a system (template) config and transfers ownership to a team or user. All dependencies bundled with the source config are cloned alongside it. Responds with HTTP 201 and the newly created config on success. You must specify exactly one destination owner via team or user. Callers authenticated as an app (developer portal) may omit the owner — the clone is then scoped to the system owner automatically. Use virtual_path and lookup_key to override the corresponding fields on the clone; omitting them carries the values from the source.

      Parameters

      • system: string

        Identifier of the source system config — either its virtual_path or its lookup_key.

      • input: {
            lookup_key?: string;
            org?: string;
            team?: string;
            user?: string;
            virtual_path?: string;
        }

        Request body.

        • Optionallookup_key?: string

          Override the lookup_key on the cloned config. When omitted, the source value is used.

        • Optionalorg?: string

          Organization ID (org_...) to scope the clone to. When set, must match the authenticated viewer's org.

        • Optionalteam?: string

          Team ID (tea_...) that will own the cloned config. Required unless user is provided or the caller is app-scoped.

        • Optionaluser?: string

          User ID (usr_...) that will own the cloned config. Required unless team is provided or the caller is app-scoped.

        • Optionalvirtual_path?: string

          Override the virtual_path on the cloned config. When omitted, the source value is used.

      Returns Promise<Config>

      The newly created config, including all cloned fields and its assigned ID.

    • Retrieve system config facets Returns the distinct kind values and leading virtual_path prefixes present in the system (template) config manifest, each accompanied by a count of matching configs. Use this data to populate filter UIs or to determine which config kinds are available before listing or cloning. The response reflects the filesystem-backed template manifest and does not include user- or team-owned configs.

      Returns Promise<ConfigFacets>

      Aggregated facet data containing distinct config kinds and path prefixes, each with a count of matching system configs.

    • Retrieve a system config Returns a single system (template) config identified by its virtual_path or lookup_key. The system parameter value is URL-decoded before lookup, so path segments with special characters may be passed URL-encoded. System configs are filesystem-backed templates and are readable by any authenticated caller regardless of team or user ownership. Returns 404 when no system config matches the given identifier.

      Parameters

      • system: string

        Identifier of the system config to retrieve — either its virtual_path or its lookup_key. May be URL-encoded.

      Returns Promise<Config>

      The requested system config, including its current version and all metadata fields.

    • List system configs Returns a paginated list of system (template) configs from the filesystem-backed manifest. Results are always ordered by virtual_path ascending. Filter by one or more config kinds using kind (single value) or kinds (array). Both filters may be supplied together for backward compatibility; kinds takes precedence when both are present. Exclude specific path namespaces with excluded_path_prefixes. Use page and page_size to paginate. Page size is clamped to a maximum of 200; requests exceeding this limit are silently clamped rather than rejected.

      Parameters

      • Optionalparams: {
            excludedPathPrefixes?: string[];
            kind?: string;
            kinds?: string[];
            page?: number;
            pageSize?: number;
        }

        Query parameters.

        • OptionalexcludedPathPrefixes?: string[]

          Exclude configs whose virtual_path starts with any of the listed string prefixes.

        • Optionalkind?: string

          Filter results to a single config kind, e.g. "Agent" or "APITool". Use kinds to filter by multiple kinds at once.

        • Optionalkinds?: string[]

          Filter results to configs whose kind is in this list. When both kind and kinds are provided, kinds takes precedence.

        • Optionalpage?: number

          Page number to retrieve, 1-indexed. Defaults to 1.

        • OptionalpageSize?: number

          Number of results per page. Defaults to 50; maximum is 200. Values above the maximum are clamped to 200.

      Returns Promise<
          {
              data: {
                  agent?: string;
                  created_at?: string;
                  current_version?: {
                      change_description?: string;
                      content_hash?: string;
                      created_at?: string;
                      data?: Record<string, unknown>;
                      id: string;
                      org?: string;
                      sandbox?: string;
                      version_number: number;
                  };
                  id: string;
                  is_archived?: boolean;
                  kind: string;
                  lookup_key?: string;
                  mime_type?: string;
                  org?: string;
                  parent?: string;
                  parent_solution?: string;
                  raw_content?: string;
                  relative_path?: string;
                  sandbox?: string;
                  team?: string;
                  updated_at?: string;
                  user?: string;
                  virtual_path?: string;
              }[];
              has_next: boolean;
              has_prev: boolean;
              page: number;
              page_size: number;
              total_entries: number;
              total_pages: number;
          },
      >

      Successful response