@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
package/CHANGELOG.md
ADDED
package/LICENSE.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# License
|
|
2
|
+
|
|
3
|
+
Copyright (c) LapisMD contributors.
|
|
4
|
+
|
|
5
|
+
This software is licensed under the GNU Affero General Public License, version
|
|
6
|
+
3 or (at your option) any later version (`AGPL-3.0-or-later`). The complete
|
|
7
|
+
license text is available from the
|
|
8
|
+
[GNU Project](https://www.gnu.org/licenses/agpl-3.0.html).
|
package/README.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# AI
|
|
2
|
+
|
|
3
|
+
Provider-agnostic agent chat with ACP and optional native runtimes.
|
|
4
|
+
|
|
5
|
+
## Install for static composition
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pnpm add @lapis-notes/ai
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Register the exported plugin class in the application's `PluginProfile`. Import
|
|
12
|
+
`@lapis-notes/ai/styles.css?inline` and pass the CSS through the static
|
|
13
|
+
registration so the host owns its lifecycle.
|
|
14
|
+
|
|
15
|
+
The runtime plugin ID is `ai`. A matching signed
|
|
16
|
+
`ai-0.1.0.lapis-plugin` archive is attached to the
|
|
17
|
+
package-scoped GitHub release for manual or registry installation.
|
|
18
|
+
|
|
19
|
+
See the [repository README](https://github.com/lapismd/lapis-plugins#readme) for
|
|
20
|
+
development, validation, and release-gate details.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Plugin, type App, type PluginManifest } from "@lapis-notes/api";
|
|
2
|
+
import type { ComposerTriggerItem } from "@lapismd/design-core/ai/chat";
|
|
3
|
+
import type { CatalogGroup, CatalogToolRow } from "./catalog/types";
|
|
4
|
+
import type { ConversationLocation } from "./conversations/types";
|
|
5
|
+
import type { AgentRequest, AgentRuntime } from "./core/types";
|
|
6
|
+
import type { AgentProcessHost } from "./host/process-host";
|
|
7
|
+
import { ModelProviderRegistry } from "./providers/model-provider";
|
|
8
|
+
import { type AgentRuntimeRegistry } from "./registry/runtime-registry";
|
|
9
|
+
import { FakeAgentRuntime } from "./runtimes/fake/fake-runtime";
|
|
10
|
+
import { ConversationRepository } from "./conversations/conversation-repository";
|
|
11
|
+
import type { CreateConversationInput } from "./conversations/conversation-repository";
|
|
12
|
+
import { AiConversationIndex } from "./conversations/conversation-index";
|
|
13
|
+
import { ConversationIndexCoordinator } from "./conversations/conversation-index-coordinator";
|
|
14
|
+
import type { ConversationListEntry } from "./conversations/transcript-store";
|
|
15
|
+
import { ConversationScopeResolver } from "./conversations/scope-resolver";
|
|
16
|
+
import { type AiPluginSettings } from "./settings/ai-settings";
|
|
17
|
+
import { AppToolHost } from "./tools/app-tool-host";
|
|
18
|
+
import { DesktopAppToolBridge } from "./tools/desktop-app-tool-bridge";
|
|
19
|
+
import { NativeMemoryService } from "./memory/native-memory-service";
|
|
20
|
+
import { MemoryIngestionCoordinator } from "./memory/memory-ingestion-coordinator";
|
|
21
|
+
import { MemoryMaintenanceScheduler } from "./memory/memory-scheduler";
|
|
22
|
+
import { RuntimeMemoryConsolidationProvider } from "./memory/runtime-consolidation-provider";
|
|
23
|
+
import { HandoffSummaryCoordinator, RuntimeHandoffSummaryProvider } from "./conversations/handoff-summary";
|
|
24
|
+
import { SkillRegistry, SkillSnapshotStore } from "./skills/registry";
|
|
25
|
+
import { SlashCommandCatalog } from "./commands/catalog";
|
|
26
|
+
import { SlashCommandRouter } from "./commands/router";
|
|
27
|
+
import { type UserAgentsCommandStore } from "./commands/user-agents";
|
|
28
|
+
export declare class AiPlugin extends Plugin {
|
|
29
|
+
#private;
|
|
30
|
+
private data;
|
|
31
|
+
readonly processHost: AgentProcessHost;
|
|
32
|
+
readonly registry: AgentRuntimeRegistry;
|
|
33
|
+
readonly models: ModelProviderRegistry;
|
|
34
|
+
readonly mcpServers: import(".").McpServerContributionRegistry;
|
|
35
|
+
readonly appToolHost: AppToolHost;
|
|
36
|
+
readonly appToolBridge: DesktopAppToolBridge;
|
|
37
|
+
readonly skillRegistry: SkillRegistry;
|
|
38
|
+
readonly skillSnapshots: SkillSnapshotStore;
|
|
39
|
+
readonly slashCatalog: SlashCommandCatalog;
|
|
40
|
+
readonly slashRouter: SlashCommandRouter;
|
|
41
|
+
userAgents: UserAgentsCommandStore | undefined;
|
|
42
|
+
readonly fakeRuntime: FakeAgentRuntime;
|
|
43
|
+
readonly scopeResolver: ConversationScopeResolver;
|
|
44
|
+
readonly conversations: ConversationRepository;
|
|
45
|
+
readonly conversationIndex: AiConversationIndex;
|
|
46
|
+
readonly conversationIndexCoordinator: ConversationIndexCoordinator;
|
|
47
|
+
readonly memory: NativeMemoryService;
|
|
48
|
+
readonly memoryConsolidationProvider: RuntimeMemoryConsolidationProvider;
|
|
49
|
+
readonly handoffSummaryProvider: RuntimeHandoffSummaryProvider;
|
|
50
|
+
readonly handoffSummaries: HandoffSummaryCoordinator;
|
|
51
|
+
readonly memoryIngestionCoordinator: MemoryIngestionCoordinator;
|
|
52
|
+
readonly memoryScheduler: MemoryMaintenanceScheduler;
|
|
53
|
+
constructor(app: App, pluginManifest?: PluginManifest, options?: {
|
|
54
|
+
userAgents?: UserAgentsCommandStore;
|
|
55
|
+
});
|
|
56
|
+
get skills(): SkillRegistry;
|
|
57
|
+
skillContext: () => import("./skills/types").SkillDiscoveryContext;
|
|
58
|
+
getSettings(): AiPluginSettings;
|
|
59
|
+
updateSettings(patch: Partial<AiPluginSettings>): Promise<void>;
|
|
60
|
+
subscribeSettings(listener: (patch: Partial<AiPluginSettings>) => void): () => void;
|
|
61
|
+
subscribeConversationMoves(listener: (oldPath: string, newPath: string) => void): () => void;
|
|
62
|
+
refreshHostRuntimes(): void;
|
|
63
|
+
liveRuntimeUnavailableReason(): string | null;
|
|
64
|
+
get workspace(): string | undefined;
|
|
65
|
+
createConversationInput(explicitFolder?: string): CreateConversationInput;
|
|
66
|
+
listConversationFolders(): string[];
|
|
67
|
+
currentConversationScope(): string;
|
|
68
|
+
currentAiConversation(): ConversationLocation | null;
|
|
69
|
+
searchAiConversations(query: string): Promise<ConversationListEntry[]>;
|
|
70
|
+
searchVaultFiles: (query: string, signal: AbortSignal) => Promise<ComposerTriggerItem[]>;
|
|
71
|
+
fallbackRuntime(): AgentRuntime;
|
|
72
|
+
selectRuntime(request: AgentRequest): Promise<AgentRuntime>;
|
|
73
|
+
refreshFileCommands(scopeDir?: string): Promise<void>;
|
|
74
|
+
updateBundledSkills(): Promise<void>;
|
|
75
|
+
updateReservedCommands(): Promise<void>;
|
|
76
|
+
onload(): Promise<void>;
|
|
77
|
+
private openAiChat;
|
|
78
|
+
openAiConversation(location?: ConversationLocation): Promise<void>;
|
|
79
|
+
createAiConversation(scopeDir: string): Promise<void>;
|
|
80
|
+
loadAiCatalog(): Promise<CatalogGroup[]>;
|
|
81
|
+
setCatalogToolEnabled(tool: CatalogToolRow, enabled: boolean): Promise<void>;
|
|
82
|
+
openCatalogSkill(path: string): Promise<void>;
|
|
83
|
+
revealAiCatalog(): Promise<void>;
|
|
84
|
+
revealConversationHistory(): Promise<void>;
|
|
85
|
+
private findMainConversationLeaf;
|
|
86
|
+
private findUnboundMainAiLeaf;
|
|
87
|
+
}
|
|
88
|
+
export default AiPlugin;
|