<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.secondtruth-labs.com/index.php?action=history&amp;feed=atom&amp;title=Common_Text-based_Response_Protocol</id>
	<title>Common Text-based Response Protocol - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.secondtruth-labs.com/index.php?action=history&amp;feed=atom&amp;title=Common_Text-based_Response_Protocol"/>
	<link rel="alternate" type="text/html" href="http://wiki.secondtruth-labs.com/index.php?title=Common_Text-based_Response_Protocol&amp;action=history"/>
	<updated>2026-07-31T05:08:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>http://wiki.secondtruth-labs.com/index.php?title=Common_Text-based_Response_Protocol&amp;diff=2&amp;oldid=prev</id>
		<title>imported&gt;Import at 16:36, 31 December 2025</title>
		<link rel="alternate" type="text/html" href="http://wiki.secondtruth-labs.com/index.php?title=Common_Text-based_Response_Protocol&amp;diff=2&amp;oldid=prev"/>
		<updated>2025-12-31T16:36:32Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Infobox protocol&lt;br /&gt;
| name            = Common Text-based Response Protocol&lt;br /&gt;
| developer       = [[secondtruthLabs]]&lt;br /&gt;
| status          = Stable&lt;br /&gt;
| first_published = 2025&lt;br /&gt;
| latest_version  = 1.0&lt;br /&gt;
| transport       = [[wp:Transmission Control Protocol|TCP]]&lt;br /&gt;
| encoding        = [[wp:UTF-8|UTF-8]]&lt;br /&gt;
| license         = [[wp:Public domain|Public Domain]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Common Text-based Response Protocol&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;CTRP&amp;#039;&amp;#039;&amp;#039;) is a foundation protocol for building lightweight, text-based application protocols over [[wp:Transmission Control Protocol|TCP]]. Developed by [[secondtruthLabs]], it defines common conventions for simple request-response communication patterns.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
CTRP serves as a base layer upon which application-specific protocols can be built. Rather than defining a complete application protocol itself, CTRP establishes conventions for message formatting, status codes, and connection handling that derived protocols inherit and extend.&lt;br /&gt;
&lt;br /&gt;
=== Design philosophy ===&lt;br /&gt;
&lt;br /&gt;
CTRP follows a minimalist approach inspired by classic internet protocols like [[wp:Finger protocol|Finger]] and [[wp:Gopher (protocol)|Gopher]]. Key principles include:&lt;br /&gt;
&lt;br /&gt;
* Simple enough to implement in a weekend&lt;br /&gt;
* Consistent patterns across derived protocols&lt;br /&gt;
* Optimized for text content delivery&lt;br /&gt;
* Minimal overhead&lt;br /&gt;
&lt;br /&gt;
== Technical specification ==&lt;br /&gt;
&lt;br /&gt;
=== Request format ===&lt;br /&gt;
&lt;br /&gt;
Requests consist of a single line terminated by [[wp:CRLF|CRLF]] (&amp;lt;code&amp;gt;\r\n&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
{{Code example&lt;br /&gt;
| language = text&lt;br /&gt;
| caption  = Basic request format&lt;br /&gt;
| code     = COMMAND [arguments]\r\n&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The maximum request line length is 1024 bytes.&lt;br /&gt;
&lt;br /&gt;
=== Response format ===&lt;br /&gt;
&lt;br /&gt;
Responses begin with a status line, followed by optional content:&lt;br /&gt;
&lt;br /&gt;
{{Code example&lt;br /&gt;
| language = text&lt;br /&gt;
| caption  = Response format&lt;br /&gt;
| code     = &amp;lt;status_code&amp;gt; &amp;lt;status_message&amp;gt;\r\n&lt;br /&gt;
[content lines]\r\n&lt;br /&gt;
.\r\n&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Content is terminated by a line containing only a period (&amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Status codes ===&lt;br /&gt;
&lt;br /&gt;
CTRP uses a hierarchical status code system:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Range !! Category !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1x || Informational || Request received, continuing process&lt;br /&gt;
|-&lt;br /&gt;
| 2x || Success || Request successfully processed&lt;br /&gt;
|-&lt;br /&gt;
| 3x || Redirection || Further action needed&lt;br /&gt;
|-&lt;br /&gt;
| 4x || Client Error || Request contains bad syntax or cannot be fulfilled&lt;br /&gt;
|-&lt;br /&gt;
| 5x || Server Error || Server failed to fulfill valid request&lt;br /&gt;
|-&lt;br /&gt;
| 6x || Service Error || Service-level issues&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Common status codes:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Code !! Message !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 20 || OK || Success&lt;br /&gt;
|-&lt;br /&gt;
| 21 || OK+MORE || Success, more content available&lt;br /&gt;
|-&lt;br /&gt;
| 40 || BAD REQUEST || Malformed request&lt;br /&gt;
|-&lt;br /&gt;
| 41 || NOT FOUND || Requested resource not found&lt;br /&gt;
|-&lt;br /&gt;
| 42 || FORBIDDEN || Access denied&lt;br /&gt;
|-&lt;br /&gt;
| 50 || ERROR || General server error&lt;br /&gt;
|-&lt;br /&gt;
| 51 || NOT IMPLEMENTED || Command not supported&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Encoding ===&lt;br /&gt;
&lt;br /&gt;
All CTRP communication uses UTF-8 encoding with CRLF line endings. This ensures consistent handling across platforms while supporting international character sets.&lt;br /&gt;
&lt;br /&gt;
=== Transport security ===&lt;br /&gt;
&lt;br /&gt;
CTRP supports optional [[wp:Transport Layer Security|TLS]] encryption. Implementations typically offer both plain TCP and TLS-secured connections on separate ports.&lt;br /&gt;
&lt;br /&gt;
== Derived protocols ==&lt;br /&gt;
&lt;br /&gt;
The following protocols are built on CTRP:&lt;br /&gt;
&lt;br /&gt;
* [[AgentFinger]] – AI agent discovery and information&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[AgentFinger]]&lt;br /&gt;
* [[Trivial Service Discovery Protocol]]&lt;br /&gt;
* [[wp:Finger protocol]]&lt;br /&gt;
* [[wp:Gopher (protocol)]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/secondtruth/ctrp CTRP Specification Repository]&lt;br /&gt;
&lt;br /&gt;
[[Category:Communication Protocols]]&lt;br /&gt;
[[Category:Request-Response Protocols]]&lt;br /&gt;
[[Category:Foundation Protocols]]&lt;br /&gt;
{{stLabs protocol}}&lt;/div&gt;</summary>
		<author><name>imported&gt;Import</name></author>
	</entry>
</feed>