@lssm/module.alpic 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +64 -0
- package/dist/alpic.feature.d.ts +1 -0
- package/dist/assets/paths.d.ts +2 -0
- package/dist/browser/index.js +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -0
- package/dist/mcp/alpic-mcp.test.d.ts +1 -0
- package/dist/mcp/create-alpic-mcp-app.d.ts +24 -0
- package/dist/mcp/resources.d.ts +9 -0
- package/dist/mcp/tools.d.ts +6 -0
- package/dist/node/index.js +1 -0
- package/package.json +146 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Chaman Ventures, SASU
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# @lssm/module.alpic
|
|
2
|
+
|
|
3
|
+
Website: https://contractspec.io
|
|
4
|
+
|
|
5
|
+
**Alpic MCP and ChatGPT App hosting helpers.**
|
|
6
|
+
|
|
7
|
+
## What It Provides
|
|
8
|
+
|
|
9
|
+
- **Layer**: module.
|
|
10
|
+
- **Consumers**: apps (alpic-mcp, chatgpt-app).
|
|
11
|
+
- `src/mcp/` contains MCP handlers, tools, prompts, and resources.
|
|
12
|
+
- Related ContractSpec packages include `@lssm/lib.contracts-spec`, `@lssm/lib.logger`, `@lssm/tool.bun`, `@lssm/tool.typescript`.
|
|
13
|
+
- `src/mcp/` contains MCP handlers, tools, prompts, and resources.
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
`npm install @lssm/module.alpic`
|
|
18
|
+
|
|
19
|
+
or
|
|
20
|
+
|
|
21
|
+
`bun add @lssm/module.alpic`
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
Import the root entrypoint from `@lssm/module.alpic`, or choose a documented subpath when you only need one part of the package surface.
|
|
26
|
+
|
|
27
|
+
## Architecture
|
|
28
|
+
|
|
29
|
+
- `src/assets` is part of the package's public or composition surface.
|
|
30
|
+
- `src/index.ts` is the root public barrel and package entrypoint.
|
|
31
|
+
- `src/mcp/` contains MCP handlers, tools, prompts, and resources.
|
|
32
|
+
|
|
33
|
+
## Public Entry Points
|
|
34
|
+
|
|
35
|
+
- Export `.` resolves through `./src/index.ts`.
|
|
36
|
+
|
|
37
|
+
## Local Commands
|
|
38
|
+
|
|
39
|
+
- `bun run dev` — contractspec-bun-build dev
|
|
40
|
+
- `bun run build` — contractspec-bun-build build
|
|
41
|
+
- `bun run lint` — bun lint:fix
|
|
42
|
+
- `bun run lint:check` — biome check .
|
|
43
|
+
- `bun run lint:fix` — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
|
|
44
|
+
- `bun run typecheck` — tsgo --noEmit
|
|
45
|
+
- `bun run publish:pkg` — bun publish --tolerate-republish --ignore-scripts --verbose
|
|
46
|
+
- `bun run publish:pkg:canary` — bun publish:pkg --tag canary
|
|
47
|
+
- `bun run clean` — rimraf dist .turbo
|
|
48
|
+
- `bun run build:bundle` — contractspec-bun-build transpile
|
|
49
|
+
- `bun run build:types` — contractspec-bun-build types
|
|
50
|
+
- `bun run prebuild` — contractspec-bun-build prebuild
|
|
51
|
+
|
|
52
|
+
## Recent Updates
|
|
53
|
+
|
|
54
|
+
- Replace eslint+prettier by biomejs to optimize speed.
|
|
55
|
+
- Standardize tool naming to underscore notation.
|
|
56
|
+
- Add changesets and apply pending fixes.
|
|
57
|
+
- Add first-class transport, auth, versioning, and BYOK support across all integrations.
|
|
58
|
+
- Test runner.
|
|
59
|
+
|
|
60
|
+
## Notes
|
|
61
|
+
|
|
62
|
+
- Depends on `@modelcontextprotocol/sdk` and `elysia` -- version bumps may break MCP protocol compatibility.
|
|
63
|
+
- Exposes external-facing endpoints; treat all inputs as untrusted.
|
|
64
|
+
- Changes affect MCP tool registration and ChatGPT plugin manifests.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AlpicFeature: import("@lssm/lib.contracts-spec").FeatureModuleSpec;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineFeature as x}from"@lssm/lib.contracts-spec/features";var q=x({meta:{key:"modules.alpic",version:"1.0.0",title:"Alpic",description:"Alpic MCP and ChatGPT App hosting helpers",domain:"alpic",owners:["@contractspec-core"],tags:["package","modules","alpic"],stability:"experimental"}});function y(e){let t=e.trim();if(!t)return"/assets";if(t.startsWith("/assets"))return t;if(t.startsWith("/"))return`/assets${t}`;return`/assets/${t}`}function d(e){return y(e)}function M(e){let t=y(e),r=process.env.ALPIC_HOST?.trim();if(!r)return t;return`https://${r}${t}`}import{randomUuid as U}from"@lssm/lib.crypto-utils";import{Logger as L,LogLevel as T}from"@lssm/lib.logger";import{McpServer as _}from"@modelcontextprotocol/sdk/server/mcp.js";import{WebStandardStreamableHTTPServerTransport as z}from"@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";import{Elysia as C}from"elysia";var R="alpic_ui",N="app://ui";function b(e,t={}){let r=t.assetPath??"index.html",n=d(r),s=M(r),u=t.resourceKey??R,c=t.resourceUri??N,m=t.title??"ChatGPT App UI",f=t.description??"Entry point for the ChatGPT App UI hosted on Alpic.";e.registerResource(u,c,{title:m,description:f,mimeType:"application/json"},async()=>({contents:[{uri:c,mimeType:"application/json",text:JSON.stringify({title:m,description:f,path:n,url:s},null,2)}]}))}import{sanitizeMcpName as k}from"@lssm/lib.contracts-spec/jsonschema";import*as g from"zod";var O="alpic_ping",P=g.object({message:g.string().optional()});function w(e,t={}){let r=k(t.name??O),n=t.description??"Ping the MCP server and return basic Alpic info.";e.registerTool(r,{description:n,inputSchema:P},async(s)=>{let c={ok:!0,message:P.parse(s??{}).message??"pong",assetsBase:d(""),timestamp:new Date().toISOString()};return{content:[{type:"text",text:JSON.stringify(c,null,2)}]}})}var D="contractspec-alpic-mcp",I="1.0.0";function j(e){if(typeof e==="boolean")return e;return process.env.ALPIC_MCP_DEBUG==="1"||process.env.CONTRACTSPEC_MCP_DEBUG==="1"}function B(e){return new L({level:e?T.DEBUG:T.INFO,environment:"production",enableTracing:!1,enableTiming:!1,enableContext:!1,enableColors:!1})}function H(e,t){let r=(n)=>n.map((s)=>typeof s==="string"?s:JSON.stringify(s)).join(" ");return{log:(...n)=>{if(!t)return;e.info(r(n))},info:(...n)=>{if(!t)return;e.info(r(n))},warn:(...n)=>{e.warn(r(n))},error:(...n)=>{e.error(r(n))},debug:(...n)=>{if(!t)return;e.debug(r(n))}}}function J(e,t){w(e,t.tool),b(e,t.ui)}function A(e,t,r){return new Response(JSON.stringify({jsonrpc:"2.0",error:{code:t,message:r},id:null}),{status:e,headers:{"content-type":"application/json"}})}function E(e,t){let r=new _({name:e.serverName??D,version:e.serverVersion??I},{capabilities:{tools:{},resources:{},prompts:{},logging:{}}});J(r,e);let n=new z({sessionIdGenerator:t?()=>U():void 0,enableJsonResponse:e.enableJsonResponse??!0});return r.connect(n).then(()=>({server:r,transport:n}))}async function S(e){await Promise.allSettled([e.transport.close(),e.server.close()])}function G(e){return e.replace(/[^a-zA-Z0-9]+/g,"-")}function F(e){let t=j(e.enableDebugLogs),r=e.logger??B(t),n=e.stateless??!0,s=new Map,u=`alpic-mcp-handler-${G(e.path)}`;async function c(i){let o=await E(e,!1);try{return await o.transport.handleRequest(i)}finally{await S(o)}}async function m(i){let o=s.get(i);if(!o)return;s.delete(i),await S(o)}async function f(i){let o=i.headers.get("mcp-session-id"),a,h=!1;if(o){let p=s.get(o);if(!p)return A(404,-32001,"Session not found");a=p}else a=await E(e,!0),h=!0;try{let p=await a.transport.handleRequest(i),l=a.transport.sessionId;if(l&&!s.has(l))s.set(l,a);if(i.method==="DELETE"&&l)await m(l);else if(!l&&h)await S(a);return p}catch(p){if(h)await S(a);throw p}}let v=H(r,t);return new C({name:u}).all(e.path,async({request:i})=>{try{if(e.validateAuth){if(!await e.validateAuth(i))return A(401,-32002,"Unauthorized")}if(n)return await c(i);return await f(i)}catch(o){return v.error("Error handling MCP request",{path:e.path,method:i.method,error:o instanceof Error?o.stack??o.message:String(o)}),A(500,-32000,"Internal error")}})}function ce(e={}){let t=new C;return(e.basePaths??["/","/mcp"]).forEach((n)=>{t.use(F({...e,path:n}))}),t}export{q as AlpicFeature,d as alpicAssetPath,M as alpicAssetUrl,ce as createAlpicMcpApp,F as createAlpicMcpHandler};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{defineFeature as x}from"@lssm/lib.contracts-spec/features";var q=x({meta:{key:"modules.alpic",version:"1.0.0",title:"Alpic",description:"Alpic MCP and ChatGPT App hosting helpers",domain:"alpic",owners:["@contractspec-core"],tags:["package","modules","alpic"],stability:"experimental"}});function y(e){let t=e.trim();if(!t)return"/assets";if(t.startsWith("/assets"))return t;if(t.startsWith("/"))return`/assets${t}`;return`/assets/${t}`}function d(e){return y(e)}function M(e){let t=y(e),r=process.env.ALPIC_HOST?.trim();if(!r)return t;return`https://${r}${t}`}import{randomUuid as U}from"@lssm/lib.crypto-utils";import{Logger as L,LogLevel as T}from"@lssm/lib.logger";import{McpServer as _}from"@modelcontextprotocol/sdk/server/mcp.js";import{WebStandardStreamableHTTPServerTransport as z}from"@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";import{Elysia as C}from"elysia";var R="alpic_ui",N="app://ui";function b(e,t={}){let r=t.assetPath??"index.html",n=d(r),s=M(r),u=t.resourceKey??R,c=t.resourceUri??N,m=t.title??"ChatGPT App UI",f=t.description??"Entry point for the ChatGPT App UI hosted on Alpic.";e.registerResource(u,c,{title:m,description:f,mimeType:"application/json"},async()=>({contents:[{uri:c,mimeType:"application/json",text:JSON.stringify({title:m,description:f,path:n,url:s},null,2)}]}))}import{sanitizeMcpName as k}from"@lssm/lib.contracts-spec/jsonschema";import*as g from"zod";var O="alpic_ping",P=g.object({message:g.string().optional()});function w(e,t={}){let r=k(t.name??O),n=t.description??"Ping the MCP server and return basic Alpic info.";e.registerTool(r,{description:n,inputSchema:P},async(s)=>{let c={ok:!0,message:P.parse(s??{}).message??"pong",assetsBase:d(""),timestamp:new Date().toISOString()};return{content:[{type:"text",text:JSON.stringify(c,null,2)}]}})}var D="contractspec-alpic-mcp",I="1.0.0";function j(e){if(typeof e==="boolean")return e;return process.env.ALPIC_MCP_DEBUG==="1"||process.env.CONTRACTSPEC_MCP_DEBUG==="1"}function B(e){return new L({level:e?T.DEBUG:T.INFO,environment:"production",enableTracing:!1,enableTiming:!1,enableContext:!1,enableColors:!1})}function H(e,t){let r=(n)=>n.map((s)=>typeof s==="string"?s:JSON.stringify(s)).join(" ");return{log:(...n)=>{if(!t)return;e.info(r(n))},info:(...n)=>{if(!t)return;e.info(r(n))},warn:(...n)=>{e.warn(r(n))},error:(...n)=>{e.error(r(n))},debug:(...n)=>{if(!t)return;e.debug(r(n))}}}function J(e,t){w(e,t.tool),b(e,t.ui)}function A(e,t,r){return new Response(JSON.stringify({jsonrpc:"2.0",error:{code:t,message:r},id:null}),{status:e,headers:{"content-type":"application/json"}})}function E(e,t){let r=new _({name:e.serverName??D,version:e.serverVersion??I},{capabilities:{tools:{},resources:{},prompts:{},logging:{}}});J(r,e);let n=new z({sessionIdGenerator:t?()=>U():void 0,enableJsonResponse:e.enableJsonResponse??!0});return r.connect(n).then(()=>({server:r,transport:n}))}async function S(e){await Promise.allSettled([e.transport.close(),e.server.close()])}function G(e){return e.replace(/[^a-zA-Z0-9]+/g,"-")}function F(e){let t=j(e.enableDebugLogs),r=e.logger??B(t),n=e.stateless??!0,s=new Map,u=`alpic-mcp-handler-${G(e.path)}`;async function c(i){let o=await E(e,!1);try{return await o.transport.handleRequest(i)}finally{await S(o)}}async function m(i){let o=s.get(i);if(!o)return;s.delete(i),await S(o)}async function f(i){let o=i.headers.get("mcp-session-id"),a,h=!1;if(o){let p=s.get(o);if(!p)return A(404,-32001,"Session not found");a=p}else a=await E(e,!0),h=!0;try{let p=await a.transport.handleRequest(i),l=a.transport.sessionId;if(l&&!s.has(l))s.set(l,a);if(i.method==="DELETE"&&l)await m(l);else if(!l&&h)await S(a);return p}catch(p){if(h)await S(a);throw p}}let v=H(r,t);return new C({name:u}).all(e.path,async({request:i})=>{try{if(e.validateAuth){if(!await e.validateAuth(i))return A(401,-32002,"Unauthorized")}if(n)return await c(i);return await f(i)}catch(o){return v.error("Error handling MCP request",{path:e.path,method:i.method,error:o instanceof Error?o.stack??o.message:String(o)}),A(500,-32000,"Internal error")}})}function ce(e={}){let t=new C;return(e.basePaths??["/","/mcp"]).forEach((n)=>{t.use(F({...e,path:n}))}),t}export{q as AlpicFeature,d as alpicAssetPath,M as alpicAssetUrl,ce as createAlpicMcpApp,F as createAlpicMcpHandler};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Logger } from '@lssm/lib.logger';
|
|
2
|
+
import { Elysia } from 'elysia';
|
|
3
|
+
import { type AlpicMcpUiConfig } from './resources.js';
|
|
4
|
+
import { type AlpicMcpToolConfig } from './tools.js';
|
|
5
|
+
export interface AlpicMcpAppOptions {
|
|
6
|
+
serverName?: string;
|
|
7
|
+
serverVersion?: string;
|
|
8
|
+
basePaths?: string[];
|
|
9
|
+
stateless?: boolean;
|
|
10
|
+
enableJsonResponse?: boolean;
|
|
11
|
+
enableDebugLogs?: boolean;
|
|
12
|
+
ui?: AlpicMcpUiConfig;
|
|
13
|
+
tool?: AlpicMcpToolConfig;
|
|
14
|
+
logger?: Logger;
|
|
15
|
+
/** Validate incoming requests against an auth scheme before processing. */
|
|
16
|
+
validateAuth?: (request: Request) => boolean | Promise<boolean>;
|
|
17
|
+
/** Auth methods the MCP server requires clients to use. */
|
|
18
|
+
requiredAuthMethods?: string[];
|
|
19
|
+
}
|
|
20
|
+
export interface AlpicMcpHandlerOptions extends AlpicMcpAppOptions {
|
|
21
|
+
path: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function createAlpicMcpHandler(options: AlpicMcpHandlerOptions): Elysia;
|
|
24
|
+
export declare function createAlpicMcpApp(options?: AlpicMcpAppOptions): Elysia;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
export interface AlpicMcpUiConfig {
|
|
3
|
+
resourceKey?: string;
|
|
4
|
+
resourceUri?: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
assetPath?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function registerAlpicResources(server: McpServer, config?: AlpicMcpUiConfig): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineFeature as x}from"@lssm/lib.contracts-spec/features";var q=x({meta:{key:"modules.alpic",version:"1.0.0",title:"Alpic",description:"Alpic MCP and ChatGPT App hosting helpers",domain:"alpic",owners:["@contractspec-core"],tags:["package","modules","alpic"],stability:"experimental"}});function y(e){let t=e.trim();if(!t)return"/assets";if(t.startsWith("/assets"))return t;if(t.startsWith("/"))return`/assets${t}`;return`/assets/${t}`}function d(e){return y(e)}function M(e){let t=y(e),r=process.env.ALPIC_HOST?.trim();if(!r)return t;return`https://${r}${t}`}import{randomUuid as U}from"@lssm/lib.crypto-utils";import{Logger as L,LogLevel as T}from"@lssm/lib.logger";import{McpServer as _}from"@modelcontextprotocol/sdk/server/mcp.js";import{WebStandardStreamableHTTPServerTransport as z}from"@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";import{Elysia as C}from"elysia";var R="alpic_ui",N="app://ui";function b(e,t={}){let r=t.assetPath??"index.html",n=d(r),s=M(r),u=t.resourceKey??R,c=t.resourceUri??N,m=t.title??"ChatGPT App UI",f=t.description??"Entry point for the ChatGPT App UI hosted on Alpic.";e.registerResource(u,c,{title:m,description:f,mimeType:"application/json"},async()=>({contents:[{uri:c,mimeType:"application/json",text:JSON.stringify({title:m,description:f,path:n,url:s},null,2)}]}))}import{sanitizeMcpName as k}from"@lssm/lib.contracts-spec/jsonschema";import*as g from"zod";var O="alpic_ping",P=g.object({message:g.string().optional()});function w(e,t={}){let r=k(t.name??O),n=t.description??"Ping the MCP server and return basic Alpic info.";e.registerTool(r,{description:n,inputSchema:P},async(s)=>{let c={ok:!0,message:P.parse(s??{}).message??"pong",assetsBase:d(""),timestamp:new Date().toISOString()};return{content:[{type:"text",text:JSON.stringify(c,null,2)}]}})}var D="contractspec-alpic-mcp",I="1.0.0";function j(e){if(typeof e==="boolean")return e;return process.env.ALPIC_MCP_DEBUG==="1"||process.env.CONTRACTSPEC_MCP_DEBUG==="1"}function B(e){return new L({level:e?T.DEBUG:T.INFO,environment:"production",enableTracing:!1,enableTiming:!1,enableContext:!1,enableColors:!1})}function H(e,t){let r=(n)=>n.map((s)=>typeof s==="string"?s:JSON.stringify(s)).join(" ");return{log:(...n)=>{if(!t)return;e.info(r(n))},info:(...n)=>{if(!t)return;e.info(r(n))},warn:(...n)=>{e.warn(r(n))},error:(...n)=>{e.error(r(n))},debug:(...n)=>{if(!t)return;e.debug(r(n))}}}function J(e,t){w(e,t.tool),b(e,t.ui)}function A(e,t,r){return new Response(JSON.stringify({jsonrpc:"2.0",error:{code:t,message:r},id:null}),{status:e,headers:{"content-type":"application/json"}})}function E(e,t){let r=new _({name:e.serverName??D,version:e.serverVersion??I},{capabilities:{tools:{},resources:{},prompts:{},logging:{}}});J(r,e);let n=new z({sessionIdGenerator:t?()=>U():void 0,enableJsonResponse:e.enableJsonResponse??!0});return r.connect(n).then(()=>({server:r,transport:n}))}async function S(e){await Promise.allSettled([e.transport.close(),e.server.close()])}function G(e){return e.replace(/[^a-zA-Z0-9]+/g,"-")}function F(e){let t=j(e.enableDebugLogs),r=e.logger??B(t),n=e.stateless??!0,s=new Map,u=`alpic-mcp-handler-${G(e.path)}`;async function c(i){let o=await E(e,!1);try{return await o.transport.handleRequest(i)}finally{await S(o)}}async function m(i){let o=s.get(i);if(!o)return;s.delete(i),await S(o)}async function f(i){let o=i.headers.get("mcp-session-id"),a,h=!1;if(o){let p=s.get(o);if(!p)return A(404,-32001,"Session not found");a=p}else a=await E(e,!0),h=!0;try{let p=await a.transport.handleRequest(i),l=a.transport.sessionId;if(l&&!s.has(l))s.set(l,a);if(i.method==="DELETE"&&l)await m(l);else if(!l&&h)await S(a);return p}catch(p){if(h)await S(a);throw p}}let v=H(r,t);return new C({name:u}).all(e.path,async({request:i})=>{try{if(e.validateAuth){if(!await e.validateAuth(i))return A(401,-32002,"Unauthorized")}if(n)return await c(i);return await f(i)}catch(o){return v.error("Error handling MCP request",{path:e.path,method:i.method,error:o instanceof Error?o.stack??o.message:String(o)}),A(500,-32000,"Internal error")}})}function ce(e={}){let t=new C;return(e.basePaths??["/","/mcp"]).forEach((n)=>{t.use(F({...e,path:n}))}),t}export{q as AlpicFeature,d as alpicAssetPath,M as alpicAssetUrl,ce as createAlpicMcpApp,F as createAlpicMcpHandler};
|
package/package.json
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lssm/module.alpic",
|
|
3
|
+
"version": "5.0.1",
|
|
4
|
+
"description": "Alpic MCP and ChatGPT App hosting helpers",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"contractspec",
|
|
7
|
+
"alpic",
|
|
8
|
+
"mcp",
|
|
9
|
+
"chatgpt-app",
|
|
10
|
+
"hosting",
|
|
11
|
+
"typescript"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
|
|
21
|
+
"publish:pkg:canary": "bun publish:pkg --tag canary",
|
|
22
|
+
"build": "contractspec-bun-build build",
|
|
23
|
+
"build:bundle": "contractspec-bun-build transpile",
|
|
24
|
+
"build:types": "contractspec-bun-build types",
|
|
25
|
+
"dev": "contractspec-bun-build dev",
|
|
26
|
+
"clean": "rimraf dist .turbo",
|
|
27
|
+
"lint": "bun lint:fix",
|
|
28
|
+
"lint:fix": "node ../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../scripts/biome.cjs check --write .",
|
|
29
|
+
"lint:check": "node ../../../scripts/biome.cjs check .",
|
|
30
|
+
"prebuild": "contractspec-bun-build prebuild",
|
|
31
|
+
"typecheck": "tsgo --noEmit"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
35
|
+
"elysia": "^1.4.30",
|
|
36
|
+
"zod": "^4.5.4",
|
|
37
|
+
"@lssm/lib.contracts-spec": "^17.3.2",
|
|
38
|
+
"@lssm/lib.crypto-utils": "^2.0.1",
|
|
39
|
+
"@lssm/lib.logger": "^5.0.1"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@lssm-tech/tool.typescript": "5.0.1",
|
|
43
|
+
"typescript": "^7.0.2",
|
|
44
|
+
"@lssm-tech/tool.bun": "5.0.3"
|
|
45
|
+
},
|
|
46
|
+
"exports": {
|
|
47
|
+
".": {
|
|
48
|
+
"types": "./dist/index.d.ts",
|
|
49
|
+
"browser": "./dist/browser/index.js",
|
|
50
|
+
"bun": "./dist/index.js",
|
|
51
|
+
"node": "./dist/node/index.js",
|
|
52
|
+
"default": "./dist/index.js"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public",
|
|
57
|
+
"exports": {
|
|
58
|
+
".": {
|
|
59
|
+
"types": "./dist/index.d.ts",
|
|
60
|
+
"browser": "./dist/browser/index.js",
|
|
61
|
+
"bun": "./dist/index.js",
|
|
62
|
+
"node": "./dist/node/index.js",
|
|
63
|
+
"default": "./dist/index.js"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"registry": "https://registry.npmjs.org"
|
|
67
|
+
},
|
|
68
|
+
"license": "MIT",
|
|
69
|
+
"repository": {
|
|
70
|
+
"type": "git",
|
|
71
|
+
"url": "https://github.com/lssm-tech/contractspec.git",
|
|
72
|
+
"directory": "packages/modules/alpic"
|
|
73
|
+
},
|
|
74
|
+
"homepage": "https://contractspec.io",
|
|
75
|
+
"contractspec": {
|
|
76
|
+
"catalog": {
|
|
77
|
+
"family": "solutions",
|
|
78
|
+
"kind": "module",
|
|
79
|
+
"status": "active",
|
|
80
|
+
"adoptionMode": "adoptable",
|
|
81
|
+
"stability": "stable",
|
|
82
|
+
"platforms": [
|
|
83
|
+
"server"
|
|
84
|
+
],
|
|
85
|
+
"runtimes": [
|
|
86
|
+
"node"
|
|
87
|
+
],
|
|
88
|
+
"entrypoints": [
|
|
89
|
+
"."
|
|
90
|
+
],
|
|
91
|
+
"documentation": [
|
|
92
|
+
{
|
|
93
|
+
"title": "Module Alpic documentation",
|
|
94
|
+
"url": "https://www.npmjs.com/package/%40lssm%2Fmodule.alpic",
|
|
95
|
+
"kind": "readme"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"examples": [],
|
|
99
|
+
"replacements": [],
|
|
100
|
+
"capabilities": [
|
|
101
|
+
{
|
|
102
|
+
"id": "package.lssm.tech.module.alpic",
|
|
103
|
+
"title": "Module Alpic",
|
|
104
|
+
"description": "Alpic MCP and ChatGPT App hosting helpers",
|
|
105
|
+
"status": "active",
|
|
106
|
+
"useCases": [
|
|
107
|
+
"Adopt alpic mcp and chatgpt app hosting helpers"
|
|
108
|
+
],
|
|
109
|
+
"aliases": [
|
|
110
|
+
"contractspec",
|
|
111
|
+
"alpic",
|
|
112
|
+
"mcp",
|
|
113
|
+
"chatgpt-app",
|
|
114
|
+
"hosting",
|
|
115
|
+
"typescript",
|
|
116
|
+
"module"
|
|
117
|
+
],
|
|
118
|
+
"pythonEquivalents": [],
|
|
119
|
+
"canonicalImports": [
|
|
120
|
+
{
|
|
121
|
+
"from": "@lssm/module.alpic",
|
|
122
|
+
"symbols": []
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"constraints": {
|
|
126
|
+
"platforms": [
|
|
127
|
+
"server"
|
|
128
|
+
],
|
|
129
|
+
"runtimes": [
|
|
130
|
+
"node"
|
|
131
|
+
],
|
|
132
|
+
"avoidWhen": [
|
|
133
|
+
"The @lssm/module.alpic package constraints do not match the target runtime or platform."
|
|
134
|
+
],
|
|
135
|
+
"requires": [
|
|
136
|
+
"TypeScript"
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
"alternatives": [],
|
|
140
|
+
"relationships": [],
|
|
141
|
+
"resolutionPriority": 50
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|