🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@limecloud/agent-app-studio

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@limecloud/agent-app-studio - npm Package Compare versions

Comparing version
0.1.1
to
0.1.2
+1
-1
APP.md

@@ -5,3 +5,3 @@ ---

displayName: Lime Agent App Studio
version: 0.1.1
version: 0.1.2
status: preview

@@ -8,0 +8,0 @@ appType: developer-tool

{
"name": "@limecloud/agent-app-studio",
"version": "0.1.1",
"version": "0.1.2",
"description": "Lime Agent App Studio CLI and visual publisher for Agent App packages.",

@@ -30,3 +30,4 @@ "type": "module",

"publish:dry-run": "npm publish --access public --dry-run",
"publish:npm": "npm publish --access public"
"publish:npm": "npm publish --access public",
"dev": "node src/server.mjs"
},

@@ -33,0 +34,0 @@ "engines": {

@@ -19,2 +19,9 @@ // input: 本地 HTTP 请求

try {
if (req.method === "GET" && req.url === "/api/bootstrap") {
return sendJson(res, {
appId: "lime-agent-app-studio",
status: "ok",
entry: "dashboard",
});
}
if (req.method === "POST" && req.url === "/api/inspect") {

@@ -50,2 +57,5 @@ const body = await readJson(req);

if (error?.code === "ENOENT" || error?.code === "EISDIR") {
if (acceptsHtml(req)) {
return sendFile(res, join(appRoot, "index.html"));
}
return sendNotFound(res);

@@ -55,2 +65,11 @@ }

}
return sendBuffer(res, filePath, content);
}
async function sendFile(res, filePath) {
const content = await readFile(filePath);
return sendBuffer(res, filePath, content);
}
function sendBuffer(res, filePath, content) {
const type = contentType(filePath);

@@ -95,1 +114,15 @@ res.writeHead(200, { "Content-Type": type });

}
function acceptsHtml(req) {
const accept = req.headers.accept || "";
return accept.includes("text/html");
}
function isMainModule() {
return process.argv[1] && import.meta.url === new URL(process.argv[1], "file:").href;
}
if (isMainModule()) {
const { url } = await startStudioServer({ port: process.env.PORT });
console.log(`Lime Agent App Studio runtime 已启动:${url}`);
}