Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

7.1 KB
Raw Blame
schemas:
  AgentMessageCommitMultipart:
    type: object
    additionalProperties: false
    required: [metadata]
    properties:
      metadata:
        type: string
        contentMediaType: application/json
        contentSchema: { $ref: "#/schemas/AgentMessageCommitMetadata" }
        description: >-
          Strict AgentMessageCommitMetadata JSON, at most 5 MiB, sent before file parts.
          Uploads identify immutable file parts by upload_id; file part filename is that ID.
          Local filesystem paths and binary/base64 data do not belong in metadata. Like every
          Agent command, it carries no execution fields: the CLI names its Local Run in the
          X-TeamHub-Run-Id header, which TeamHub records on the Message only for a running Run
          of the same Tenant and Agent whose status shows in the target's collaboration Room.
      file:
        type: array
        items: { type: string, format: binary }
        description: Repeated opaque upload_id file parts, at most 50 MiB each and 512 MiB combined.
  AgentMessageCommitMetadata:
    type: object
    additionalProperties: false
    required: [invocation_id, inbox_id, segments, uploads]
    properties:
      invocation_id:
        { type: string, pattern: "^agent-invocation-sha256:[a-f0-9]{64}$" }
      inbox_id: { type: string, minLength: 1, maxLength: 256 }
      source_message_id: { type: string, minLength: 1, maxLength: 64 }
      continues:
        type: boolean
        description: >-
          The Agent declares that more work in the same turn follows this message.
          Recorded on the linked presentation.output_created event and part of the idempotent request identity; omitted means false.
      card_title:
        type: string
        minLength: 1
        maxLength: 120
        description: >-
          Presents the Message as a light card with this title (teamhub message card): a finished
          background Task's result or something the user should notice. One line without surrounding
          whitespace; part of the idempotent request identity.
      card_kind:
        type: string
        enum: [profile]
        description: >-
          What the light card is (teamhub message card --kind). Valid only with card_title; profile marks
          the delivery of the Human's Personal Profile. Part of the idempotent request identity.
      segments:
        type: array
        minItems: 1
        maxItems: 1000
        items: { $ref: "#/schemas/AgentMessagePreparedSegment" }
      uploads:
        type: array
        maxItems: 1000
        items:
          type: object
          additionalProperties: false
          required:
            [
              upload_id,
              filename,
              representation_format,
              media_type,
              size_bytes,
              sha256,
            ]
          properties:
            upload_id: { type: string, pattern: "^upload_[0-9]+$" }
            filename: { type: string, minLength: 1, maxLength: 255 }
            representation_format:
              { type: string, minLength: 1, maxLength: 120 }
            media_type: { type: string, minLength: 1, maxLength: 255 }
            size_bytes: { type: integer, minimum: 0, maximum: 52428800 }
            sha256: { type: string, pattern: "^[a-f0-9]{64}$" }
  AgentMessagePreparedSegment:
    type: object
    additionalProperties: false
    required: [type]
    description: >-
      Prepared four-branch intent. text requires content; reference requires content/target/target_type.
      document requires either document_id/content with optional presentation, upload_id with optional
      content/mode, or mode=tree with root_name/entries. Images and videos are ordinary documents.
      fragment requires exactly one content or upload_id, plus title: one plain line of at most
      120 characters that previews and quotes show in place of the fragment.
      The server revalidates exact branch properties before any publication.
    properties:
      type: { type: string, enum: [text, reference, document, fragment] }
      content: { type: string }
      title: { type: string, minLength: 1, maxLength: 120 }
      target: { type: string }
      target_type: { type: string, enum: [user, agent] }
      document_id: { type: string }
      presentation: { type: string, enum: [inline, card, canvas] }
      upload_id: { type: string }
      mode: { type: string, enum: [document, file, tree] }
      root_name: { type: string }
      entries:
        type: array
        maxItems: 10000
        items:
          type: object
          additionalProperties: false
          required: [kind, relative_path]
          properties:
            kind: { type: string, enum: [file, directory] }
            relative_path: { type: string }
            upload_id: { type: string }
  AgentMessageResource:
    oneOf:
      - $ref: "#/schemas/AgentMessageDocumentResource"
      - $ref: "#/schemas/AgentMessageTreeResource"
  AgentMessageDocumentResource:
    type: object
    additionalProperties: false
    required: [kind, segment_index, status, document_id, name]
    properties:
      kind: { type: string, const: document }
      segment_index: { type: integer, minimum: 0 }
      status: { type: string, enum: [published, reused] }
      document_id: { type: string }
      version_id: { type: string }
      revision_id: { type: string }
      name: { type: string, minLength: 1 }
  AgentMessageTreeResource:
    type: object
    additionalProperties: false
    required:
      [
        kind,
        segment_index,
        status,
        publication_group_id,
        root_placement_path,
        file_count,
        directory_count,
        total_bytes,
        documents,
      ]
    properties:
      kind: { type: string, const: tree }
      segment_index: { type: integer, minimum: 0 }
      status: { type: string, enum: [published, reused] }
      publication_group_id: { type: string }
      root_placement_path: { type: string, minLength: 1 }
      file_count: { type: integer, minimum: 0 }
      directory_count: { type: integer, minimum: 0 }
      total_bytes: { type: integer, minimum: 0 }
      documents:
        type: array
        items:
          type: object
          additionalProperties: false
          required: [relative_path, document_id, document_version_id]
          properties:
            relative_path: { type: string }
            document_id: { type: string }
            document_version_id: { type: string }
      entry_document_id: { type: string }
      entry_document_version_id: { type: string }
  AgentMessageCommitResponse:
    type: object
    additionalProperties: false
    required:
      [accepted, target, inbox_id, message_id, resources, duplicate_request]
    properties:
      accepted: { type: boolean, const: true }
      target:
        type: object
        additionalProperties: false
        required: [type, id]
        properties:
          type: { type: string, enum: [room, thread, task] }
          id: { type: string }
      inbox_id: { type: string }
      message_id: { type: string }
      resources:
        { type: array, items: { $ref: "#/schemas/AgentMessageResource" } }
      duplicate_request: { type: boolean }
      reason: { type: string, minLength: 1 }