@otium-team/negotium 0.23.14 → 0.24.0
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/agent-helpers.js +956 -243
- package/dist/agent-helpers.js.map +12 -9
- package/dist/{chunk-3v58ejrk.js → chunk-3r4xfhkx.js} +3 -3
- package/dist/{chunk-3v58ejrk.js.map → chunk-3r4xfhkx.js.map} +2 -2
- package/dist/{chunk-ng13grfj.js → chunk-fzfzskjq.js} +18 -2
- package/dist/{chunk-ng13grfj.js.map → chunk-fzfzskjq.js.map} +4 -4
- package/dist/{chunk-m1ngkjdd.js → chunk-hn2cqdd0.js} +1 -1
- package/dist/hosted-agent.js +19 -3
- package/dist/hosted-agent.js.map +5 -5
- package/dist/main.js +38697 -37819
- package/dist/main.js.map +89 -85
- package/dist/mcp-factories.js +946 -227
- package/dist/mcp-factories.js.map +13 -10
- package/dist/prompts.js +221 -1
- package/dist/prompts.js.map +7 -5
- package/dist/registry.js +3 -3
- package/dist/rollout.js +2 -2
- package/dist/runtime/src/mcp/wiki-server.ts +8 -0
- package/dist/runtime/src/platform/mcp-config.ts +26 -0
- package/dist/runtime/src/prompts/builders.ts +5 -0
- package/dist/runtime/src/runtime/turn-runner.ts +104 -1
- package/dist/runtime/src/storage/api-topics.ts +29 -0
- package/dist/runtime/src/topics/agent-plugins/mcp.schema.json +120 -0
- package/dist/runtime/src/topics/agent-plugins/plugin.schema.json +65 -0
- package/dist/runtime/src/topics/plugin-server-instructions.ts +201 -0
- package/dist/runtime/src/topics/plugin-turn.ts +37 -0
- package/dist/runtime/src/topics/plugins.ts +445 -0
- package/dist/runtime/src/topics/update.ts +34 -0
- package/dist/runtime/src/types/api.ts +5 -0
- package/dist/runtime/src/version.ts +1 -1
- package/dist/storage.js +23 -2
- package/dist/storage.js.map +3 -3
- package/dist/types/packages/core/src/platform/mcp-config.d.ts +6 -0
- package/dist/types/packages/core/src/prompts/builders.d.ts +3 -0
- package/dist/types/packages/core/src/runtime/turn-runner.d.ts +14 -1
- package/dist/types/packages/core/src/storage/api-topics.d.ts +3 -0
- package/dist/types/packages/core/src/topics/plugin-server-instructions.d.ts +55 -0
- package/dist/types/packages/core/src/topics/plugin-turn.d.ts +17 -0
- package/dist/types/packages/core/src/topics/plugins.d.ts +66 -0
- package/dist/types/packages/core/src/types/api.d.ts +5 -0
- package/dist/types/packages/core/src/version.d.ts +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-m1ngkjdd.js.map → chunk-hn2cqdd0.js.map} +0 -0
package/dist/prompts.js
CHANGED
|
@@ -524,6 +524,221 @@ function formatSelectableModel(candidate) {
|
|
|
524
524
|
return `${candidate.agent} / \`${candidate.model}\` [${tier}-level]: ${candidate.routingSummary}`;
|
|
525
525
|
}
|
|
526
526
|
|
|
527
|
+
// ../../packages/core/src/topics/plugins.ts
|
|
528
|
+
import { z } from "zod";
|
|
529
|
+
|
|
530
|
+
// ../../packages/core/src/runtime-gateway.ts
|
|
531
|
+
var HOST_MCP_SERVER_KEYS = new Set(["type", "url", "headers", "timeout"]);
|
|
532
|
+
// ../../packages/core/src/topics/agent-plugins/mcp.schema.json
|
|
533
|
+
var mcp_schema_default = {
|
|
534
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
535
|
+
$id: "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json",
|
|
536
|
+
title: "Agent Plugins MCP Configuration",
|
|
537
|
+
description: "Machine-readable schema for mcp.json in Agent Plugins 1.0.0. The Agent Plugins specification defines additional semantic and operational requirements.",
|
|
538
|
+
type: "object",
|
|
539
|
+
properties: {
|
|
540
|
+
$schema: {
|
|
541
|
+
const: "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json",
|
|
542
|
+
description: "Canonical identifier of the MCP configuration schema for the Agent Plugins version targeted by this document."
|
|
543
|
+
},
|
|
544
|
+
mcpServers: {
|
|
545
|
+
type: "object",
|
|
546
|
+
additionalProperties: {
|
|
547
|
+
$ref: "#/$defs/server"
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
required: ["$schema", "mcpServers"],
|
|
552
|
+
additionalProperties: false,
|
|
553
|
+
$defs: {
|
|
554
|
+
server: {
|
|
555
|
+
title: "MCP server",
|
|
556
|
+
oneOf: [
|
|
557
|
+
{
|
|
558
|
+
$ref: "#/$defs/stdioServer"
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
$ref: "#/$defs/streamableHttpServer"
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
$ref: "#/$defs/sseServer"
|
|
565
|
+
}
|
|
566
|
+
]
|
|
567
|
+
},
|
|
568
|
+
stdioServer: {
|
|
569
|
+
title: "stdio MCP server",
|
|
570
|
+
type: "object",
|
|
571
|
+
properties: {
|
|
572
|
+
type: {
|
|
573
|
+
const: "stdio"
|
|
574
|
+
},
|
|
575
|
+
command: {
|
|
576
|
+
type: "string",
|
|
577
|
+
minLength: 1,
|
|
578
|
+
description: "Executable token. Resolution rules are defined by the Agent Plugins specification."
|
|
579
|
+
},
|
|
580
|
+
args: {
|
|
581
|
+
type: "array",
|
|
582
|
+
items: {
|
|
583
|
+
type: "string"
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
env: {
|
|
587
|
+
type: "object",
|
|
588
|
+
propertyNames: {
|
|
589
|
+
not: {
|
|
590
|
+
enum: ["PLUGIN_ROOT", "PLUGIN_DATA"]
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
additionalProperties: {
|
|
594
|
+
type: "string"
|
|
595
|
+
}
|
|
596
|
+
},
|
|
597
|
+
cwd: {
|
|
598
|
+
type: "string",
|
|
599
|
+
pattern: "^(?:\\./|\\$\\{PLUGIN_ROOT\\}(?:/|$)|\\$\\{PLUGIN_DATA\\}(?:/|$))",
|
|
600
|
+
description: "Plugin-relative, PLUGIN_ROOT-rooted, or PLUGIN_DATA-rooted working directory. Filesystem containment is validated separately."
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
required: ["type", "command"],
|
|
604
|
+
additionalProperties: false
|
|
605
|
+
},
|
|
606
|
+
streamableHttpServer: {
|
|
607
|
+
title: "Streamable HTTP MCP server",
|
|
608
|
+
type: "object",
|
|
609
|
+
properties: {
|
|
610
|
+
type: {
|
|
611
|
+
const: "streamable-http"
|
|
612
|
+
},
|
|
613
|
+
url: {
|
|
614
|
+
type: "string",
|
|
615
|
+
minLength: 1,
|
|
616
|
+
description: "MCP endpoint URL. URL semantics are defined by the Agent Plugins specification."
|
|
617
|
+
},
|
|
618
|
+
headers: {
|
|
619
|
+
$ref: "#/$defs/headers"
|
|
620
|
+
}
|
|
621
|
+
},
|
|
622
|
+
required: ["type", "url"],
|
|
623
|
+
additionalProperties: false
|
|
624
|
+
},
|
|
625
|
+
sseServer: {
|
|
626
|
+
title: "Legacy HTTP+SSE MCP server",
|
|
627
|
+
type: "object",
|
|
628
|
+
properties: {
|
|
629
|
+
type: {
|
|
630
|
+
const: "sse"
|
|
631
|
+
},
|
|
632
|
+
url: {
|
|
633
|
+
type: "string",
|
|
634
|
+
minLength: 1,
|
|
635
|
+
description: "MCP endpoint URL. URL semantics are defined by the Agent Plugins specification."
|
|
636
|
+
},
|
|
637
|
+
headers: {
|
|
638
|
+
$ref: "#/$defs/headers"
|
|
639
|
+
}
|
|
640
|
+
},
|
|
641
|
+
required: ["type", "url"],
|
|
642
|
+
additionalProperties: false
|
|
643
|
+
},
|
|
644
|
+
headers: {
|
|
645
|
+
title: "HTTP headers",
|
|
646
|
+
type: "object",
|
|
647
|
+
additionalProperties: {
|
|
648
|
+
type: "string"
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
};
|
|
653
|
+
// ../../packages/core/src/topics/agent-plugins/plugin.schema.json
|
|
654
|
+
var plugin_schema_default = {
|
|
655
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
656
|
+
$id: "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
657
|
+
title: "Agent Plugins Manifest",
|
|
658
|
+
description: "Machine-readable schema for plugin.json in Agent Plugins 1.0.0. The Agent Plugins specification defines additional semantic and operational requirements.",
|
|
659
|
+
type: "object",
|
|
660
|
+
properties: {
|
|
661
|
+
$schema: {
|
|
662
|
+
const: "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
663
|
+
description: "Canonical identifier of the plugin manifest schema for the Agent Plugins version targeted by this document."
|
|
664
|
+
},
|
|
665
|
+
name: {
|
|
666
|
+
type: "string",
|
|
667
|
+
minLength: 1,
|
|
668
|
+
maxLength: 64,
|
|
669
|
+
pattern: "^(?!.*(?:--|\\.\\.))[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$",
|
|
670
|
+
description: "Human-readable plugin name."
|
|
671
|
+
},
|
|
672
|
+
version: {
|
|
673
|
+
type: "string"
|
|
674
|
+
},
|
|
675
|
+
description: {
|
|
676
|
+
type: "string"
|
|
677
|
+
},
|
|
678
|
+
author: {
|
|
679
|
+
type: "object",
|
|
680
|
+
properties: {
|
|
681
|
+
name: {
|
|
682
|
+
type: "string"
|
|
683
|
+
},
|
|
684
|
+
email: {
|
|
685
|
+
type: "string"
|
|
686
|
+
},
|
|
687
|
+
url: {
|
|
688
|
+
type: "string"
|
|
689
|
+
}
|
|
690
|
+
},
|
|
691
|
+
additionalProperties: false
|
|
692
|
+
},
|
|
693
|
+
homepage: {
|
|
694
|
+
type: "string"
|
|
695
|
+
},
|
|
696
|
+
repository: {
|
|
697
|
+
type: "string"
|
|
698
|
+
},
|
|
699
|
+
license: {
|
|
700
|
+
type: "string"
|
|
701
|
+
},
|
|
702
|
+
keywords: {
|
|
703
|
+
type: "array",
|
|
704
|
+
items: {
|
|
705
|
+
type: "string"
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
extensions: {
|
|
709
|
+
type: "object",
|
|
710
|
+
description: "Client-specific manifest data keyed by reverse-domain extension namespace. Agent Plugins assigns no semantics to namespace object contents.",
|
|
711
|
+
additionalProperties: {
|
|
712
|
+
type: "object"
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
required: ["$schema", "name"],
|
|
717
|
+
additionalProperties: false
|
|
718
|
+
};
|
|
719
|
+
|
|
720
|
+
// ../../packages/core/src/topics/plugins.ts
|
|
721
|
+
var MANIFEST_SCHEMA_ID = plugin_schema_default.properties.$schema.const;
|
|
722
|
+
var MCP_SCHEMA_ID = mcp_schema_default.properties.$schema.const;
|
|
723
|
+
var MANIFEST_FIELDS = new Set(Object.keys(plugin_schema_default.properties));
|
|
724
|
+
var REMOTE_SERVERS = {
|
|
725
|
+
"streamable-http": mcp_schema_default.$defs.streamableHttpServer,
|
|
726
|
+
sse: mcp_schema_default.$defs.sseServer
|
|
727
|
+
};
|
|
728
|
+
function renderTopicPluginsPrompt(plugins) {
|
|
729
|
+
const skills = plugins.flatMap((plugin) => plugin.skills);
|
|
730
|
+
if (skills.length === 0)
|
|
731
|
+
return "";
|
|
732
|
+
return [
|
|
733
|
+
"## Skills",
|
|
734
|
+
"",
|
|
735
|
+
"Each skill below is a guide for one kind of task. When a skill's description fits what you are about to do, first open its SKILL.md with your file-read tool and follow it. Other files of a skill sit in its folder and are linked from its SKILL.md.",
|
|
736
|
+
"",
|
|
737
|
+
...skills.map((skill) => `- \`${skill.name}\`: ${skill.description} (file: ${skill.path})`)
|
|
738
|
+
].join(`
|
|
739
|
+
`);
|
|
740
|
+
}
|
|
741
|
+
|
|
527
742
|
// ../../packages/core/src/prompts/builders.ts
|
|
528
743
|
var PROMPTS_DIR = resolve2(PROJECT_ROOT, "src/prompts");
|
|
529
744
|
var SESSIONS_DIR = resolve2(PROMPTS_DIR, "sessions");
|
|
@@ -876,6 +1091,11 @@ function createPromptBuilders(host = {}) {
|
|
|
876
1091
|
## Topic-Specific Instructions
|
|
877
1092
|
${opts.description.trim()}`;
|
|
878
1093
|
}
|
|
1094
|
+
const plugins = renderTopicPluginsPrompt(opts.plugins ?? []);
|
|
1095
|
+
if (plugins)
|
|
1096
|
+
prompt += `
|
|
1097
|
+
|
|
1098
|
+
${plugins}`;
|
|
879
1099
|
if (sessionKind === "manager") {
|
|
880
1100
|
const managerTemplate = replaceVars(template(opts.surface === "otium" ? {
|
|
881
1101
|
kind: "surface-profile",
|
|
@@ -948,4 +1168,4 @@ export {
|
|
|
948
1168
|
loadAgentPrompt
|
|
949
1169
|
};
|
|
950
1170
|
|
|
951
|
-
//# debugId=
|
|
1171
|
+
//# debugId=CC4881F33766121764756E2164756E21
|