@marifold/core 0.65.0 → 0.67.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/AgentRunner.d.ts +6 -0
- package/dist/agent/AgentRunner.d.ts.map +1 -1
- package/dist/agent/AgentRunner.js +21 -6
- package/dist/agent/AgentRunner.js.map +1 -1
- package/dist/agent/RunWorkspace.d.ts +10 -0
- package/dist/agent/RunWorkspace.d.ts.map +1 -1
- package/dist/agent/RunWorkspace.js +19 -1
- package/dist/agent/RunWorkspace.js.map +1 -1
- package/dist/agent/tools/ReadFileTool.d.ts +7 -0
- package/dist/agent/tools/ReadFileTool.d.ts.map +1 -1
- package/dist/agent/tools/ReadFileTool.js +24 -2
- package/dist/agent/tools/ReadFileTool.js.map +1 -1
- package/dist/agent/tools/SkillAppTools.d.ts +90 -0
- package/dist/agent/tools/SkillAppTools.d.ts.map +1 -0
- package/dist/agent/tools/SkillAppTools.js +402 -0
- package/dist/agent/tools/SkillAppTools.js.map +1 -0
- package/dist/app/AppStore.d.ts +11 -1
- package/dist/app/AppStore.d.ts.map +1 -1
- package/dist/app/AppStore.js +110 -15
- package/dist/app/AppStore.js.map +1 -1
- package/dist/app/SkillAppCompiler.d.ts.map +1 -1
- package/dist/app/SkillAppCompiler.js +370 -44
- package/dist/app/SkillAppCompiler.js.map +1 -1
- package/dist/app/SkillAppDsl.d.ts +77 -4
- package/dist/app/SkillAppDsl.d.ts.map +1 -1
- package/dist/app/SkillAppDsl.js +53 -0
- package/dist/app/SkillAppDsl.js.map +1 -1
- package/dist/app/SkillAppInstanceRegistry.d.ts +23 -2
- package/dist/app/SkillAppInstanceRegistry.d.ts.map +1 -1
- package/dist/app/SkillAppInstanceRegistry.js +439 -11
- package/dist/app/SkillAppInstanceRegistry.js.map +1 -1
- package/dist/app/SkillAppResolver.d.ts +5 -2
- package/dist/app/SkillAppResolver.d.ts.map +1 -1
- package/dist/app/SkillAppResolver.js +66 -15
- package/dist/app/SkillAppResolver.js.map +1 -1
- package/dist/app/SkillAppSchema.d.ts +120 -9
- package/dist/app/SkillAppSchema.d.ts.map +1 -1
- package/dist/app/SkillAppSchema.js +2 -1
- package/dist/app/SkillAppSchema.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/dist/runtime/MarifoldRuntime.d.ts +14 -8
- package/dist/runtime/MarifoldRuntime.d.ts.map +1 -1
- package/dist/runtime/MarifoldRuntime.js +246 -30
- package/dist/runtime/MarifoldRuntime.js.map +1 -1
- package/dist/skill/BuiltInSkillAppBuilder.d.ts +10 -0
- package/dist/skill/BuiltInSkillAppBuilder.d.ts.map +1 -0
- package/dist/skill/BuiltInSkillAppBuilder.js +34 -0
- package/dist/skill/BuiltInSkillAppBuilder.js.map +1 -0
- package/dist/skill/BuiltInSkills.d.ts.map +1 -1
- package/dist/skill/BuiltInSkills.js +37 -0
- package/dist/skill/BuiltInSkills.js.map +1 -1
- package/dist/skill/SkillStore.d.ts +2 -2
- package/dist/skill/SkillStore.js +2 -2
- package/dist/skill/index.d.ts +1 -0
- package/dist/skill/index.d.ts.map +1 -1
- package/dist/skill/index.js +4 -1
- package/dist/skill/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarifoldRuntime.d.ts","sourceRoot":"","sources":["../../src/runtime/MarifoldRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsH,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEhK,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"MarifoldRuntime.d.ts","sourceRoot":"","sources":["../../src/runtime/MarifoldRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsH,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEhK,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AA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B,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,qBAAqB;IAmB7B,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,eAAe;CAcxB"}
|
|
@@ -50,6 +50,7 @@ const AskUserTool_1 = require("../agent/tools/AskUserTool");
|
|
|
50
50
|
const InspectAttachmentTool_1 = require("../agent/tools/InspectAttachmentTool");
|
|
51
51
|
const WriteFileTool_1 = require("../agent/tools/WriteFileTool");
|
|
52
52
|
const SkillManagementTool_1 = require("../agent/tools/SkillManagementTool");
|
|
53
|
+
const SkillAppTools_1 = require("../agent/tools/SkillAppTools");
|
|
53
54
|
const ToolRegistry_1 = require("../agent/ToolRegistry");
|
|
54
55
|
const ChatGptTokenRefresh_1 = require("../config/ChatGptTokenRefresh");
|
|
55
56
|
const XaiTokenRefresh_1 = require("../config/XaiTokenRefresh");
|
|
@@ -76,6 +77,7 @@ const SkillStore_1 = require("../skill/SkillStore");
|
|
|
76
77
|
const SkillInvocation_1 = require("../skill/SkillInvocation");
|
|
77
78
|
const BuiltInSkillManager_1 = require("../skill/BuiltInSkillManager");
|
|
78
79
|
const BuiltInSkills_1 = require("../skill/BuiltInSkills");
|
|
80
|
+
const BuiltInSkillAppBuilder_1 = require("../skill/BuiltInSkillAppBuilder");
|
|
79
81
|
const AppStore_1 = require("../app/AppStore");
|
|
80
82
|
const SkillAppResolver_1 = require("../app/SkillAppResolver");
|
|
81
83
|
const SkillAppInstanceRegistry_1 = require("../app/SkillAppInstanceRegistry");
|
|
@@ -671,15 +673,17 @@ class MarifoldRuntime {
|
|
|
671
673
|
toolMode: override.toolMode ?? global.toolMode,
|
|
672
674
|
};
|
|
673
675
|
}
|
|
674
|
-
createAgentRunner(profile, registry) {
|
|
676
|
+
createAgentRunner(profile, registry, agentConfigOverride, runtimeOptions = {}) {
|
|
675
677
|
return new AgentRunner_1.AgentRunner({
|
|
676
678
|
taskStore: this.taskStore,
|
|
677
679
|
registry: registry ?? this.createDefaultToolRegistry(profile),
|
|
678
|
-
agentConfig: this.resolveAgentConfigForProfile(profile),
|
|
680
|
+
agentConfig: agentConfigOverride ?? this.resolveAgentConfigForProfile(profile),
|
|
679
681
|
resolveSettings: request => this.resolveSettings(request),
|
|
680
682
|
prepareEngine: async (settings) => {
|
|
681
683
|
await this.refreshProviderCredentialsIfNeeded(settings.provider);
|
|
682
|
-
const searchResolution =
|
|
684
|
+
const searchResolution = runtimeOptions.webSearch === false
|
|
685
|
+
? { mode: 'unavailable', nativeStrategy: 'none' }
|
|
686
|
+
: this.resolveWebSearch(settings);
|
|
683
687
|
const webSearchMode = searchResolution.mode;
|
|
684
688
|
return {
|
|
685
689
|
// No engine-level session store: priest would otherwise persist the
|
|
@@ -712,9 +716,15 @@ class MarifoldRuntime {
|
|
|
712
716
|
.filter(t => t.role === 'user' || t.role === 'assistant')
|
|
713
717
|
.map(t => ({ role: t.role, content: t.content })),
|
|
714
718
|
resolveBuiltInInstructions: (objective, resolvedProfile) => {
|
|
719
|
+
const { config } = this.options.loadedConfig;
|
|
720
|
+
if ((0, BuiltInSkillAppBuilder_1.mentionsSkillApps)(objective)) {
|
|
721
|
+
return [(0, BuiltInSkillAppBuilder_1.buildSkillAppBuilderGuide)({
|
|
722
|
+
profile: resolvedProfile,
|
|
723
|
+
appsDir: config.paths.appsDir ?? (0, WorkspacePaths_1.defaultAppsDir)(),
|
|
724
|
+
})];
|
|
725
|
+
}
|
|
715
726
|
if (!(0, BuiltInSkillManager_1.mentionsSkills)(objective))
|
|
716
727
|
return [];
|
|
717
|
-
const { config } = this.options.loadedConfig;
|
|
718
728
|
return [(0, BuiltInSkillManager_1.buildSkillManagerGuide)({
|
|
719
729
|
profile: resolvedProfile,
|
|
720
730
|
profilesDir: config.paths.profilesDir,
|
|
@@ -722,12 +732,16 @@ class MarifoldRuntime {
|
|
|
722
732
|
})];
|
|
723
733
|
},
|
|
724
734
|
resolveReadOnlyFolders: resolvedProfile => {
|
|
735
|
+
if (runtimeOptions.readOnlyFolders)
|
|
736
|
+
return runtimeOptions.readOnlyFolders;
|
|
725
737
|
const { config } = this.options.loadedConfig;
|
|
726
738
|
return [
|
|
727
739
|
path.join(config.paths.profilesDir, resolvedProfile, 'skills'),
|
|
728
740
|
config.paths.skillsDir ?? (0, WorkspacePaths_1.defaultSkillsDir)(),
|
|
729
741
|
];
|
|
730
742
|
},
|
|
743
|
+
resolveReadOnlyFiles: () => runtimeOptions.readOnlyFiles ?? [],
|
|
744
|
+
allowExternalReadOnlyFolders: runtimeOptions.allowExternalReadOnlyFolders,
|
|
731
745
|
});
|
|
732
746
|
}
|
|
733
747
|
createDefaultToolRegistry(profile) {
|
|
@@ -748,6 +762,17 @@ class MarifoldRuntime {
|
|
|
748
762
|
globalDir: config.paths.skillsDir ?? (0, WorkspacePaths_1.defaultSkillsDir)(),
|
|
749
763
|
profileDir: path.join(config.paths.profilesDir, resolvedProfile, 'skills'),
|
|
750
764
|
}));
|
|
765
|
+
registry.register(new SkillAppTools_1.SkillAppContextTool({
|
|
766
|
+
activeProfile: resolvedProfile,
|
|
767
|
+
appsDir: config.paths.appsDir ?? (0, WorkspacePaths_1.defaultAppsDir)(),
|
|
768
|
+
listApps: () => this.listApps().map(definition => definition.app),
|
|
769
|
+
listProfiles: () => this.listProfiles(),
|
|
770
|
+
listSkills: profileName => this.listSkills(profileName),
|
|
771
|
+
}));
|
|
772
|
+
registry.register(new SkillAppTools_1.SkillAppManagementTool({
|
|
773
|
+
appsDir: config.paths.appsDir ?? (0, WorkspacePaths_1.defaultAppsDir)(),
|
|
774
|
+
createStore: appsDir => this.createAppStore(appsDir),
|
|
775
|
+
}));
|
|
751
776
|
// Marifold fallback web_search joins the registry when configured. Runs
|
|
752
777
|
// with provider-hosted search filter it out before advertising tools.
|
|
753
778
|
const webSearch = (0, ConfigSchema_1.resolveWebSearchConfig)(this.options.loadedConfig.config.webSearch);
|
|
@@ -808,9 +833,14 @@ class MarifoldRuntime {
|
|
|
808
833
|
removeSkill(name, profile, scope) {
|
|
809
834
|
return this.createSkillStore(profile).remove(name, scope);
|
|
810
835
|
}
|
|
811
|
-
createAppStore() {
|
|
836
|
+
createAppStore(directory) {
|
|
812
837
|
const { config } = this.options.loadedConfig;
|
|
813
|
-
return new AppStore_1.AppStore(config.paths.appsDir ?? (0, WorkspacePaths_1.defaultAppsDir)()
|
|
838
|
+
return new AppStore_1.AppStore(directory ?? config.paths.appsDir ?? (0, WorkspacePaths_1.defaultAppsDir)(), {
|
|
839
|
+
resolveProfileSkill: (profile, skillName) => {
|
|
840
|
+
this.profileResolver.load(profile);
|
|
841
|
+
return (0, BuiltInSkills_1.getBuiltInSkill)(skillName) ?? this.createSkillStore(profile).get(skillName);
|
|
842
|
+
},
|
|
843
|
+
});
|
|
814
844
|
}
|
|
815
845
|
listApps() {
|
|
816
846
|
return this.createAppStore().list();
|
|
@@ -818,36 +848,89 @@ class MarifoldRuntime {
|
|
|
818
848
|
getApp(name) {
|
|
819
849
|
return this.createAppStore().get(name);
|
|
820
850
|
}
|
|
821
|
-
/** Execute one
|
|
822
|
-
*
|
|
823
|
-
*
|
|
824
|
-
async runSkillAppOperation(appName, operationName, state, signal) {
|
|
851
|
+
/** Execute one statically compiled SkillApp operation. v1 operations remain
|
|
852
|
+
* profile-free; v2 profile operations load the referenced profile and may
|
|
853
|
+
* receive read-only memory plus instance-local history. */
|
|
854
|
+
async runSkillAppOperation(appName, operationName, state, signal, history, attachments, interactions) {
|
|
825
855
|
const startedAt = Date.now();
|
|
826
856
|
try {
|
|
827
857
|
const store = this.createAppStore();
|
|
828
858
|
const definition = store.require(appName);
|
|
829
859
|
const operation = (0, SkillAppResolver_1.resolveSkillAppOperation)(store, definition, operationName, state);
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
860
|
+
const declaredOperation = definition.operations.find(candidate => candidate.name === operationName);
|
|
861
|
+
let settings;
|
|
862
|
+
let text;
|
|
863
|
+
let usage;
|
|
864
|
+
let effects;
|
|
865
|
+
if (operation.profile) {
|
|
866
|
+
settings = this.resolveSettings({
|
|
867
|
+
profile: operation.profile.profile,
|
|
868
|
+
...(operation.profile.provider ? { provider: operation.profile.provider } : {}),
|
|
869
|
+
...(operation.profile.model ? { model: operation.profile.model } : {}),
|
|
870
|
+
...(operation.profile.think !== undefined ? { think: operation.profile.think } : {}),
|
|
871
|
+
});
|
|
872
|
+
const memory = this.memoryForRequest(settings.profile, operation.profile.memory, operation.prompt, settings.think);
|
|
873
|
+
const historyContext = operation.profile.history && history?.length
|
|
874
|
+
? (0, AgentHistory_1.buildHistoryContext)(history, 16_000)
|
|
875
|
+
: undefined;
|
|
876
|
+
const instructions = [
|
|
877
|
+
...operation.instructions,
|
|
878
|
+
...(historyContext ? [historyContext] : []),
|
|
879
|
+
];
|
|
880
|
+
const mode = operation.mode ?? settings.mode;
|
|
881
|
+
if (declaredOperation.interactive && mode !== 'agent') {
|
|
882
|
+
throw MarifoldError_1.MarifoldError.appInvalid(`Interactive SkillApp operation '${operationName}' must invoke an Agent Skill.`);
|
|
883
|
+
}
|
|
884
|
+
if (mode === 'agent') {
|
|
885
|
+
const run = await this.runProfileSkillAppAgent(appName, operation.operationName, settings, operation.prompt, instructions, memory, operation.skillDirectory, definition.permissions ?? [], attachments, signal, interactions, operation.name);
|
|
886
|
+
text = run.text;
|
|
887
|
+
usage = run.usage;
|
|
888
|
+
effects = run.effects;
|
|
889
|
+
}
|
|
890
|
+
else {
|
|
891
|
+
if (attachments?.some(attachment => attachment.kind === 'file')) {
|
|
892
|
+
throw MarifoldError_1.MarifoldError.appInvalid(`SkillApp operation '${operationName}' needs Agent mode to inspect non-image attachments.`);
|
|
893
|
+
}
|
|
894
|
+
await this.refreshProviderCredentialsIfNeeded(settings.provider);
|
|
895
|
+
const response = await this.createEngine(settings.provider, false).run({
|
|
896
|
+
config: this.toPriestConfig(settings),
|
|
897
|
+
profile: settings.profile,
|
|
898
|
+
prompt: operation.prompt,
|
|
899
|
+
context: instructions,
|
|
900
|
+
...(memory.length > 0 ? { memory } : {}),
|
|
901
|
+
...(attachments?.some(attachment => attachment.kind === 'image') ? {
|
|
902
|
+
images: attachments
|
|
903
|
+
.filter(attachment => attachment.kind === 'image')
|
|
904
|
+
.map(attachment => ({ data: attachment.data, mediaType: attachment.mediaType })),
|
|
905
|
+
} : {}),
|
|
906
|
+
}, signal ? { signal } : undefined);
|
|
907
|
+
text = requireSkillAppResponseText(response, settings);
|
|
908
|
+
usage = response.usage;
|
|
909
|
+
}
|
|
846
910
|
}
|
|
847
|
-
|
|
848
|
-
|
|
911
|
+
else {
|
|
912
|
+
if (!operation.model) {
|
|
913
|
+
throw MarifoldError_1.MarifoldError.appInvalid(`SkillApp operation '${operationName}' has no model.`);
|
|
914
|
+
}
|
|
915
|
+
settings = {
|
|
916
|
+
profile: `skillapp-${appName}`,
|
|
917
|
+
provider: operation.model.provider,
|
|
918
|
+
model: operation.model.model,
|
|
919
|
+
think: operation.model.think,
|
|
920
|
+
mode: 'chat',
|
|
921
|
+
};
|
|
922
|
+
await this.refreshProviderCredentialsIfNeeded(settings.provider);
|
|
923
|
+
const response = await this.createEngine(settings.provider, false, false).run({
|
|
924
|
+
config: this.toPriestConfig(settings),
|
|
925
|
+
profile: settings.profile,
|
|
926
|
+
prompt: operation.prompt,
|
|
927
|
+
context: operation.instructions,
|
|
928
|
+
}, signal ? { signal } : undefined);
|
|
929
|
+
text = requireSkillAppResponseText(response, settings);
|
|
930
|
+
usage = response.usage;
|
|
849
931
|
}
|
|
850
|
-
|
|
932
|
+
text = (0, MemoryControls_1.stripMemoryControls)(text).text;
|
|
933
|
+
text = operation.result.trim ? text.trim() : text;
|
|
851
934
|
return {
|
|
852
935
|
status: 'ok',
|
|
853
936
|
data: { text },
|
|
@@ -855,8 +938,9 @@ class MarifoldRuntime {
|
|
|
855
938
|
engine: settings.provider,
|
|
856
939
|
model: settings.model,
|
|
857
940
|
durationMs: Date.now() - startedAt,
|
|
858
|
-
...(
|
|
941
|
+
...(usage ? { usage } : {}),
|
|
859
942
|
},
|
|
943
|
+
...(effects && effects.length > 0 ? { effects } : {}),
|
|
860
944
|
};
|
|
861
945
|
}
|
|
862
946
|
catch (error) {
|
|
@@ -874,6 +958,129 @@ class MarifoldRuntime {
|
|
|
874
958
|
createSkillAppInstanceRegistry() {
|
|
875
959
|
return new SkillAppInstanceRegistry_1.SkillAppInstanceRegistry(this);
|
|
876
960
|
}
|
|
961
|
+
async runProfileSkillAppAgent(appName, operationName, settings, prompt, instructions, memory, skillDirectory, permissions = [], attachments = [], signal, interactions, skillName) {
|
|
962
|
+
const registry = new ToolRegistry_1.ToolRegistry();
|
|
963
|
+
if (interactions)
|
|
964
|
+
registry.register(new AskUserTool_1.AskUserTool());
|
|
965
|
+
if (attachments.length > 0) {
|
|
966
|
+
registry.register(new InspectAttachmentTool_1.InspectAttachmentTool());
|
|
967
|
+
registry.register(new ReadAttachmentTool_1.ReadAttachmentTool());
|
|
968
|
+
registry.register(new SearchAttachmentTool_1.SearchAttachmentTool());
|
|
969
|
+
}
|
|
970
|
+
if (skillDirectory || permissions.length > 0) {
|
|
971
|
+
registry.register(new ReadFileTool_1.ReadFileTool({ strictWorkspace: true }));
|
|
972
|
+
}
|
|
973
|
+
const effects = [];
|
|
974
|
+
if (skillName === 'skillapp-builder') {
|
|
975
|
+
const { config } = this.options.loadedConfig;
|
|
976
|
+
const appsDir = config.paths.appsDir ?? (0, WorkspacePaths_1.defaultAppsDir)();
|
|
977
|
+
registry.register(new SkillAppTools_1.SkillAppContextTool({
|
|
978
|
+
activeProfile: settings.profile,
|
|
979
|
+
appsDir,
|
|
980
|
+
listApps: () => this.listApps().map(definition => definition.app),
|
|
981
|
+
listProfiles: () => this.listProfiles(),
|
|
982
|
+
listSkills: profileName => this.listSkills(profileName),
|
|
983
|
+
}));
|
|
984
|
+
registry.register(new SkillAppTools_1.SkillAppManagementTool({
|
|
985
|
+
appsDir,
|
|
986
|
+
createStore: directory => this.createAppStore(directory),
|
|
987
|
+
onInstalled: effect => {
|
|
988
|
+
effects.push(effect);
|
|
989
|
+
interactions?.effectHandler?.(effect);
|
|
990
|
+
},
|
|
991
|
+
}));
|
|
992
|
+
}
|
|
993
|
+
const base = this.resolveAgentConfigForProfile(settings.profile);
|
|
994
|
+
const isolatedConfig = {
|
|
995
|
+
...base,
|
|
996
|
+
approval: {
|
|
997
|
+
read: 'allow',
|
|
998
|
+
write: interactions && skillName === 'skillapp-builder' ? 'ask' : 'deny',
|
|
999
|
+
shell: 'deny',
|
|
1000
|
+
network: 'deny',
|
|
1001
|
+
delegate: 'deny',
|
|
1002
|
+
},
|
|
1003
|
+
trustedFolders: [],
|
|
1004
|
+
};
|
|
1005
|
+
const runner = this.createAgentRunner(settings.profile, registry, isolatedConfig, {
|
|
1006
|
+
webSearch: false,
|
|
1007
|
+
readOnlyFolders: [
|
|
1008
|
+
...(skillDirectory ? [skillDirectory] : []),
|
|
1009
|
+
...permissions.filter(permission => permission.kind === 'folder').map(permission => permission.path),
|
|
1010
|
+
],
|
|
1011
|
+
readOnlyFiles: permissions
|
|
1012
|
+
.filter(permission => permission.kind === 'file')
|
|
1013
|
+
.map(permission => permission.path),
|
|
1014
|
+
allowExternalReadOnlyFolders: true,
|
|
1015
|
+
});
|
|
1016
|
+
const images = attachments
|
|
1017
|
+
.filter(attachment => attachment.kind === 'image')
|
|
1018
|
+
.map(attachment => ({ data: attachment.data, mediaType: attachment.mediaType }));
|
|
1019
|
+
const files = attachments
|
|
1020
|
+
.filter(attachment => attachment.kind === 'file')
|
|
1021
|
+
.map(attachment => ({
|
|
1022
|
+
name: attachment.name,
|
|
1023
|
+
mediaType: attachment.mediaType,
|
|
1024
|
+
data: attachment.data,
|
|
1025
|
+
...(attachment.inspectionText !== undefined ? { inspectionText: attachment.inspectionText } : {}),
|
|
1026
|
+
}));
|
|
1027
|
+
let finalText;
|
|
1028
|
+
let failure;
|
|
1029
|
+
let status;
|
|
1030
|
+
let terminalSummary;
|
|
1031
|
+
let lastBuilderValidationError;
|
|
1032
|
+
let usage;
|
|
1033
|
+
for await (const event of runner.run({
|
|
1034
|
+
objective: prompt,
|
|
1035
|
+
profile: settings.profile,
|
|
1036
|
+
provider: settings.provider,
|
|
1037
|
+
model: settings.model,
|
|
1038
|
+
think: settings.think,
|
|
1039
|
+
lean: true,
|
|
1040
|
+
instructions,
|
|
1041
|
+
...(images.length > 0 || files.length > 0 ? {
|
|
1042
|
+
images,
|
|
1043
|
+
files,
|
|
1044
|
+
} : {}),
|
|
1045
|
+
...(memory.length > 0 ? { memory } : {}),
|
|
1046
|
+
cwd: (0, WorkspacePaths_1.marifoldHome)(),
|
|
1047
|
+
tags: ['skillapp', appName, operationName],
|
|
1048
|
+
...(skillName === 'skillapp-builder' ? {
|
|
1049
|
+
maxIterations: Math.min(isolatedConfig.maxIterations, 8),
|
|
1050
|
+
} : {}),
|
|
1051
|
+
signal,
|
|
1052
|
+
...(interactions ? {
|
|
1053
|
+
approvalHandler: interactions.approvalHandler,
|
|
1054
|
+
userInputHandler: interactions.userInputHandler,
|
|
1055
|
+
} : {}),
|
|
1056
|
+
})) {
|
|
1057
|
+
if (event.type === 'text' && event.phase === 'final')
|
|
1058
|
+
finalText = event.text;
|
|
1059
|
+
if (event.type === 'error')
|
|
1060
|
+
failure = { code: event.code, message: event.message };
|
|
1061
|
+
if (event.type === 'tool_result' && event.tool === 'manage_skill_app' && event.isError) {
|
|
1062
|
+
lastBuilderValidationError = event.summary;
|
|
1063
|
+
}
|
|
1064
|
+
if (event.type === 'done') {
|
|
1065
|
+
status = event.status;
|
|
1066
|
+
terminalSummary = event.summary;
|
|
1067
|
+
usage = event.usage;
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
if (status !== 'completed' || finalText === undefined) {
|
|
1071
|
+
const terminalFailure = failure?.message
|
|
1072
|
+
?? terminalSummary
|
|
1073
|
+
?? `Profile Skill operation '${operationName}' did not produce a final response.`;
|
|
1074
|
+
throw MarifoldError_1.MarifoldError.providerError(lastBuilderValidationError
|
|
1075
|
+
? `${terminalFailure} Last builder error: ${lastBuilderValidationError}`
|
|
1076
|
+
: terminalFailure, settings.provider, settings.model, failure?.code ?? 'APP_SKILL_FAILED');
|
|
1077
|
+
}
|
|
1078
|
+
return {
|
|
1079
|
+
text: finalText,
|
|
1080
|
+
...(usage ? { usage } : {}),
|
|
1081
|
+
...(effects.length > 0 ? { effects } : {}),
|
|
1082
|
+
};
|
|
1083
|
+
}
|
|
877
1084
|
createSchedule(input) {
|
|
878
1085
|
return this.scheduleStore.create(input);
|
|
879
1086
|
}
|
|
@@ -1241,6 +1448,15 @@ class MarifoldRuntime {
|
|
|
1241
1448
|
}
|
|
1242
1449
|
}
|
|
1243
1450
|
exports.MarifoldRuntime = MarifoldRuntime;
|
|
1451
|
+
function requireSkillAppResponseText(response, settings) {
|
|
1452
|
+
if (response.error) {
|
|
1453
|
+
throw MarifoldError_1.MarifoldError.providerError(response.error.message, settings.provider, settings.model, response.error.code);
|
|
1454
|
+
}
|
|
1455
|
+
if (response.text === undefined) {
|
|
1456
|
+
throw MarifoldError_1.MarifoldError.providerError(`Provider '${settings.provider}' returned no text for model '${settings.model}'.`, settings.provider, settings.model, 'EMPTY_RESPONSE');
|
|
1457
|
+
}
|
|
1458
|
+
return response.text;
|
|
1459
|
+
}
|
|
1244
1460
|
function completedResponseMetrics(mode, settings, startedAt, startedAtMs, usage) {
|
|
1245
1461
|
const finishedAtMs = Date.now();
|
|
1246
1462
|
return {
|