oneie 1.2.1 → 1.2.3
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/bin/agent-integration.js +499 -0
- package/bin/cli-animations.js +420 -0
- package/bin/mission-system.js +612 -0
- package/bin/one-installer.js +776 -0
- package/bin/story-system.js +478 -0
- package/bin/task-system.js +717 -0
- package/bin/template-generator.js +661 -0
- package/one/tools/agent-installer.js +575 -0
- package/one/tools/lib/dependency-resolver.js +179 -0
- package/one/tools/lib/template-processor.js +748 -0
- package/one/tools/lib/yaml-utils.js +29 -0
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for YAML extraction from agent files
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Extract YAML content from agent markdown files
|
|
7
|
+
* @param {string} agentContent - The full content of the agent file
|
|
8
|
+
* @param {boolean} cleanCommands - Whether to clean command descriptions (default: false)
|
|
9
|
+
* @returns {string|null} - The extracted YAML content or null if not found
|
|
10
|
+
*/
|
|
11
|
+
function extractYamlFromAgent(agentContent, cleanCommands = false) {
|
|
12
|
+
// Remove carriage returns and match YAML block
|
|
13
|
+
const yamlMatch = agentContent.replace(/\r/g, "").match(/```ya?ml\n([\s\S]*?)\n```/);
|
|
14
|
+
if (!yamlMatch) return null;
|
|
15
|
+
|
|
16
|
+
let yamlContent = yamlMatch[1].trim();
|
|
17
|
+
|
|
18
|
+
// Clean up command descriptions if requested
|
|
19
|
+
// Converts "- command - description" to just "- command"
|
|
20
|
+
if (cleanCommands) {
|
|
21
|
+
yamlContent = yamlContent.replace(/^(\s*-)(\s*"[^"]+")(\s*-\s*.*)$/gm, '$1$2');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return yamlContent;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
extractYamlFromAgent
|
|
29
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oneie",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "🤝 ONE Personal Collaborative Intelligence - Creates personalized AI workspace from your me.md profile. Simple: npx oneie → edit me.md → generate personalized agents, workflows & missions. From students to enterprises, ONE adapts to your context.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "one/tools/one-cli.js",
|