fraim-framework 2.0.87 → 2.0.88
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/README.md +30 -0
- package/dist/src/cli/commands/add-provider.js +16 -6
- package/dist/src/cli/commands/init-project.js +103 -1
- package/dist/src/cli/commands/login.js +84 -0
- package/dist/src/cli/commands/setup.js +135 -13
- package/dist/src/cli/fraim.js +2 -0
- package/dist/src/cli/internal/device-flow-service.js +83 -0
- package/dist/src/cli/mcp/mcp-server-registry.js +11 -10
- package/dist/src/cli/providers/local-provider-registry.js +22 -1
- package/dist/src/cli/services/device-flow-service.js +83 -0
- package/dist/src/cli/setup/provider-prompts.js +39 -0
- package/dist/src/cli/utils/remote-sync.js +72 -32
- package/dist/src/core/ai-mentor.js +248 -0
- package/dist/src/core/utils/git-utils.js +6 -6
- package/dist/src/core/utils/include-resolver.js +45 -0
- package/dist/src/core/utils/inheritance-parser.js +154 -16
- package/dist/src/core/utils/local-registry-resolver.js +326 -22
- package/dist/src/core/utils/server-startup.js +34 -0
- package/dist/src/core/utils/stub-generator.js +34 -27
- package/dist/src/core/utils/workflow-parser.js +32 -2
- package/dist/src/local-mcp-server/stdio-server.js +240 -284
- package/index.js +26 -5
- package/package.json +14 -5
|
@@ -56,6 +56,10 @@ class WorkflowParser {
|
|
|
56
56
|
// Extract Phases (id -> content)
|
|
57
57
|
const phases = new Map();
|
|
58
58
|
const phaseSections = restOfContent.split(/^##\s+Phase:\s+/m);
|
|
59
|
+
// Ensure metadata has a phases object
|
|
60
|
+
if (!metadata.phases) {
|
|
61
|
+
metadata.phases = {};
|
|
62
|
+
}
|
|
59
63
|
// Skip the first part (empty or overview overlap)
|
|
60
64
|
for (let i = 1; i < phaseSections.length; i++) {
|
|
61
65
|
const section = phaseSections[i];
|
|
@@ -70,7 +74,8 @@ class WorkflowParser {
|
|
|
70
74
|
metadata,
|
|
71
75
|
overview,
|
|
72
76
|
phases,
|
|
73
|
-
isSimple: false
|
|
77
|
+
isSimple: false,
|
|
78
|
+
path: filePath
|
|
74
79
|
};
|
|
75
80
|
}
|
|
76
81
|
/**
|
|
@@ -88,9 +93,34 @@ class WorkflowParser {
|
|
|
88
93
|
metadata,
|
|
89
94
|
overview: content.trim(),
|
|
90
95
|
phases: new Map(),
|
|
91
|
-
isSimple: true
|
|
96
|
+
isSimple: true,
|
|
97
|
+
path: filePath
|
|
92
98
|
};
|
|
93
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Parse workflow content from a string
|
|
102
|
+
*/
|
|
103
|
+
static parseContent(content, name, path) {
|
|
104
|
+
// Strip optional UTF-8 BOM
|
|
105
|
+
if (content.charCodeAt(0) === 0xfeff) {
|
|
106
|
+
content = content.slice(1);
|
|
107
|
+
}
|
|
108
|
+
// Try to extract JSON Metadata (frontmatter)
|
|
109
|
+
const metadataMatch = content.match(/^---\r?\n([\s\S]+?)\r?\n---/);
|
|
110
|
+
if (metadataMatch) {
|
|
111
|
+
return this.parsePhaseBasedWorkflow(path || `content:${name}`, content, metadataMatch);
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
return this.parseSimpleWorkflow(path || `content:${name}`, content);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Get just the overview from content
|
|
119
|
+
*/
|
|
120
|
+
static getOverviewFromContent(content, name) {
|
|
121
|
+
const wf = this.parseContent(content, name);
|
|
122
|
+
return wf ? wf.overview : null;
|
|
123
|
+
}
|
|
94
124
|
/**
|
|
95
125
|
* Get just the overview for an agent starting a workflow
|
|
96
126
|
*/
|