Loading files
442335385This file is pinned to the selected release. Download the original to open it in your design tool.
Files from this revision, including CAD and LFS contents. Git history is not included.
Or in GitHub Desktop, choose File → Clone repository → URL and paste this address.
Public repositories can be cloned without signing in. For pushing, use your ThingAtlas username and a Git access token as the password.
git lfs install git clone https://thingatlas.com/git/-unclaimed/openharness-1322671404.git
Includes Git history, branches, and Git LFS files. Clones the repository’s default branch, regardless of the version shown here.
/**
* The agent list, and where the credential goes.
*
* There is nothing to discover: one URL, one credential header, eight methods. `agent.list` IS how a
* client learns what this provider offers, and because it is authenticated, two credentials can
* legitimately see two different lists — which is exactly why the list was never something a public
* document could carry.
*
* Read from `config` on every call rather than snapshotted, so an agent created a moment ago is
* addressable by its very next `agent.send`.
*/
import type { Config } from './config.js'
import type { Agent } from './types.js'
export const CREDENTIAL_HEADER = 'authorization'
/** The agent list, from configuration, scoped to the tenant the credential selects. */
export const agentsOf = (config: Config): Agent[] =>
config.agents.map((a) => ({ id: a.id, name: a.name, ...(a.description ? { description: a.description } : {}) }))
442335385This file is pinned to the selected release. Download the original to open it in your design tool.