| 1 | /* | ||
| 2 | * MCP.xs - root XS file | ||
| 3 | * | ||
| 4 | * Thin wrapper: the perl headers, then the C implementation headers from | ||
| 5 | * include/pmcp/ in dependency order, then the per-module XS fragments from | ||
| 6 | * xs/ via INCLUDE: (the Punk / Punk-Feed layout). | ||
| 7 | */ | ||
| 8 | |||
| 9 | #define PERL_NO_GET_CONTEXT | ||
| 10 | #include "EXTERN.h" | ||
| 11 | #include "perl.h" | ||
| 12 | #include "XSUB.h" | ||
| 13 | |||
| 14 | /* The two providers' public ABI headers, reached through ExtUtils::Depends | ||
| 15 | * (or the sibling checkouts), never copied. */ | ||
| 16 | #include "frj_abi.h" | ||
| 17 | #include "jsf_abi.h" | ||
| 18 | |||
| 19 | /* The implementation headers, in dependency order. Each states its contract at | ||
| 20 | * the top and names what must precede it. */ | ||
| 21 | |||
| 22 | #include "pmcp/pmcp.h" /* the dist's name, for every message */ | ||
| 23 | #include "pmcp/pmcp_compat.h" /* what the 5.10 floor costs */ | ||
| 24 | #include "pmcp/pmcp_clos.h" /* closures, every call into Perl */ | ||
| 25 | #include "pmcp/pmcp_abi.h" /* the frj and jsf tables, resolved at BOOT */ | ||
| 26 | #include "pmcp/pmcp_rand.h" /* random bytes, session ids */ | ||
| 27 | #include "pmcp/pmcp_rpc.h" /* JSON-RPC: decode, classify, the envelope */ | ||
| 28 | #include "pmcp/pmcp_proto.h" /* versions, initialize, the dispatcher */ | ||
| 29 | #include "pmcp/pmcp_otel.h" /* a span per request, under OpenTelemetry */ | ||
| 30 | #include "pmcp/pmcp_reg.h" /* options, install_kw, on_compile */ | ||
| 31 | #include "pmcp/pmcp_decl.h" /* tool declarations, frozen */ | ||
| 32 | #include "pmcp/pmcp_page.h" /* cursors and pages */ | ||
| 33 | #include "pmcp/pmcp_call.h" /* tools/list, tools/call, the helpers */ | ||
| 34 | #include "pmcp/pmcp_uri.h" /* URI templates, base64 */ | ||
| 35 | #include "pmcp/pmcp_res.h" /* resources/list, templates, read */ | ||
| 36 | #include "pmcp/pmcp_prompt.h" /* prompts/list, prompts/get */ | ||
| 37 | #include "pmcp/pmcp_state.h" /* the keyword, the freeze, the guard check */ | ||
| 38 | #include "pmcp/pmcp_http.h" /* POST, the checks, the CORS probe */ | ||
| 39 | #include "pmcp/pmcp_sess.h" /* Mcp-Session-Id, the record, DELETE */ | ||
| 40 | #include "pmcp/pmcp_sse.h" /* SSE on POST, progress, logging, cancel */ | ||
| 41 | #include "pmcp/pmcp_bus.h" /* GET stream, subscriptions, the bus */ | ||
| 42 | #include "pmcp/pmcp_auth.h" /* auth, oauth, RFC 9728, principal */ | ||
| 43 | #include "pmcp/pmcp_oa.h" /* tools from an Open::API mount */ | ||
| 44 | #include "pmcp/pmcp_stdio.h" /* punk mcp: stdio, the command, doctor */ | ||
| 45 | |||
| 46 | /* Still to land: the live tests (14) and the gate (15) */ | ||
| 47 | |||
| 48 | MODULE = Punk::Plugin::MCP PACKAGE = Punk::Plugin::MCP | ||
| 49 | |||
| 50 | PROTOTYPES: DISABLE | ||
| 51 | |||
| 52 | BOOT: | ||
| 53 | 48 | pmcp_abi_boot(aTHX); | |
| 54 | 46 | pmcp_rpc_boot(aTHX); | |
| 55 | |||
| 56 | INCLUDE: xs/mcp.xs |