@agimon-ai/po-core 0.0.0-alpha.75 → 0.0.0-alpha.76
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/dist/mcp.cjs +5 -0
- package/dist/mcp.d.mts +2 -0
- package/dist/mcp.mjs +1 -0
- package/dist/src/schemas/mcp.cjs +13 -0
- package/dist/src/schemas/mcp.cjs.map +1 -0
- package/dist/src/schemas/mcp.d.mts +50 -0
- package/dist/src/schemas/mcp.d.mts.map +1 -0
- package/dist/src/schemas/mcp.mjs +11 -0
- package/dist/src/schemas/mcp.mjs.map +1 -0
- package/package.json +9 -4
package/dist/mcp.cjs
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_mcp = require("./src/schemas/mcp.cjs");
|
|
3
|
+
exports.PO_MCP_CONTRACT = require_mcp.PO_MCP_CONTRACT;
|
|
4
|
+
exports.PO_MCP_SERVICE = require_mcp.PO_MCP_SERVICE;
|
|
5
|
+
exports.readPoMcp = require_mcp.readPoMcp;
|
package/dist/mcp.d.mts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { McpSessionApiKey, McpSessionServerResult, PO_MCP_CONTRACT, PO_MCP_SERVICE, PoMcpRegistration, PoMcpRegistrationInput, PoMcpService, readPoMcp } from "./src/schemas/mcp.mjs";
|
|
2
|
+
export { type McpSessionApiKey, type McpSessionServerResult, PO_MCP_CONTRACT, PO_MCP_SERVICE, type PoMcpRegistration, type PoMcpRegistrationInput, type PoMcpService, readPoMcp };
|
package/dist/mcp.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PO_MCP_CONTRACT, PO_MCP_SERVICE, readPoMcp } from "./src/schemas/mcp.mjs";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const require_serverScope = require("./serverScope.cjs");
|
|
2
|
+
//#region src/schemas/mcp.ts
|
|
3
|
+
const PO_MCP_SERVICE = "po/mcp";
|
|
4
|
+
const PO_MCP_CONTRACT = require_serverScope.defineServiceContract(PO_MCP_SERVICE, { scope: "session" });
|
|
5
|
+
function readPoMcp(context) {
|
|
6
|
+
return context.get(PO_MCP_SERVICE);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
exports.PO_MCP_CONTRACT = PO_MCP_CONTRACT;
|
|
10
|
+
exports.PO_MCP_SERVICE = PO_MCP_SERVICE;
|
|
11
|
+
exports.readPoMcp = readPoMcp;
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=mcp.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.cjs","names":["defineServiceContract"],"sources":["../../../src/schemas/mcp.ts"],"sourcesContent":["import type { Context } from '@deepseek-ai/cordis';\n\nimport type { PoHeadlessToolResult } from './headless';\nimport { defineServiceContract } from './serverScope';\n\nexport const PO_MCP_SERVICE = 'po/mcp';\n\nexport type McpSessionApiKey = ({ value: string } | { environmentVariable: string }) &\n ({ mode: 'bearer' } | { mode: 'header'; name: string });\n\nexport interface PoMcpRegistrationInput {\n name: string;\n url: string;\n type?: 'http' | 'sse';\n apiKey?: McpSessionApiKey;\n}\n\nexport interface McpSessionServerResult {\n name: string;\n status: string;\n tools: string[];\n}\n\n/** An identity-owned temporary connection. It survives the establishing call's completion. */\nexport interface PoMcpRegistration {\n readonly name: string;\n /** Detached live state. Retired registrations cannot observe a replacement. */\n snapshot(): McpSessionServerResult;\n /** Uses the session's validated, visible tool invocation path. */\n invoke(tool: string, args?: Record<string, unknown>, signal?: AbortSignal): Promise<PoHeadlessToolResult>;\n /** Idempotent cleanup, including after cancellation or provider withdrawal. */\n dispose(): Promise<void>;\n}\n\n/** Trusted session capability. The consumer owns permission and connection lifetime. */\nexport interface PoMcpService {\n /** Cancellation rolls back establishment only. Credentials are never persisted by this service. */\n register(input: PoMcpRegistrationInput, signal?: AbortSignal): Promise<PoMcpRegistration>;\n}\n\nexport const PO_MCP_CONTRACT = defineServiceContract<PoMcpService>(PO_MCP_SERVICE, { scope: 'session' });\n\ndeclare module '@deepseek-ai/cordis' {\n interface Context {\n 'po/mcp': PoMcpService;\n }\n}\n\nexport function readPoMcp(context: Context): PoMcpService | undefined {\n return context.get(PO_MCP_SERVICE) as PoMcpService | undefined;\n}\n"],"mappings":";;AAKA,MAAa,iBAAiB;AAmC9B,MAAa,kBAAkBA,oBAAAA,sBAAoC,gBAAgB,EAAE,OAAO,UAAU,CAAC;AAQvG,SAAgB,UAAU,SAA4C;CACpE,OAAO,QAAQ,IAAI,cAAc;AACnC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { PoServiceContract } from "./serverScope.mjs";
|
|
2
|
+
import { PoHeadlessToolResult } from "./headless.mjs";
|
|
3
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
4
|
+
//#region src/schemas/mcp.d.ts
|
|
5
|
+
export declare const PO_MCP_SERVICE = "po/mcp";
|
|
6
|
+
export type McpSessionApiKey = ({
|
|
7
|
+
value: string;
|
|
8
|
+
} | {
|
|
9
|
+
environmentVariable: string;
|
|
10
|
+
}) & ({
|
|
11
|
+
mode: 'bearer';
|
|
12
|
+
} | {
|
|
13
|
+
mode: 'header';
|
|
14
|
+
name: string;
|
|
15
|
+
});
|
|
16
|
+
export interface PoMcpRegistrationInput {
|
|
17
|
+
name: string;
|
|
18
|
+
url: string;
|
|
19
|
+
type?: 'http' | 'sse';
|
|
20
|
+
apiKey?: McpSessionApiKey;
|
|
21
|
+
}
|
|
22
|
+
export interface McpSessionServerResult {
|
|
23
|
+
name: string;
|
|
24
|
+
status: string;
|
|
25
|
+
tools: string[];
|
|
26
|
+
}
|
|
27
|
+
/** An identity-owned temporary connection. It survives the establishing call's completion. */
|
|
28
|
+
export interface PoMcpRegistration {
|
|
29
|
+
readonly name: string;
|
|
30
|
+
/** Detached live state. Retired registrations cannot observe a replacement. */
|
|
31
|
+
snapshot(): McpSessionServerResult;
|
|
32
|
+
/** Uses the session's validated, visible tool invocation path. */
|
|
33
|
+
invoke(tool: string, args?: Record<string, unknown>, signal?: AbortSignal): Promise<PoHeadlessToolResult>;
|
|
34
|
+
/** Idempotent cleanup, including after cancellation or provider withdrawal. */
|
|
35
|
+
dispose(): Promise<void>;
|
|
36
|
+
}
|
|
37
|
+
/** Trusted session capability. The consumer owns permission and connection lifetime. */
|
|
38
|
+
export interface PoMcpService {
|
|
39
|
+
/** Cancellation rolls back establishment only. Credentials are never persisted by this service. */
|
|
40
|
+
register(input: PoMcpRegistrationInput, signal?: AbortSignal): Promise<PoMcpRegistration>;
|
|
41
|
+
}
|
|
42
|
+
export declare const PO_MCP_CONTRACT: PoServiceContract<PoMcpService>;
|
|
43
|
+
declare module '@deepseek-ai/cordis' {
|
|
44
|
+
interface Context {
|
|
45
|
+
'po/mcp': PoMcpService;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export declare function readPoMcp(context: Context): PoMcpService | undefined;
|
|
49
|
+
//#endregion
|
|
50
|
+
//# sourceMappingURL=mcp.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.d.mts","names":["_$__serverScope0.PoServiceContract"],"sources":["../../../src/schemas/mcp.ts"],"mappings":";;;;qBAKa;YAED;EAAsB;;EAAoB;;EACjD;;EAAqB;EAAgB;;iBAEzB;EACf;EACA;EACA;EACA,SAAS;;iBAGM;EACf;EACA;EACA;;;iBAIe;WACN;;EAET,YAAY;;EAEZ,OAAO,cAAc,OAAO,yBAAyB,SAAS,cAAc,QAAQ;;EAEpF,WAAW;;;iBAII;;EAEf,SAAS,OAAO,wBAAwB,SAAS,cAAc,QAAQ;;qBAG5D,iBAAeA,kBAAA;;YAGhB;IACR,UAAU;;;wBAIE,UAAU,SAAS,UAAU"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineServiceContract } from "./serverScope.mjs";
|
|
2
|
+
//#region src/schemas/mcp.ts
|
|
3
|
+
const PO_MCP_SERVICE = "po/mcp";
|
|
4
|
+
const PO_MCP_CONTRACT = defineServiceContract(PO_MCP_SERVICE, { scope: "session" });
|
|
5
|
+
function readPoMcp(context) {
|
|
6
|
+
return context.get(PO_MCP_SERVICE);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { PO_MCP_CONTRACT, PO_MCP_SERVICE, readPoMcp };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=mcp.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.mjs","names":[],"sources":["../../../src/schemas/mcp.ts"],"sourcesContent":["import type { Context } from '@deepseek-ai/cordis';\n\nimport type { PoHeadlessToolResult } from './headless';\nimport { defineServiceContract } from './serverScope';\n\nexport const PO_MCP_SERVICE = 'po/mcp';\n\nexport type McpSessionApiKey = ({ value: string } | { environmentVariable: string }) &\n ({ mode: 'bearer' } | { mode: 'header'; name: string });\n\nexport interface PoMcpRegistrationInput {\n name: string;\n url: string;\n type?: 'http' | 'sse';\n apiKey?: McpSessionApiKey;\n}\n\nexport interface McpSessionServerResult {\n name: string;\n status: string;\n tools: string[];\n}\n\n/** An identity-owned temporary connection. It survives the establishing call's completion. */\nexport interface PoMcpRegistration {\n readonly name: string;\n /** Detached live state. Retired registrations cannot observe a replacement. */\n snapshot(): McpSessionServerResult;\n /** Uses the session's validated, visible tool invocation path. */\n invoke(tool: string, args?: Record<string, unknown>, signal?: AbortSignal): Promise<PoHeadlessToolResult>;\n /** Idempotent cleanup, including after cancellation or provider withdrawal. */\n dispose(): Promise<void>;\n}\n\n/** Trusted session capability. The consumer owns permission and connection lifetime. */\nexport interface PoMcpService {\n /** Cancellation rolls back establishment only. Credentials are never persisted by this service. */\n register(input: PoMcpRegistrationInput, signal?: AbortSignal): Promise<PoMcpRegistration>;\n}\n\nexport const PO_MCP_CONTRACT = defineServiceContract<PoMcpService>(PO_MCP_SERVICE, { scope: 'session' });\n\ndeclare module '@deepseek-ai/cordis' {\n interface Context {\n 'po/mcp': PoMcpService;\n }\n}\n\nexport function readPoMcp(context: Context): PoMcpService | undefined {\n return context.get(PO_MCP_SERVICE) as PoMcpService | undefined;\n}\n"],"mappings":";;AAKA,MAAa,iBAAiB;AAmC9B,MAAa,kBAAkB,sBAAoC,gBAAgB,EAAE,OAAO,UAAU,CAAC;AAQvG,SAAgB,UAAU,SAA4C;CACpE,OAAO,QAAQ,IAAI,cAAc;AACnC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/po-core",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.76",
|
|
4
4
|
"description": "Po runtime systems and reusable core services.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -222,6 +222,11 @@
|
|
|
222
222
|
"import": "./dist/main.mjs",
|
|
223
223
|
"require": "./dist/main.cjs"
|
|
224
224
|
},
|
|
225
|
+
"./mcp": {
|
|
226
|
+
"types": "./dist/mcp.d.mts",
|
|
227
|
+
"import": "./dist/mcp.mjs",
|
|
228
|
+
"require": "./dist/mcp.cjs"
|
|
229
|
+
},
|
|
225
230
|
"./mcpFacet": {
|
|
226
231
|
"types": "./dist/mcpFacet.d.mts",
|
|
227
232
|
"import": "./dist/mcpFacet.mjs",
|
|
@@ -559,8 +564,8 @@
|
|
|
559
564
|
"registry": "https://registry.npmjs.org/"
|
|
560
565
|
},
|
|
561
566
|
"dependencies": {
|
|
562
|
-
"@agimon-ai/po-logsink": "0.0.1-alpha.
|
|
563
|
-
"@agimon-ai/po-web-security": "0.0.0-alpha.
|
|
567
|
+
"@agimon-ai/po-logsink": "0.0.1-alpha.58",
|
|
568
|
+
"@agimon-ai/po-web-security": "0.0.0-alpha.76",
|
|
564
569
|
"@deepseek-ai/cordis": "4.0.5",
|
|
565
570
|
"@earendil-works/chord": "1.4.0",
|
|
566
571
|
"@earendil-works/pi-agent-core": "1.4.0",
|
|
@@ -584,7 +589,7 @@
|
|
|
584
589
|
"yaml": "2.9.1"
|
|
585
590
|
},
|
|
586
591
|
"devDependencies": {
|
|
587
|
-
"@agimon-ai/vibe-lint-plugin-po-core": "0.0.0-alpha.
|
|
592
|
+
"@agimon-ai/vibe-lint-plugin-po-core": "0.0.0-alpha.76",
|
|
588
593
|
"@apidevtools/swagger-parser": "^13.1.0",
|
|
589
594
|
"@asyncapi/parser": "^3.6.4",
|
|
590
595
|
"@earendil-works/pi-ai": "1.4.0",
|