Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

6.3 KB
Raw Blame
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "model-hub/source-create.schema.json",
  "title": "SourceCreate",
  "description": "API-key Source creation input. The default path requires authenticated observation and a protocol established by a shipped catalog pin, a declaration on custom, or matching response proof; on the first two, authentication may instead come from that protocol's credential-gated model listing, which then supplies the inventory in the same request. A default-path create that authenticated is not pending verification. Explicit save_unverified consent instead persists configuration with verification pending, without observation, attempts best-effort inventory discovery, and requires a catalog pin or a concrete custom declaration. The server owns Source identity, discovered inventory, health, usage, custody metadata and timestamps. Both paths use canonical validation and the same custody, rollback and reconciliation lifecycle. When client_nonce is present, the server reserves it atomically in process before observation or credential work; only a successful commit persists Source.client_nonce unchanged. A lost-response client reconciles through the ordinary Source list without a receipt or separate endpoint. Nonce uniqueness covers live-process reservations and live Sources; process restart or Source deletion releases it, and a later same-nonce request after the required list read is a fresh create.",
  "type": "object",
  "required": ["vendor", "key"],
  "additionalProperties": false,
  "allOf": [
    {
      "if": { "required": ["protocol"], "properties": { "protocol": { "const": "search" } } },
      "then": {
        "required": ["vendor", "key", "protocol"],
        "properties": {
          "vendor": { "enum": ["tavily", "exa"] },
          "base_url": { "type": "null" },
          "protocol": { "const": "search" },
          "save_unverified": { "const": false },
          "accept_unavailable_inventory": { "const": false }
        }
      }
    },
    {
      "if": { "required": ["protocol"], "properties": { "protocol": { "const": "google" } } },
      "then": { "properties": { "vendor": { "enum": ["custom", "gemini"] } } }
    },
    {
      "if": {
        "required": ["vendor"],
        "properties": { "vendor": { "enum": ["tavily", "exa"] } }
      },
      "then": {
        "properties": {
          "vendor": { "enum": ["tavily", "exa"] },
          "base_url": { "type": "null" },
          "protocol": { "const": "search" },
          "save_unverified": { "const": false },
          "accept_unavailable_inventory": { "const": false }
        }
      }
    }
  ],
  "properties": {
    "save_unverified": {
      "type": "boolean",
      "default": false,
      "description": "Save configuration independently of observation. The default UI uses true. Requires a catalog-pinned or explicitly declared protocol; custom Auto cannot be guessed. Attempts bounded inventory discovery with the provisioned credential, but failed or invalid inventory never blocks saving or erases manual entries. Canonical input validation, credential custody, rollback and nonce reconciliation are unchanged. Sets Source.verification_pending and does not claim usability."
    },
    "vendor": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:[._-][a-z0-9]+)*$",
      "description": "Vendor id used for catalog ownership and optional observation."
    },
    "display_name": {
      "type": "string",
      "maxLength": 64,
      "description": "Optional user-facing name. Omission uses the server's canonical locale-neutral vendor label."
    },
    "base_url": {
      "type": ["string", "null"],
      "description": "null selects the vendor's official endpoint; a custom value selects a relay or self-hosted endpoint."
    },
    "key": {
      "type": "string",
      "minLength": 1,
      "writeOnly": true,
      "description": "Transient plaintext credential. It is never returned or persisted in Source state."
    },
    "protocol": {
      "enum": ["anthropic", "openai_responses", "openai_chat", "google", "search"],
      "description": "Optional user-selected interface. When present, observation probes exactly this protocol. Omission selects the shipped vendor pin when one exists; otherwise custom Auto requires matching response proof. Explicit unverified saving requires a catalog pin or a concrete custom declaration and never guesses a protocol."
    },
    "client_nonce": {
      "type": "string",
      "pattern": "^scn_[a-z0-9]{16,64}$",
      "description": "Optional client-generated create correlation held before submission. The server atomically reserves it in process before observation or credential work and writes Source.client_nonce only on successful commit; no durable pre-create claim record exists. A lost-response client reads Sources before retrying. A same-nonce retry receives an in-progress conflict, atomically reclaims a released slot as a fresh create, or receives a committed conflict and reconciles by finding that nonce in the ordinary Source list. Uniqueness applies only while a live-process reservation or live Source exists; process restart and Source deletion release it. It is not Source identity, credential material, or a routing input."
    },
    "accept_unavailable_inventory": {
      "type": "boolean",
      "default": false,
      "description": "Optional explicit consent to commit only when the server's repeated observation establishes a protocol owner but inventory discovery fails. Omission or false rejects that cell with discovery_failed; true permits a Source with models: []. The flag never supplies observation evidence, has no effect on a successful discovery, and cannot bypass reachability, authentication, or protocol establishment."
    }
  },
  "examples": [
    {
      "vendor": "custom",
      "display_name": "relay.example",
      "base_url": "https://relay.example/v1",
      "key": "<transient plaintext key>",
      "protocol": "openai_chat",
      "client_nonce": "scn_01j5w8z7p4n6q2rt"
    },
    {
      "vendor": "custom",
      "base_url": "https://relay.example/v1",
      "key": "<transient plaintext key>",
      "protocol": "openai_chat",
      "accept_unavailable_inventory": true
    },
    {
      "vendor": "custom",
      "base_url": "https://relay.example/v1",
      "key": "<transient plaintext key>",
      "protocol": "openai_chat",
      "save_unverified": true
    }
  ]
}