Else python default http code will try interpret it has a
malformed http request line and give failure lines like
* bad version number
* bad http/0.9 request
etal along with a long bytes string following it
Had forgotten to update docs wrt renamed --op.configFile arg
Remove the unneeded space from details.md, which was triggering
the editorconfig check at upstream github repo.
Given toolcall.py maintains ToolCall, ToolManager and MCP related
types and base classes, so rename to toolcalls.py
Also add the bash script with curl used for testing the tools/list
mcp command.
Remove the sample function meta ref, as tools/list is working ok.
By default bearer based auth check is done always whether in https
or http mode. However by updating the sec.bAuthAlways config entry
to false, the bearer auth check will be carried out only in https
mode.
Build the list of tool calls
Trap some of the MCP post json based requests and map to related
handlers. Inturn implement the tool call execution handler.
Add some helper dataclasses wrt expected MCP response structure
TOTHINK: For now maintain id has a string and not int, with idea
to map it directly to callid wrt tool call handshake by ai model.
TOCHECK: For now suffle the order of fields wrt jsonrpc and type
wrt MCP response related structures, assuming the order shouldnt
matter. Need to cross check.
Minimal skeleton to allow dict [] style access to dataclass based
class's attributes/fields. Also get member function similar to dict.
This simplifies the flow and avoids duplicating data between
attribute and dict data related name and data spaces.
Add a helper base class to try map data class's attributes into
underlying dict.
TODO: this potentially duplicates data in both normal attribute
space as well as dict items space. And will require additional
standard helper logics to be overridden to ensure sync between
both space etal. Rather given distance from python internals for
a long time now, on pausing and thinking a bit, better to move
into a simpler arch where attributes are directly worked on for
dict [] style access.
Instead of maintaining the config and some of the runtime states
identified as gMe as a generic literal dictionary which grows at
runtime with fields as required, try create it as a class of classes.
Inturn use dataclass annotation to let biolerplate code get auto
generated.
A config module created with above, however remaining part of the
code not yet updated to work with this new structure.
process_args and load_config moved into the new Config class.