letagents 0.12.29 → 0.12.30

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.
@@ -1,5 +1,6 @@
1
1
  import { registerTools } from "./register-tools.js";
2
2
  export const LETAGENTS_RUNTIME_CONTRACT_ARG = "--letagents-runtime-contract";
3
+ export const LETAGENTS_RUNTIME_READINESS_URI = "letagents://runtime/readiness";
3
4
  /**
4
5
  * Discover through the production registration path rather than maintaining a
5
6
  * second capability list that can drift from the MCP server.
@@ -15,6 +16,16 @@ export function registeredToolNames(profile, supervisedProvider = null, apiUrl =
15
16
  registerTools(recorder, profile, supervisedProvider, { apiUrl });
16
17
  return [...names].sort();
17
18
  }
19
+ /** Public capability metadata only; reading it grants no room or tool authority. */
20
+ export function registerRuntimeReadinessResource(server, profile, supervisedProvider, apiUrl = process.env.LETAGENTS_API_URL) {
21
+ const text = JSON.stringify({
22
+ format: 1, profile, provider: supervisedProvider,
23
+ tools: registeredToolNames(profile, supervisedProvider, apiUrl),
24
+ });
25
+ server.resource("runtime_readiness", LETAGENTS_RUNTIME_READINESS_URI, { mimeType: "application/json" }, async (uri) => ({
26
+ contents: [{ uri: uri.href, mimeType: "application/json", text }],
27
+ }));
28
+ }
18
29
  export function letAgentsRuntimeContract(apiUrl = process.env.LETAGENTS_API_URL) {
19
30
  return {
20
31
  format: 1,
@@ -7,20 +7,22 @@ import { attachMcpServer, autoJoinFromContext, shutdownRuntime } from "./server/
7
7
  import { requireValidWorkerBearerRuntime } from "./server/runtime/worker-bearer.js";
8
8
  import { executionProfile } from "./server/runtime/execution-profile.js";
9
9
  import { WORKSPACE_CAPTURE_INSTRUCTIONS } from "./server/tools/workspace.js";
10
- import { LETAGENTS_RUNTIME_CONTRACT_ARG, letAgentsRuntimeContract, } from "./server/runtime-contract.js";
10
+ import { LETAGENTS_RUNTIME_CONTRACT_ARG, letAgentsRuntimeContract, registerRuntimeReadinessResource, } from "./server/runtime-contract.js";
11
11
  async function main() {
12
12
  if (process.argv.slice(2).includes(LETAGENTS_RUNTIME_CONTRACT_ARG)) {
13
13
  process.stdout.write(`${JSON.stringify(letAgentsRuntimeContract())}\n`);
14
14
  return;
15
15
  }
16
16
  const profile = executionProfile();
17
+ const supervisedProvider = process.env.LETAGENTS_SUPERVISOR_PROVIDER?.trim() || null;
17
18
  const server = new McpServer({
18
19
  name: "letagents",
19
20
  version: "0.2.0",
20
21
  }, { instructions: profile === "autonomous_mcp_worker" || profile === "interactive_desktop" ? WORKSPACE_CAPTURE_INSTRUCTIONS : undefined });
21
22
  attachMcpServer(server);
22
23
  registerRoomResources(server);
23
- registerTools(server, profile);
24
+ registerTools(server, profile, supervisedProvider);
25
+ registerRuntimeReadinessResource(server, profile, supervisedProvider);
24
26
  requireValidWorkerBearerRuntime();
25
27
  const transport = new StdioServerTransport();
26
28
  await server.connect(transport);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "letagents",
3
- "version": "0.12.29",
3
+ "version": "0.12.30",
4
4
  "description": "Let Agents Chat \u2014 MCP server for AI agent communication",
5
5
  "type": "module",
6
6
  "main": "dist/mcp/server.js",