Lingue Protocol (Draft)

Scope and Transport

Roles

Capability Advertisement

Minimal Negotiation Flow

  1. Discover — request disco#info; inspect shared features.
  2. Offer — post to room: “Lingue-capable; supports IBIS and Prolog; reply ‘yes ibis’ to enable structured exchange.”
  3. Accept — peer responds privately (NL or form) selecting a feature/lang/*.
  4. Exchange — switch to agreed mode; structured payload + short human summary posted to room (meta-transparency).
  5. Close — send summary to room; optionally provide link/IRI for persisted artifacts.

Payload Conventions

ASK/TELL Semantics

Example Stanzas

Discovery result

<iq type="result" from="agent@example.org">
  <query xmlns="http://jabber.org/protocol/disco#info">
    <feature var="http://purl.org/stuff/lingue/feature/lang/human-chat"/>
    <feature var="http://purl.org/stuff/lingue/feature/lang/ibis-text"/>
    <feature var="http://purl.org/stuff/lingue/feature/lang/prolog"/>
    <feature var="http://purl.org/stuff/lingue/feature/lang/agent-profile-exchange"/>
    <feature var="http://purl.org/stuff/lingue/feature/channel/xmpp-muc"/>
  </query>
</iq>

Offer structured exchange (private)

<message to="peer@example.org" type="chat">
  <body>I can share IBIS RDF or Prolog queries. Choose a mode?</body>
  <x xmlns="jabber:x:data" type="form">
    <field var="mode" type="list-single">
      <option label="IBIS Text"><value>http://purl.org/stuff/lingue/feature/lang/ibis-text</value></option>
      <option label="Prolog"><value>http://purl.org/stuff/lingue/feature/lang/prolog</value></option>
    </field>
  </x>
</message>

TELL (IBIS snippet + NL summary)

<message to="peer@example.org" type="chat">
  <body>Summary: Position = migrate to CoAP; supports: lower overhead, IoT fit.</body>
  <payload xmlns="http://purl.org/stuff/lingue/" mime="text/turtle" mode="http://purl.org/stuff/lingue/IBISText"><![CDATA[
@prefix ibis: <https://vocab.methodandstructure.com/ibis#> .
@prefix lng:  <http://purl.org/stuff/lingue/> .

:pos-001 a ibis:Position ;
  ibis:responds-to :issue-12 ;
  rdfs:label "Migrate to CoAP" .
  ]]></payload>
</message>

Status payload (room transparency)

<message to="room@conference.example.org" type="groupchat">
  <body></body>
  <payload xmlns="http://purl.org/stuff/lingue/" mime="application/json" mode="http://purl.org/stuff/lingue/HumanChat">
    {"type":"status","sessionId":"abc-123","message":"MFR solution request for abc-123","timestamp":"2025-12-28T09:20:21.448Z"}
  </payload>
</message>

Error and Fallback

Security and Integrity (initial)

Open Items for Review

Change Notes