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.

4.3 KB
Raw Blame
status:
  post:
    operationId: getAgentComputerPermissions
    tags: [Agent Business API]
    security: [{ agentBearer: [] }]
    summary: Read the macOS privacy permissions of this Agent's Local Computer.
    description: >-
      The Computer comes from the Agent's placement. Reading also settles the
      owner's waiting computer_permission cards whose permissions are all
      granted.
    requestBody:
      required: false
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
    responses:
      "200":
        description: The Computer and its current permission state.
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required: [computer_id, permissions]
              properties:
                computer_id: { type: string }
                permissions:
                  $ref: "../components/computer-permissions.yaml#/components/schemas/ComputerPermissionStatus"
      "401":
        $ref: "../components/agent-api-errors.yaml#/components/responses/Unauthenticated"
      "403":
        $ref: "../components/agent-api-errors.yaml#/components/responses/Forbidden"
      "409":
        $ref: "../components/agent-api-errors.yaml#/components/responses/Conflict"
      "503":
        $ref: "../components/agent-api-errors.yaml#/components/responses/ServiceUnavailable"
      default:
        $ref: "../components/agent-api-errors.yaml#/components/responses/InternalError"
request:
  post:
    operationId: requestAgentComputerPermissions
    tags: [Agent Business API]
    security: [{ agentBearer: [] }]
    summary: Ask the owner of this Agent's Local Computer to grant macOS permissions through a chat card.
    description: >-
      When every requested permission is already granted, or the Computer is
      not a Mac, it returns ready. Otherwise it posts, or reuses for 30
      minutes, a computer_permission card that @mentions the Computer owner.
      The owner grants on that Mac; once everything is granted the card
      settles itself and wakes the Agent. Nothing is granted remotely.
    requestBody:
      required: true
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required: [subject, permissions]
            properties:
              subject:
                $ref: "../components/computer-permissions.yaml#/components/schemas/ComputerPermissionSubject"
              permissions:
                type: array
                minItems: 1
                maxItems: 2
                uniqueItems: true
                items:
                  $ref: "../components/computer-permissions.yaml#/components/schemas/ComputerPermissionId"
              reason:
                type: string
                minLength: 1
                maxLength: 200
                description: Plain text shown on the card.
    responses:
      "200":
        description: The permissions are granted, or the card that asks the owner for them.
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required: [status, computer_id, permissions]
              properties:
                status:
                  type: string
                  enum: [ready, permission_requested]
                computer_id: { type: string }
                permissions:
                  $ref: "../components/computer-permissions.yaml#/components/schemas/ComputerPermissionStatus"
                room_id: { type: string }
                message_id: { type: string }
                interaction_id: { type: string }
      "400":
        $ref: "../components/agent-api-errors.yaml#/components/responses/BadRequest"
      "401":
        $ref: "../components/agent-api-errors.yaml#/components/responses/Unauthenticated"
      "403":
        $ref: "../components/agent-api-errors.yaml#/components/responses/Forbidden"
      "409":
        $ref: "../components/agent-api-errors.yaml#/components/responses/Conflict"
      "503":
        $ref: "../components/agent-api-errors.yaml#/components/responses/ServiceUnavailable"
      default:
        $ref: "../components/agent-api-errors.yaml#/components/responses/InternalError"