@geminixiang/mikan 1.0.0-beta.41 → 1.0.0-beta.43
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/CHANGELOG.md +35 -0
- package/dist/adapters/github/bot.d.ts +8 -0
- package/dist/adapters/github/bot.d.ts.map +1 -1
- package/dist/adapters/github/bot.js +29 -1
- package/dist/adapters/github/bot.js.map +1 -1
- package/dist/adapters/github/webhook.d.ts +23 -0
- package/dist/adapters/github/webhook.d.ts.map +1 -0
- package/dist/adapters/github/webhook.js +78 -0
- package/dist/adapters/github/webhook.js.map +1 -0
- package/dist/adapters/slack/bot.d.ts.map +1 -1
- package/dist/adapters/slack/bot.js +1 -0
- package/dist/adapters/slack/bot.js.map +1 -1
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +2 -2
- package/dist/agent.js.map +1 -1
- package/dist/env-manifest.d.ts.map +1 -1
- package/dist/env-manifest.js +6 -1
- package/dist/env-manifest.js.map +1 -1
- package/dist/harness/extensions/registry.d.ts +15 -1
- package/dist/harness/extensions/registry.d.ts.map +1 -1
- package/dist/harness/extensions/registry.js +15 -2
- package/dist/harness/extensions/registry.js.map +1 -1
- package/dist/main.js +13 -0
- package/dist/main.js.map +1 -1
- package/dist/runtime/conversation-runtime.js +63 -36
- package/dist/runtime/conversation-runtime.js.map +1 -1
- package/dist/types.d.ts +14 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/web/server.d.ts +2 -0
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +5 -0
- package/dist/web/server.js.map +1 -1
- package/package.json +3 -3
package/dist/web/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/web/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA0D,MAAM,WAAW,CAAC;AAEjG,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CA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AAO,CAAC,IAAI,EAAE,CAAC,CAAC;QAChF,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC;YAC1B,GAAG,CAAC,UAAU,CACZ,gFAAgF;gBAC9E,2DAA2D;gBAC3D,8DAA8D,CACjE,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;QACzB,GAAG,CAAC,UAAU,CAAC,kBAAkB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import { createServer, type IncomingMessage, type Server, type ServerResponse } from \"node:http\";\nimport type { MessagingBot, PlatformName } from \"../adapter.js\";\nimport { resolveLinkBaseUrl } from \"../config.js\";\nimport * as log from \"../log.js\";\nimport type { SandboxConfig } from \"../sandbox/index.js\";\nimport { HostEventStore } from \"../tools/event.js\";\nimport type { VaultManager } from \"../vault/index.js\";\nimport { handleAdminRequest, type AdminRuntimeBridge } from \"./admin/portal.js\";\nimport type { InMemoryAdminTokenStore } from \"./admin/store.js\";\nimport { handleAgentEventsRequest } from \"../agent-events.js\";\nimport { createLoginRequestHandler } from \"./login/portal.js\";\nimport { requestBaseUrl } from \"./portal-shell.js\";\nimport type { InMemoryLinkTokenStore } from \"./login/store.js\";\nimport type { NotifyFn } from \"./login/types.js\";\nimport {\n handleSessionViewRequest,\n type SessionViewInteractiveOptions,\n} from \"./session-view/portal.js\";\nimport type { InMemorySessionViewTokenStore } from \"./session-view/store.js\";\nimport type { Workspace } from \"../office/types.js\";\nimport {\n handleGithubWebhookRequest,\n type GithubWebhookOptions,\n} from \"../adapters/github/webhook.js\";\n\ninterface StartWebServerOptions {\n port: number;\n linkTokenStore: InMemoryLinkTokenStore;\n vaultManager: VaultManager;\n notify: NotifyFn;\n sessionViewTokenStore?: InMemorySessionViewTokenStore;\n sessionViewInteractive?: SessionViewInteractiveOptions;\n adminOptions?: {\n adminTokenStore: InMemoryAdminTokenStore;\n workspace?: Workspace;\n runtime?: AdminRuntimeBridge;\n sandbox?: SandboxConfig;\n botsByPlatform?: Partial<Record<PlatformName, MessagingBot>>;\n };\n githubWebhook?: GithubWebhookOptions;\n}\n\nexport function startWebServer(options: StartWebServerOptions): Server {\n const loginHandler = createLoginRequestHandler(\n options.linkTokenStore,\n options.vaultManager,\n options.notify,\n );\n\n // Constructed once at server start; the admin portal consumes the owning\n // event store's interface instead of re-parsing event files off disk.\n const adminEventStore = options.adminOptions?.workspace\n ? HostEventStore.fromWorkspaceDir(options.adminOptions.workspace.root)\n : undefined;\n\n const server = createServer(async (req: IncomingMessage, res: ServerResponse) => {\n try {\n const url = new URL(req.url ?? \"/\", requestBaseUrl(req));\n\n if (req.method === \"GET\" && url.pathname === \"/health\") {\n res.writeHead(200, { \"Content-Type\": \"application/json\" });\n res.end(JSON.stringify({ ok: true }));\n return;\n }\n\n if (\n options.githubWebhook &&\n (await handleGithubWebhookRequest(req, res, url, options.githubWebhook))\n ) {\n return;\n }\n\n if (handleAgentEventsRequest(req, res, url)) return;\n\n const adminOptions = options.adminOptions;\n if (\n adminOptions?.adminTokenStore &&\n (await handleAdminRequest(req, res, url, {\n vaultManager: options.vaultManager,\n linkTokenStore: options.linkTokenStore,\n sessionViewTokenStore: options.sessionViewTokenStore,\n adminTokenStore: adminOptions.adminTokenStore,\n portalBaseUrl: resolveLinkBaseUrl() ?? undefined,\n workspace: adminOptions.workspace,\n eventStore: adminEventStore,\n runtime: adminOptions.runtime,\n sandbox: adminOptions.sandbox,\n botsByPlatform: adminOptions.botsByPlatform,\n }))\n ) {\n return;\n }\n\n if (\n await handleSessionViewRequest(\n req,\n res,\n url,\n options.sessionViewTokenStore,\n options.sessionViewInteractive,\n )\n ) {\n return;\n }\n\n if (loginHandler(req, res, url)) return;\n\n res.writeHead(404);\n res.end();\n } catch (err) {\n log.logWarning(\"Web server request error\", err instanceof Error ? err.message : String(err));\n if (!res.headersSent) {\n res.writeHead(500, { \"Content-Type\": \"application/json\" });\n }\n res.end(JSON.stringify({ error: \"Internal server error\" }));\n }\n });\n\n const bindHost = resolveLinkBaseUrl() ? undefined : \"127.0.0.1\";\n server.listen(options.port, bindHost, () => {\n log.logInfo(`Web server listening on ${bindHost ?? \"0.0.0.0\"}:${options.port}`);\n if (!resolveLinkBaseUrl()) {\n log.logWarning(\n \"MIKAN_LINK_URL is not set — bound to 127.0.0.1 and OAuth redirect_uri will be \" +\n \"derived from request headers (Host / X-Forwarded-*). Set \" +\n \"MIKAN_LINK_URL=https://your-host.example.com for production.\",\n );\n }\n });\n\n server.on(\"error\", (err) => {\n log.logWarning(\"Web server error\", err.message);\n });\n\n return server;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geminixiang/mikan",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.43",
|
|
4
4
|
"description": "Multi-platform AI coding agent for Slack, Telegram, Discord, and GitHub",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@earendil-works/gondolin": "0.12.0",
|
|
69
|
-
"@earendil-works/pi-agent-core": "^0.
|
|
70
|
-
"@earendil-works/pi-ai": "^0.
|
|
69
|
+
"@earendil-works/pi-agent-core": "^0.83.0",
|
|
70
|
+
"@earendil-works/pi-ai": "^0.83.0",
|
|
71
71
|
"@sentry/node": "^10.60.0",
|
|
72
72
|
"@sinclair/typebox": "^0.34.49",
|
|
73
73
|
"@slack/socket-mode": "^2.0.7",
|