@eclipse-docks/extension-ai-system 0.8.4 → 0.8.7
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/api.d.ts +1 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +2 -87
- package/dist/{cognitive-extension-CvP05Bw_.js → cognitive-extension-B3Lnw-ek.js} +3 -2
- package/dist/{cognitive-extension-CvP05Bw_.js.map → cognitive-extension-B3Lnw-ek.js.map} +1 -1
- package/dist/cognitive-extension.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/runtime/app-context-enhancer.d.ts +5 -0
- package/dist/runtime/app-context-enhancer.d.ts.map +1 -0
- package/dist/runtime/app-context-summary.d.ts +5 -0
- package/dist/runtime/app-context-summary.d.ts.map +1 -0
- package/dist/runtime/cognitive-runtime.d.ts.map +1 -1
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/skills.d.ts +2 -0
- package/dist/runtime/skills.d.ts.map +1 -1
- package/dist/runtime/specialists/index.d.ts +1 -0
- package/dist/runtime/specialists/index.d.ts.map +1 -1
- package/dist/{runtime-DVzLyx8h.js → runtime-BjIW4lIh.js} +205 -18
- package/dist/runtime-BjIW4lIh.js.map +1 -0
- package/package.json +1 -1
- package/dist/api.js.map +0 -1
- package/dist/runtime-DVzLyx8h.js.map +0 -1
package/dist/api.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { cognitiveRuntime, CognitiveRuntime, TOPIC, AI_VIEW_NAME, AI_SETTINGS_KEY, AI_SETTINGS_EDITOR_ID, OPEN_AI_SETTINGS_COMMAND, defaultProvidersSettings, fetchOpenAICompatibleModels, listConfiguredModelIds, loadModelsCatalog, parseModelIds, OpenAICompatibleProvider, type ChatMessage, type MessagePart, type PromptAttachment, type SessionAttachment, type CognitiveSession, type Checkpoint, type ModelPolicy, type EffortLevel, type OptimizeFor, type SpecialistRole, type PermissionAction, type ToolApprovalMode, type TokenUsage, type EmotionalState, type ProviderConfig, type ProvidersSettings, type RemoteModelInfo, type ModelProvider, type StreamParams, type StreamChunk, type ProviderChatMessage, type SystemPromptEnhancer, type AgentSkill, type ResolvedSkill, type SkillContribution, type SkillLoadResult, type SkillRelevanceContext, SYSTEM_SKILLS, parseSkillMarkdown, formatSkillForPrompt, formatSkillsPromptSection, registerSkillMarkdown, registerSkillCommands, listSkillContributions, resolveSkill, resolveSkillBody, selectRelevantSkills, isSkillContribution, } from './runtime';
|
|
1
|
+
export { cognitiveRuntime, CognitiveRuntime, TOPIC, AI_VIEW_NAME, AI_SETTINGS_KEY, AI_SETTINGS_EDITOR_ID, OPEN_AI_SETTINGS_COMMAND, defaultProvidersSettings, fetchOpenAICompatibleModels, listConfiguredModelIds, loadModelsCatalog, parseModelIds, OpenAICompatibleProvider, type ChatMessage, type MessagePart, type PromptAttachment, type SessionAttachment, type CognitiveSession, type Checkpoint, type ModelPolicy, type EffortLevel, type OptimizeFor, type SpecialistRole, type PermissionAction, type ToolApprovalMode, type TokenUsage, type EmotionalState, type ProviderConfig, type ProvidersSettings, type RemoteModelInfo, type ModelProvider, type StreamParams, type StreamChunk, type ProviderChatMessage, type SystemPromptEnhancer, type AgentSkill, type ResolvedSkill, type SkillContribution, type SkillLoadResult, type SkillRelevanceContext, SYSTEM_SKILLS, parseSkillMarkdown, formatSkillForPrompt, formatSkillsPromptSection, registerSkillMarkdown, registerSkillCommands, listSkillContributions, resolveSkill, resolveSkillBody, selectRelevantSkills, isSkillContribution, appContextPromptEnhancer, summarizeExecutionContext, formatExecutionContextForPrompt, } from './runtime';
|
|
2
2
|
//# sourceMappingURL=api.d.ts.map
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,EACL,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,EACb,wBAAwB,EACxB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,EACL,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,EACb,wBAAwB,EACxB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,+BAA+B,GAChC,MAAM,WAAW,CAAC"}
|
package/dist/api.js
CHANGED
|
@@ -1,87 +1,2 @@
|
|
|
1
|
-
import { D as
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Catalog-only prompt section. The model loads full skill bodies via skills.load.
|
|
5
|
-
*/
|
|
6
|
-
function formatSkillsPromptSection(skills) {
|
|
7
|
-
if (!skills.length) return "";
|
|
8
|
-
return ["Available skills (call skills.load with the skill name to load full instructions before relying on them):", skills.map((skill) => `- ${skill.name}: ${(skill.description ?? "").trim() || skill.label}`).join("\n")].join("\n");
|
|
9
|
-
}
|
|
10
|
-
/** @deprecated Prefer skills.load; kept for tests/helpers that still filter by goal. */
|
|
11
|
-
function selectRelevantSkills(skills, ctx) {
|
|
12
|
-
return skills.filter((skill) => {
|
|
13
|
-
if (skill.relevant) return skill.relevant(ctx);
|
|
14
|
-
return skillMatchesGoal(skill, ctx.goal);
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
var STOP_WORDS = /* @__PURE__ */ new Set([
|
|
18
|
-
"that",
|
|
19
|
-
"this",
|
|
20
|
-
"with",
|
|
21
|
-
"from",
|
|
22
|
-
"your",
|
|
23
|
-
"have",
|
|
24
|
-
"when",
|
|
25
|
-
"into",
|
|
26
|
-
"call",
|
|
27
|
-
"file",
|
|
28
|
-
"files",
|
|
29
|
-
"default",
|
|
30
|
-
"export",
|
|
31
|
-
"write",
|
|
32
|
-
"using",
|
|
33
|
-
"such",
|
|
34
|
-
"does",
|
|
35
|
-
"send",
|
|
36
|
-
"open",
|
|
37
|
-
"name",
|
|
38
|
-
"they",
|
|
39
|
-
"them",
|
|
40
|
-
"then",
|
|
41
|
-
"than",
|
|
42
|
-
"also",
|
|
43
|
-
"only",
|
|
44
|
-
"over",
|
|
45
|
-
"under",
|
|
46
|
-
"about",
|
|
47
|
-
"after",
|
|
48
|
-
"before",
|
|
49
|
-
"other",
|
|
50
|
-
"which",
|
|
51
|
-
"where",
|
|
52
|
-
"whose",
|
|
53
|
-
"their",
|
|
54
|
-
"there",
|
|
55
|
-
"these",
|
|
56
|
-
"those",
|
|
57
|
-
"and",
|
|
58
|
-
"for",
|
|
59
|
-
"the",
|
|
60
|
-
"a",
|
|
61
|
-
"an",
|
|
62
|
-
"to",
|
|
63
|
-
"of",
|
|
64
|
-
"in",
|
|
65
|
-
"on",
|
|
66
|
-
"or",
|
|
67
|
-
"by",
|
|
68
|
-
"is",
|
|
69
|
-
"are",
|
|
70
|
-
"be",
|
|
71
|
-
"as",
|
|
72
|
-
"at",
|
|
73
|
-
"it",
|
|
74
|
-
"do",
|
|
75
|
-
"not"
|
|
76
|
-
]);
|
|
77
|
-
function skillMatchesGoal(skill, goal) {
|
|
78
|
-
const hay = goal.toLowerCase();
|
|
79
|
-
if (!hay.trim()) return false;
|
|
80
|
-
const tokens = `${skill.name} ${skill.label ?? ""} ${skill.description ?? ""}`.toLowerCase().split(/[^a-z0-9._-]+/).filter((token) => token.length >= 4 && !STOP_WORDS.has(token));
|
|
81
|
-
if (!tokens.length) return false;
|
|
82
|
-
return tokens.some((token) => hay.includes(token));
|
|
83
|
-
}
|
|
84
|
-
//#endregion
|
|
85
|
-
export { AI_SETTINGS_EDITOR_ID, AI_SETTINGS_KEY, AI_VIEW_NAME, CognitiveRuntime, OPEN_AI_SETTINGS_COMMAND, OpenAICompatibleProvider, SYSTEM_SKILLS, TOPIC, cognitiveRuntime, defaultProvidersSettings, fetchOpenAICompatibleModels, formatSkillForPrompt, formatSkillsPromptSection, isSkillContribution, listConfiguredModelIds, listSkillContributions, loadModelsCatalog, parseModelIds, parseSkillMarkdown, registerSkillCommands, registerSkillMarkdown, resolveSkill, resolveSkillBody, selectRelevantSkills };
|
|
86
|
-
|
|
87
|
-
//# sourceMappingURL=api.js.map
|
|
1
|
+
import { A as AI_SETTINGS_EDITOR_ID, C as OpenAICompatibleProvider, D as parseModelIds, E as listConfiguredModelIds, M as AI_VIEW_NAME, N as OPEN_AI_SETTINGS_COMMAND, P as TOPIC, T as defaultProvidersSettings, a as CognitiveRuntime, c as listSkillContributions, d as formatSkillsPromptSection, f as selectRelevantSkills, g as parseSkillMarkdown, h as formatSkillForPrompt, i as registerSkillCommands, j as AI_SETTINGS_KEY, k as loadModelsCatalog, l as registerSkillMarkdown, m as resolveSkillBody, n as formatExecutionContextForPrompt, o as cognitiveRuntime, p as resolveSkill, r as summarizeExecutionContext, s as SYSTEM_SKILLS, t as appContextPromptEnhancer, u as isSkillContribution, w as fetchOpenAICompatibleModels } from "./runtime-BjIW4lIh.js";
|
|
2
|
+
export { AI_SETTINGS_EDITOR_ID, AI_SETTINGS_KEY, AI_VIEW_NAME, CognitiveRuntime, OPEN_AI_SETTINGS_COMMAND, OpenAICompatibleProvider, SYSTEM_SKILLS, TOPIC, appContextPromptEnhancer, cognitiveRuntime, defaultProvidersSettings, fetchOpenAICompatibleModels, formatExecutionContextForPrompt, formatSkillForPrompt, formatSkillsPromptSection, isSkillContribution, listConfiguredModelIds, listSkillContributions, loadModelsCatalog, parseModelIds, parseSkillMarkdown, registerSkillCommands, registerSkillMarkdown, resolveSkill, resolveSkillBody, selectRelevantSkills, summarizeExecutionContext };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as AI_SETTINGS_EDITOR_ID, D as parseModelIds, M as AI_VIEW_NAME, N as OPEN_AI_SETTINGS_COMMAND, O as detectEffortCapability, P as TOPIC, S as readPromptAttachmentFromFile, T as defaultProvidersSettings, _ as estimateSessionContextUsage, b as formatTokenCount, i as registerSkillCommands, j as AI_SETTINGS_KEY, o as cognitiveRuntime, t as appContextPromptEnhancer, v as formatBucketDetail, w as fetchOpenAICompatibleModels, x as ATTACHMENT_FILE_ACCEPT, y as formatContextPercent } from "./runtime-BjIW4lIh.js";
|
|
2
2
|
import { DocksPart, File as File$1, FileContentType, SIDEBAR_AUXILIARY, confirmDialog, contributionRegistry, editorRegistry, filebrowserDialog, parseMarkdownHtml, registerAll, rootContext, toastError, toastInfo, workspaceService } from "@eclipse-docks/core";
|
|
3
3
|
import { css, customElement, html, nothing, property, query, state, unsafeHTML } from "@eclipse-docks/core/externals/lit";
|
|
4
4
|
import "@eclipse-docks/core/externals/webawesome";
|
|
@@ -2559,6 +2559,7 @@ function uniqueProviderId(existing) {
|
|
|
2559
2559
|
//#region src/cognitive-extension.ts
|
|
2560
2560
|
cognitiveRuntime.start();
|
|
2561
2561
|
registerSkillCommands();
|
|
2562
|
+
cognitiveRuntime.addSystemPromptEnhancer(appContextPromptEnhancer);
|
|
2562
2563
|
rootContext.put("cognitiveRuntime", cognitiveRuntime);
|
|
2563
2564
|
contributionRegistry.registerContribution(SIDEBAR_AUXILIARY, {
|
|
2564
2565
|
name: AI_VIEW_NAME,
|
|
@@ -2597,4 +2598,4 @@ registerAll({
|
|
|
2597
2598
|
});
|
|
2598
2599
|
//#endregion
|
|
2599
2600
|
|
|
2600
|
-
//# sourceMappingURL=cognitive-extension-
|
|
2601
|
+
//# sourceMappingURL=cognitive-extension-B3Lnw-ek.js.map
|