@lapis-notes/ai 0.1.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/CHANGELOG.md +6 -0
- package/LICENSE.md +8 -0
- package/README.md +20 -0
- package/dist/ai-plugin.d.ts +88 -0
- package/dist/ai-plugin.js +742 -0
- package/dist/bootstrap/build.d.ts +15 -0
- package/dist/bootstrap/build.js +28 -0
- package/dist/bootstrap/folder-instructions.d.ts +4 -0
- package/dist/bootstrap/folder-instructions.js +49 -0
- package/dist/bootstrap/format.d.ts +2 -0
- package/dist/bootstrap/format.js +46 -0
- package/dist/bootstrap/instructions.d.ts +1 -0
- package/dist/bootstrap/instructions.js +8 -0
- package/dist/bootstrap/types.d.ts +36 -0
- package/dist/bootstrap/types.js +3 -0
- package/dist/catalog/ai-catalog-panel.svelte +742 -0
- package/dist/catalog/ai-catalog-panel.svelte.d.ts +13 -0
- package/dist/catalog/ai-catalog-view-type.d.ts +1 -0
- package/dist/catalog/ai-catalog-view-type.js +1 -0
- package/dist/catalog/ai-catalog-view.d.ts +22 -0
- package/dist/catalog/ai-catalog-view.js +48 -0
- package/dist/catalog/filter.d.ts +3 -0
- package/dist/catalog/filter.js +24 -0
- package/dist/catalog/inventory.d.ts +21 -0
- package/dist/catalog/inventory.js +255 -0
- package/dist/catalog/tree.d.ts +12 -0
- package/dist/catalog/tree.js +60 -0
- package/dist/catalog/types.d.ts +44 -0
- package/dist/catalog/types.js +1 -0
- package/dist/chat/ai-approval-card.svelte +54 -0
- package/dist/chat/ai-approval-card.svelte.d.ts +9 -0
- package/dist/chat/ai-chat-panel.svelte +1288 -0
- package/dist/chat/ai-chat-panel.svelte.d.ts +50 -0
- package/dist/chat/ai-inventory-result.css +55 -0
- package/dist/chat/ai-inventory-result.svelte +63 -0
- package/dist/chat/ai-inventory-result.svelte.d.ts +5 -0
- package/dist/chat/ai-question-card.svelte +132 -0
- package/dist/chat/ai-question-card.svelte.d.ts +9 -0
- package/dist/chat/ai-view-bootstrap.d.ts +13 -0
- package/dist/chat/ai-view-bootstrap.js +86 -0
- package/dist/chat/ai-view-panel.svelte +89 -0
- package/dist/chat/ai-view-panel.svelte.d.ts +13 -0
- package/dist/chat/ai-view-type.d.ts +1 -0
- package/dist/chat/ai-view-type.js +1 -0
- package/dist/chat/ai-view.d.ts +60 -0
- package/dist/chat/ai-view.js +121 -0
- package/dist/chat/chat-controller.svelte.d.ts +82 -0
- package/dist/chat/chat-controller.svelte.js +1926 -0
- package/dist/chat/chat-items.d.ts +88 -0
- package/dist/chat/chat-items.js +9 -0
- package/dist/chat/chat-mentions.d.ts +15 -0
- package/dist/chat/chat-mentions.js +77 -0
- package/dist/chat/chat-result-views.d.ts +5 -0
- package/dist/chat/chat-result-views.js +15 -0
- package/dist/chat/chat-session.d.ts +28 -0
- package/dist/chat/chat-session.js +50 -0
- package/dist/chat/chat-status.d.ts +1 -0
- package/dist/chat/chat-status.js +3 -0
- package/dist/chat/chat-time.d.ts +18 -0
- package/dist/chat/chat-time.js +90 -0
- package/dist/chat/chat-tool-display.d.ts +17 -0
- package/dist/chat/chat-tool-display.js +213 -0
- package/dist/chat/chat-tool-identity.d.ts +4 -0
- package/dist/chat/chat-tool-identity.js +42 -0
- package/dist/chat/chat-trace.d.ts +6 -0
- package/dist/chat/chat-trace.js +256 -0
- package/dist/chat/live-runtime-unavailable.d.ts +1 -0
- package/dist/chat/live-runtime-unavailable.js +1 -0
- package/dist/commands/agent.d.ts +8 -0
- package/dist/commands/agent.js +38 -0
- package/dist/commands/catalog.d.ts +18 -0
- package/dist/commands/catalog.js +115 -0
- package/dist/commands/discovery.d.ts +36 -0
- package/dist/commands/discovery.js +151 -0
- package/dist/commands/groups.d.ts +16 -0
- package/dist/commands/groups.js +121 -0
- package/dist/commands/inspect.d.ts +18 -0
- package/dist/commands/inspect.js +29 -0
- package/dist/commands/markdown.d.ts +21 -0
- package/dist/commands/markdown.js +117 -0
- package/dist/commands/parser.d.ts +4 -0
- package/dist/commands/parser.js +24 -0
- package/dist/commands/reserved.d.ts +4 -0
- package/dist/commands/reserved.js +107 -0
- package/dist/commands/router.d.ts +17 -0
- package/dist/commands/router.js +170 -0
- package/dist/commands/seed.d.ts +4 -0
- package/dist/commands/seed.js +8 -0
- package/dist/commands/types.d.ts +54 -0
- package/dist/commands/types.js +1 -0
- package/dist/commands/user-agents-node.d.ts +3 -0
- package/dist/commands/user-agents-node.js +52 -0
- package/dist/commands/user-agents.d.ts +22 -0
- package/dist/commands/user-agents.js +40 -0
- package/dist/conversations/approval-grants.d.ts +20 -0
- package/dist/conversations/approval-grants.js +75 -0
- package/dist/conversations/binding-state.d.ts +6 -0
- package/dist/conversations/binding-state.js +35 -0
- package/dist/conversations/context-handoff.d.ts +25 -0
- package/dist/conversations/context-handoff.js +207 -0
- package/dist/conversations/conversation-index-coordinator.d.ts +18 -0
- package/dist/conversations/conversation-index-coordinator.js +81 -0
- package/dist/conversations/conversation-index.d.ts +16 -0
- package/dist/conversations/conversation-index.js +125 -0
- package/dist/conversations/conversation-locator.d.ts +2 -0
- package/dist/conversations/conversation-locator.js +20 -0
- package/dist/conversations/conversation-palette.d.ts +18 -0
- package/dist/conversations/conversation-palette.js +29 -0
- package/dist/conversations/conversation-repository.d.ts +39 -0
- package/dist/conversations/conversation-repository.js +213 -0
- package/dist/conversations/handoff-summary.d.ts +48 -0
- package/dist/conversations/handoff-summary.js +269 -0
- package/dist/conversations/hashes.d.ts +5 -0
- package/dist/conversations/hashes.js +40 -0
- package/dist/conversations/history-creation-scope.d.ts +12 -0
- package/dist/conversations/history-creation-scope.js +44 -0
- package/dist/conversations/jsonl.d.ts +10 -0
- package/dist/conversations/jsonl.js +41 -0
- package/dist/conversations/memory-transcript-store.d.ts +15 -0
- package/dist/conversations/memory-transcript-store.js +119 -0
- package/dist/conversations/paths.d.ts +14 -0
- package/dist/conversations/paths.js +92 -0
- package/dist/conversations/redaction.d.ts +13 -0
- package/dist/conversations/redaction.js +94 -0
- package/dist/conversations/reveal-scope.d.ts +3 -0
- package/dist/conversations/reveal-scope.js +8 -0
- package/dist/conversations/scope-resolver.d.ts +11 -0
- package/dist/conversations/scope-resolver.js +18 -0
- package/dist/conversations/scope-tree.d.ts +10 -0
- package/dist/conversations/scope-tree.js +71 -0
- package/dist/conversations/transcript-projection.d.ts +9 -0
- package/dist/conversations/transcript-projection.js +409 -0
- package/dist/conversations/transcript-store.d.ts +24 -0
- package/dist/conversations/transcript-store.js +27 -0
- package/dist/conversations/types.d.ts +224 -0
- package/dist/conversations/types.js +12 -0
- package/dist/conversations/validation.d.ts +4 -0
- package/dist/conversations/validation.js +383 -0
- package/dist/conversations/vault-transcript-store.d.ts +22 -0
- package/dist/conversations/vault-transcript-store.js +219 -0
- package/dist/core/event-queue.d.ts +6 -0
- package/dist/core/event-queue.js +39 -0
- package/dist/core/types.d.ts +241 -0
- package/dist/core/types.js +50 -0
- package/dist/history/ai-history-panel.svelte +937 -0
- package/dist/history/ai-history-panel.svelte.d.ts +17 -0
- package/dist/history/ai-history-view-type.d.ts +1 -0
- package/dist/history/ai-history-view-type.js +1 -0
- package/dist/history/ai-history-view.d.ts +26 -0
- package/dist/history/ai-history-view.js +51 -0
- package/dist/history/conversation-history-tree.d.ts +15 -0
- package/dist/history/conversation-history-tree.js +71 -0
- package/dist/host/agent-workspace.d.ts +6 -0
- package/dist/host/agent-workspace.js +16 -0
- package/dist/host/create-host-runtimes.d.ts +2 -0
- package/dist/host/create-host-runtimes.js +14 -0
- package/dist/host/desktop-process-host.d.ts +6 -0
- package/dist/host/desktop-process-host.js +74 -0
- package/dist/host/host-runtime-availability.d.ts +1 -0
- package/dist/host/host-runtime-availability.js +3 -0
- package/dist/host/process-host.d.ts +31 -0
- package/dist/host/process-host.js +6 -0
- package/dist/index.d.ts +69 -0
- package/dist/index.js +49 -0
- package/dist/jsonl/ai-jsonl-preview.d.ts +27 -0
- package/dist/jsonl/ai-jsonl-preview.js +68 -0
- package/dist/jsonl/ai-jsonl-view-type.d.ts +1 -0
- package/dist/jsonl/ai-jsonl-view-type.js +1 -0
- package/dist/jsonl/ai-jsonl-view.d.ts +16 -0
- package/dist/jsonl/ai-jsonl-view.js +57 -0
- package/dist/jsonl/ai-jsonl-view.svelte +260 -0
- package/dist/jsonl/ai-jsonl-view.svelte.d.ts +9 -0
- package/dist/memory/candidate-extractor.d.ts +25 -0
- package/dist/memory/candidate-extractor.js +191 -0
- package/dist/memory/forget-confirmation.d.ts +3 -0
- package/dist/memory/forget-confirmation.js +45 -0
- package/dist/memory/hashes.d.ts +5 -0
- package/dist/memory/hashes.js +37 -0
- package/dist/memory/memory-ingestion-coordinator.d.ts +19 -0
- package/dist/memory/memory-ingestion-coordinator.js +108 -0
- package/dist/memory/memory-record-store.d.ts +62 -0
- package/dist/memory/memory-record-store.js +369 -0
- package/dist/memory/memory-scheduler.d.ts +21 -0
- package/dist/memory/memory-scheduler.js +143 -0
- package/dist/memory/memory-tools.d.ts +61 -0
- package/dist/memory/memory-tools.js +99 -0
- package/dist/memory/native-memory-service.d.ts +72 -0
- package/dist/memory/native-memory-service.js +1256 -0
- package/dist/memory/paths.d.ts +13 -0
- package/dist/memory/paths.js +60 -0
- package/dist/memory/runtime-consolidation-provider.d.ts +18 -0
- package/dist/memory/runtime-consolidation-provider.js +154 -0
- package/dist/memory/types.d.ts +139 -0
- package/dist/memory/types.js +1 -0
- package/dist/providers/acp-model-provider.d.ts +11 -0
- package/dist/providers/acp-model-provider.js +99 -0
- package/dist/providers/codex-model-catalog.d.ts +7 -0
- package/dist/providers/codex-model-catalog.js +179 -0
- package/dist/providers/codex-model-provider.d.ts +12 -0
- package/dist/providers/codex-model-provider.js +42 -0
- package/dist/providers/model-provider.d.ts +26 -0
- package/dist/providers/model-provider.js +26 -0
- package/dist/public-components.d.ts +3 -0
- package/dist/public-components.js +3 -0
- package/dist/registry/runtime-registry.d.ts +11 -0
- package/dist/registry/runtime-registry.js +71 -0
- package/dist/registry/select-runtime.d.ts +9 -0
- package/dist/registry/select-runtime.js +31 -0
- package/dist/runtime-adapters.d.ts +16 -0
- package/dist/runtime-adapters.js +9 -0
- package/dist/runtimes/acp/acp-event-mapper.d.ts +56 -0
- package/dist/runtimes/acp/acp-event-mapper.js +237 -0
- package/dist/runtimes/acp/acp-runtime.d.ts +46 -0
- package/dist/runtimes/acp/acp-runtime.js +165 -0
- package/dist/runtimes/acp/desktop-acp-backend.d.ts +16 -0
- package/dist/runtimes/acp/desktop-acp-backend.js +243 -0
- package/dist/runtimes/codex/app-server-protocol.d.ts +28 -0
- package/dist/runtimes/codex/app-server-protocol.js +274 -0
- package/dist/runtimes/codex/codex-runtime.d.ts +24 -0
- package/dist/runtimes/codex/codex-runtime.js +318 -0
- package/dist/runtimes/fake/fake-runtime.d.ts +51 -0
- package/dist/runtimes/fake/fake-runtime.js +257 -0
- package/dist/sessions/plugin-data.d.ts +8 -0
- package/dist/sessions/plugin-data.js +29 -0
- package/dist/sessions/session-store.d.ts +47 -0
- package/dist/sessions/session-store.js +117 -0
- package/dist/settings/acp-agents.d.ts +8 -0
- package/dist/settings/acp-agents.js +11 -0
- package/dist/settings/ai-settings-tab.d.ts +8 -0
- package/dist/settings/ai-settings-tab.js +249 -0
- package/dist/settings/ai-settings.d.ts +43 -0
- package/dist/settings/ai-settings.js +147 -0
- package/dist/settings/app-tool-setting-rows.d.ts +16 -0
- package/dist/settings/app-tool-setting-rows.js +30 -0
- package/dist/settings/register-ai-settings.d.ts +3 -0
- package/dist/settings/register-ai-settings.js +393 -0
- package/dist/skills/activation.d.ts +2 -0
- package/dist/skills/activation.js +20 -0
- package/dist/skills/bundled/lapis-notes.d.ts +3 -0
- package/dist/skills/bundled/lapis-notes.js +52 -0
- package/dist/skills/bundled/research.d.ts +6 -0
- package/dist/skills/bundled/research.js +29 -0
- package/dist/skills/discovery.d.ts +21 -0
- package/dist/skills/discovery.js +227 -0
- package/dist/skills/manifest.d.ts +3 -0
- package/dist/skills/manifest.js +39 -0
- package/dist/skills/parser.d.ts +12 -0
- package/dist/skills/parser.js +124 -0
- package/dist/skills/registry.d.ts +21 -0
- package/dist/skills/registry.js +89 -0
- package/dist/skills/seed.d.ts +5 -0
- package/dist/skills/seed.js +18 -0
- package/dist/skills/skill-tools.d.ts +8 -0
- package/dist/skills/skill-tools.js +113 -0
- package/dist/skills/types.d.ts +67 -0
- package/dist/skills/types.js +1 -0
- package/dist/styles.css +514 -0
- package/dist/tools/app-tool-host.d.ts +47 -0
- package/dist/tools/app-tool-host.js +419 -0
- package/dist/tools/desktop-app-tool-bridge.d.ts +23 -0
- package/dist/tools/desktop-app-tool-bridge.js +223 -0
- package/dist/tools/mcp-server-registry.d.ts +7 -0
- package/dist/tools/mcp-server-registry.js +30 -0
- package/manifest.json +34 -0
- package/package.json +83 -0
- package/styles.css +1 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AgentBootstrap, AgentBootstrapSkill, AgentBootstrapTool } from "./types";
|
|
2
|
+
export interface BuildAgentBootstrapInput {
|
|
3
|
+
conversationId?: string;
|
|
4
|
+
scopeDir: string;
|
|
5
|
+
launchNotePath?: string;
|
|
6
|
+
workspaceLabel?: string;
|
|
7
|
+
tools?: readonly AgentBootstrapTool[];
|
|
8
|
+
skills?: readonly AgentBootstrapSkill[];
|
|
9
|
+
readText?: (path: string) => Promise<string | undefined>;
|
|
10
|
+
}
|
|
11
|
+
export declare function buildAgentBootstrap(input: BuildAgentBootstrapInput): Promise<AgentBootstrap>;
|
|
12
|
+
export declare function buildSessionBootstrap(input: BuildAgentBootstrapInput): Promise<{
|
|
13
|
+
bootstrap: AgentBootstrap;
|
|
14
|
+
text: string;
|
|
15
|
+
}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LAPIS_BOOTSTRAP_INSTRUCTIONS } from "./instructions";
|
|
2
|
+
import { readAncestorFolderInstructions } from "./folder-instructions";
|
|
3
|
+
import { formatSessionBootstrap } from "./format";
|
|
4
|
+
export async function buildAgentBootstrap(input) {
|
|
5
|
+
const folderInstructions = input.readText
|
|
6
|
+
? await readAncestorFolderInstructions(input.readText, input.scopeDir)
|
|
7
|
+
: [];
|
|
8
|
+
return {
|
|
9
|
+
application: { name: "Lapis Notes" },
|
|
10
|
+
conversation: {
|
|
11
|
+
id: input.conversationId,
|
|
12
|
+
scopeDir: input.scopeDir,
|
|
13
|
+
launchNotePath: input.launchNotePath,
|
|
14
|
+
},
|
|
15
|
+
workspace: input.workspaceLabel
|
|
16
|
+
? { label: input.workspaceLabel }
|
|
17
|
+
: undefined,
|
|
18
|
+
tools: [...(input.tools ?? [])],
|
|
19
|
+
skills: [...(input.skills ?? [])],
|
|
20
|
+
folderInstructions,
|
|
21
|
+
instructions: [...LAPIS_BOOTSTRAP_INSTRUCTIONS],
|
|
22
|
+
truncated: folderInstructions.some((entry) => entry.truncated),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export async function buildSessionBootstrap(input) {
|
|
26
|
+
const bootstrap = await buildAgentBootstrap(input);
|
|
27
|
+
return { bootstrap, text: formatSessionBootstrap(bootstrap) };
|
|
28
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type FolderInstruction } from "./types";
|
|
2
|
+
export declare function ancestorScopeDirs(scopeDir: string): string[];
|
|
3
|
+
export declare function folderInstructionPath(scopeDir: string): string;
|
|
4
|
+
export declare function readAncestorFolderInstructions(readText: (path: string) => Promise<string | undefined>, scopeDir: string): Promise<FolderInstruction[]>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { hasHostFilesystemPath } from "../skills/manifest";
|
|
2
|
+
import { FOLDER_INSTRUCTION_FILE, MAX_FOLDER_INSTRUCTION_CHARS, MAX_FOLDER_INSTRUCTION_TOTAL_CHARS, } from "./types";
|
|
3
|
+
export function ancestorScopeDirs(scopeDir) {
|
|
4
|
+
const segments = scopeDir.split("/").filter(Boolean);
|
|
5
|
+
const dirs = [""];
|
|
6
|
+
for (let index = 0; index < segments.length; index += 1) {
|
|
7
|
+
dirs.push(segments.slice(0, index + 1).join("/"));
|
|
8
|
+
}
|
|
9
|
+
return dirs;
|
|
10
|
+
}
|
|
11
|
+
export function folderInstructionPath(scopeDir) {
|
|
12
|
+
return scopeDir
|
|
13
|
+
? `${scopeDir}/.lapis/${FOLDER_INSTRUCTION_FILE}`
|
|
14
|
+
: `.lapis/${FOLDER_INSTRUCTION_FILE}`;
|
|
15
|
+
}
|
|
16
|
+
export async function readAncestorFolderInstructions(readText, scopeDir) {
|
|
17
|
+
const collected = [];
|
|
18
|
+
let remaining = MAX_FOLDER_INSTRUCTION_TOTAL_CHARS;
|
|
19
|
+
for (const dir of ancestorScopeDirs(scopeDir)) {
|
|
20
|
+
const path = folderInstructionPath(dir);
|
|
21
|
+
const raw = (await readText(path))?.replaceAll("\r\n", "\n");
|
|
22
|
+
if (raw == null || !raw.trim())
|
|
23
|
+
continue;
|
|
24
|
+
if (hasHostFilesystemPath(raw)) {
|
|
25
|
+
collected.push({
|
|
26
|
+
path,
|
|
27
|
+
text: "",
|
|
28
|
+
truncated: false,
|
|
29
|
+
omitted: "path-bearing",
|
|
30
|
+
});
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
let text = raw.trim();
|
|
34
|
+
let truncated = false;
|
|
35
|
+
if (text.length > MAX_FOLDER_INSTRUCTION_CHARS) {
|
|
36
|
+
text = text.slice(0, MAX_FOLDER_INSTRUCTION_CHARS);
|
|
37
|
+
truncated = true;
|
|
38
|
+
}
|
|
39
|
+
if (text.length > remaining) {
|
|
40
|
+
text = text.slice(0, Math.max(0, remaining));
|
|
41
|
+
truncated = true;
|
|
42
|
+
}
|
|
43
|
+
remaining -= text.length;
|
|
44
|
+
collected.push({ path, text, truncated });
|
|
45
|
+
if (remaining <= 0)
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
return collected;
|
|
49
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { hasHostFilesystemPath } from "../skills/manifest";
|
|
2
|
+
export function formatSessionBootstrap(bootstrap) {
|
|
3
|
+
const tools = bootstrap.tools.length > 0
|
|
4
|
+
? bootstrap.tools
|
|
5
|
+
.map((tool) => `- ${tool.name} — ${oneLine(tool.description)}`)
|
|
6
|
+
.join("\n")
|
|
7
|
+
: "(none)";
|
|
8
|
+
const skills = bootstrap.skills.length > 0
|
|
9
|
+
? bootstrap.skills.map((skill) => `- ${skill.name}`).join("\n")
|
|
10
|
+
: "(none)";
|
|
11
|
+
const folder = bootstrap.folderInstructions
|
|
12
|
+
.filter((entry) => !entry.omitted && entry.text.trim())
|
|
13
|
+
.map((entry) => `--- ${entry.path} ---\n${entry.text}`)
|
|
14
|
+
.join("\n\n");
|
|
15
|
+
const body = [
|
|
16
|
+
"<lapis_context>",
|
|
17
|
+
bootstrap.instructions.join("\n\n"),
|
|
18
|
+
"",
|
|
19
|
+
`Current scope: ${portableBootstrapPath(bootstrap.conversation.scopeDir, "(vault root)")}`,
|
|
20
|
+
`Launched from: ${portableBootstrapPath(bootstrap.conversation.launchNotePath, "(none)")}`,
|
|
21
|
+
`Workspace: ${bootstrap.workspace?.label?.trim() || "(none)"}`,
|
|
22
|
+
"",
|
|
23
|
+
"Available application tools:",
|
|
24
|
+
tools,
|
|
25
|
+
"",
|
|
26
|
+
"Available skills:",
|
|
27
|
+
skills,
|
|
28
|
+
...(folder ? ["", "Folder instructions:", folder] : []),
|
|
29
|
+
"</lapis_context>",
|
|
30
|
+
].join("\n");
|
|
31
|
+
if (hasHostFilesystemPath(body)) {
|
|
32
|
+
throw new Error("Session bootstrap must not include host filesystem paths.");
|
|
33
|
+
}
|
|
34
|
+
return body;
|
|
35
|
+
}
|
|
36
|
+
function portableBootstrapPath(value, empty) {
|
|
37
|
+
const trimmed = value?.trim() ?? "";
|
|
38
|
+
if (!trimmed)
|
|
39
|
+
return empty;
|
|
40
|
+
if (hasHostFilesystemPath(trimmed))
|
|
41
|
+
return "(application folder)";
|
|
42
|
+
return trimmed;
|
|
43
|
+
}
|
|
44
|
+
function oneLine(value) {
|
|
45
|
+
return value.replace(/\s+/gu, " ").trim();
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LAPIS_BOOTSTRAP_INSTRUCTIONS: readonly string[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const LAPIS_BOOTSTRAP_INSTRUCTIONS = [
|
|
2
|
+
"You are operating as an AI assistant inside Lapis Notes.",
|
|
3
|
+
"Use application-provided tools when interacting with notes. Use note search tools when the user asks you to find, remember, locate, compare, or research information in their notes.",
|
|
4
|
+
"Do not manually inspect application storage when an equivalent Lapis tool exists.",
|
|
5
|
+
"The host controls your accessible note scope. Treat the supplied scope as authoritative.",
|
|
6
|
+
"Skills describe repeatable workflows. When a relevant skill is available, load its instructions with skills_read before following that workflow.",
|
|
7
|
+
"Keep note operations scoped to the current conversation unless the user explicitly requests a broader scope and the host permits it.",
|
|
8
|
+
];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const FOLDER_INSTRUCTION_FILE = "AGENTS.md";
|
|
2
|
+
export declare const MAX_FOLDER_INSTRUCTION_CHARS = 10000;
|
|
3
|
+
export declare const MAX_FOLDER_INSTRUCTION_TOTAL_CHARS = 25000;
|
|
4
|
+
export interface AgentBootstrapTool {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
}
|
|
8
|
+
export interface AgentBootstrapSkill {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
version: string;
|
|
12
|
+
}
|
|
13
|
+
export interface FolderInstruction {
|
|
14
|
+
path: string;
|
|
15
|
+
text: string;
|
|
16
|
+
truncated: boolean;
|
|
17
|
+
omitted?: "path-bearing";
|
|
18
|
+
}
|
|
19
|
+
export interface AgentBootstrap {
|
|
20
|
+
application: {
|
|
21
|
+
name: "Lapis Notes";
|
|
22
|
+
};
|
|
23
|
+
conversation: {
|
|
24
|
+
id?: string;
|
|
25
|
+
scopeDir: string;
|
|
26
|
+
launchNotePath?: string;
|
|
27
|
+
};
|
|
28
|
+
workspace?: {
|
|
29
|
+
label?: string;
|
|
30
|
+
};
|
|
31
|
+
tools: AgentBootstrapTool[];
|
|
32
|
+
skills: AgentBootstrapSkill[];
|
|
33
|
+
folderInstructions: FolderInstruction[];
|
|
34
|
+
instructions: string[];
|
|
35
|
+
truncated: boolean;
|
|
36
|
+
}
|