@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,67 @@
|
|
|
1
|
+
import type { SkillSourceKind } from "@lapis-notes/api/agent-skills";
|
|
2
|
+
export type SkillCommandDispatch = {
|
|
3
|
+
kind: "model";
|
|
4
|
+
} | {
|
|
5
|
+
kind: "tool";
|
|
6
|
+
tool: string;
|
|
7
|
+
argMode: "raw";
|
|
8
|
+
};
|
|
9
|
+
export interface SkillRequirements {
|
|
10
|
+
tools?: string[];
|
|
11
|
+
capabilities?: string[];
|
|
12
|
+
extensions?: string[];
|
|
13
|
+
}
|
|
14
|
+
export interface AppSkillDescriptor {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
source: SkillSourceKind;
|
|
19
|
+
root: string;
|
|
20
|
+
version: string;
|
|
21
|
+
userInvocable: boolean;
|
|
22
|
+
modelInvocable: boolean;
|
|
23
|
+
argumentHint?: string;
|
|
24
|
+
command: SkillCommandDispatch;
|
|
25
|
+
requirements?: SkillRequirements;
|
|
26
|
+
}
|
|
27
|
+
export interface LoadedAppSkill extends AppSkillDescriptor {
|
|
28
|
+
instructions: string;
|
|
29
|
+
}
|
|
30
|
+
export interface SkillDiagnostic {
|
|
31
|
+
path: string;
|
|
32
|
+
source: SkillSourceKind;
|
|
33
|
+
message: string;
|
|
34
|
+
shadowedBy?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface SkillSnapshotEntry {
|
|
37
|
+
skillId: string;
|
|
38
|
+
name: string;
|
|
39
|
+
description: string;
|
|
40
|
+
version: string;
|
|
41
|
+
userInvocable: boolean;
|
|
42
|
+
modelInvocable: boolean;
|
|
43
|
+
argumentHint?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface SkillSnapshot {
|
|
46
|
+
id: string;
|
|
47
|
+
createdAt: string;
|
|
48
|
+
skills: readonly SkillSnapshotEntry[];
|
|
49
|
+
}
|
|
50
|
+
export interface SkillActivation {
|
|
51
|
+
skillId: string;
|
|
52
|
+
skillName: string;
|
|
53
|
+
version: string;
|
|
54
|
+
source: "user" | "model" | "app";
|
|
55
|
+
arguments?: string;
|
|
56
|
+
instructions: string;
|
|
57
|
+
}
|
|
58
|
+
export interface SkillDiscoveryContext {
|
|
59
|
+
scopeDir: string;
|
|
60
|
+
availableToolNames?: readonly string[];
|
|
61
|
+
enabledPluginIds?: readonly string[];
|
|
62
|
+
}
|
|
63
|
+
export interface NativeAgentCommand {
|
|
64
|
+
name: string;
|
|
65
|
+
description?: string;
|
|
66
|
+
argumentHint?: string;
|
|
67
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1,514 @@
|
|
|
1
|
+
[data-ui-component="ai-chat-panel"] {
|
|
2
|
+
--ui-workspace-view-background: var(--background);
|
|
3
|
+
--ui-workspace-view-foreground: var(--foreground);
|
|
4
|
+
--ui-ai-request-gap: 0.5rem;
|
|
5
|
+
--ui-ai-chat-bottom-clearance: calc(
|
|
6
|
+
var(--ui-workspace-status-height, 1.5rem) + 0.75rem
|
|
7
|
+
);
|
|
8
|
+
--font-sans: "DM Sans Variable", sans-serif;
|
|
9
|
+
--ui-workspace-font-sans: var(--font-sans), ui-sans-serif, system-ui,
|
|
10
|
+
sans-serif;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
min-height: 0;
|
|
15
|
+
height: 100%;
|
|
16
|
+
width: 100%;
|
|
17
|
+
padding-bottom: 0;
|
|
18
|
+
background: var(--ui-workspace-view-background);
|
|
19
|
+
color: var(--ui-workspace-view-foreground);
|
|
20
|
+
font-family: var(--ui-workspace-font-sans);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
[data-ui-component="ai-chat-panel"] [data-ui-component="ai-chat-layout"] {
|
|
24
|
+
flex: 1 1 0;
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: auto;
|
|
27
|
+
min-height: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
[data-ui-component="ai-chat-panel"]
|
|
31
|
+
[data-ui-component="ai-chat-layout"]
|
|
32
|
+
> [data-ui-part="scroll-shell"] {
|
|
33
|
+
flex: 1 1 0;
|
|
34
|
+
min-height: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
[data-ui-component="ai-chat-panel"]
|
|
38
|
+
[data-ui-component="ai-chat-layout"]
|
|
39
|
+
[data-ui-part="composer-dock"],
|
|
40
|
+
[data-ui-component="ai-chat-panel"]
|
|
41
|
+
[data-ui-component="ai-chat-layout"][data-density]
|
|
42
|
+
[data-ui-part="composer-dock"] {
|
|
43
|
+
position: relative;
|
|
44
|
+
inset: auto;
|
|
45
|
+
z-index: 1;
|
|
46
|
+
isolation: auto;
|
|
47
|
+
flex: 0 0 auto;
|
|
48
|
+
padding: 0.5rem 0.75rem var(--ui-ai-chat-bottom-clearance);
|
|
49
|
+
pointer-events: auto;
|
|
50
|
+
background: none;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
[data-ui-component="ai-chat-panel"]
|
|
54
|
+
[data-ui-component="ai-chat-layout"]
|
|
55
|
+
[data-ui-part="composer-dock"]::before,
|
|
56
|
+
[data-ui-component="ai-chat-panel"]
|
|
57
|
+
[data-ui-component="ai-chat-layout"][data-density]
|
|
58
|
+
[data-ui-part="composer-dock"]::before {
|
|
59
|
+
content: none;
|
|
60
|
+
display: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[data-ui-component="ai-chat-panel"]
|
|
64
|
+
[data-ui-component="ai-chat-layout"][data-density]
|
|
65
|
+
[data-ui-part="message-area"] {
|
|
66
|
+
padding-block: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
[data-ui-component="ai-agent-request"] {
|
|
70
|
+
box-sizing: border-box;
|
|
71
|
+
display: flex;
|
|
72
|
+
width: 100%;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
gap: var(--ui-ai-request-gap);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
[data-ui-component="ai-agent-request"] [data-ui-part="request-heading"] {
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
gap: 0.125rem;
|
|
81
|
+
padding: 0.375rem;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
[data-ui-component="ai-agent-request"] strong {
|
|
85
|
+
font-size: 0.875rem;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
[data-ui-component="ai-agent-request"] [data-ui-part="approval-details"] {
|
|
89
|
+
display: flex;
|
|
90
|
+
min-width: 0;
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
gap: 0.375rem;
|
|
93
|
+
padding: 0 0.375rem 0.375rem;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[data-ui-component="ai-agent-request"] [data-ui-part="approval-details"] p {
|
|
97
|
+
margin: 0;
|
|
98
|
+
color: var(--muted-foreground);
|
|
99
|
+
font-size: 0.75rem;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
[data-ui-component="ai-agent-request"] [data-ui-part="approval-details"] code,
|
|
103
|
+
[data-ui-component="ai-agent-request"] [data-ui-part="approval-diff"] {
|
|
104
|
+
border: 1px solid var(--border);
|
|
105
|
+
border-radius: 0.375rem;
|
|
106
|
+
background: var(--muted);
|
|
107
|
+
color: var(--foreground);
|
|
108
|
+
font-family: var(--font-mono, ui-monospace, monospace);
|
|
109
|
+
font-size: 0.75rem;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
[data-ui-component="ai-agent-request"] [data-ui-part="approval-details"] code {
|
|
113
|
+
align-self: flex-start;
|
|
114
|
+
padding: 0.125rem 0.375rem;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
[data-ui-component="ai-agent-request"] [data-ui-part="approval-diff"] {
|
|
118
|
+
max-height: 12rem;
|
|
119
|
+
margin: 0;
|
|
120
|
+
overflow: auto;
|
|
121
|
+
padding: 0.5rem;
|
|
122
|
+
white-space: pre-wrap;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
[data-ui-component="ai-agent-request"] [data-ui-part="tool"],
|
|
126
|
+
[data-ui-component="ai-agent-request"] legend,
|
|
127
|
+
[data-ui-component="ai-agent-request"] small {
|
|
128
|
+
color: var(--muted-foreground);
|
|
129
|
+
font-size: 0.75rem;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
[data-ui-component="ai-agent-request"] fieldset {
|
|
133
|
+
display: flex;
|
|
134
|
+
min-width: 0;
|
|
135
|
+
margin: 0;
|
|
136
|
+
padding: 0;
|
|
137
|
+
border: 0;
|
|
138
|
+
flex-direction: column;
|
|
139
|
+
gap: 0.25rem;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
[data-ui-component="ai-agent-request"] fieldset > strong {
|
|
143
|
+
padding: 0.375rem;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
[data-ui-component="ai-agent-request"] [data-ui-part="options"] {
|
|
147
|
+
display: flex;
|
|
148
|
+
width: 100%;
|
|
149
|
+
flex-direction: column;
|
|
150
|
+
gap: 0.25rem;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
[data-ui-component="ai-agent-request"] [data-ui-part="options"] > button {
|
|
154
|
+
display: flex;
|
|
155
|
+
width: 100%;
|
|
156
|
+
align-items: center;
|
|
157
|
+
gap: 0.5rem;
|
|
158
|
+
border: 0;
|
|
159
|
+
border-radius: 0.5rem;
|
|
160
|
+
background: transparent;
|
|
161
|
+
padding: 0.375rem;
|
|
162
|
+
color: var(--foreground);
|
|
163
|
+
font: inherit;
|
|
164
|
+
text-align: left;
|
|
165
|
+
cursor: pointer;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
[data-ui-component="ai-agent-request"]
|
|
169
|
+
[data-ui-part="options"]
|
|
170
|
+
> button:disabled {
|
|
171
|
+
cursor: not-allowed;
|
|
172
|
+
opacity: 0.55;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
[data-ui-component="ai-agent-request"]
|
|
176
|
+
[data-ui-part="options"]
|
|
177
|
+
> button
|
|
178
|
+
> span:last-child {
|
|
179
|
+
display: flex;
|
|
180
|
+
min-width: 0;
|
|
181
|
+
flex-direction: column;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
[data-ui-component="ai-agent-request"] input {
|
|
185
|
+
box-sizing: border-box;
|
|
186
|
+
width: 100%;
|
|
187
|
+
min-height: 2rem;
|
|
188
|
+
border: 1px solid var(--input);
|
|
189
|
+
border-radius: 0.5rem;
|
|
190
|
+
background: var(--background);
|
|
191
|
+
padding: 0.375rem 0.5rem;
|
|
192
|
+
color: var(--foreground);
|
|
193
|
+
font: inherit;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
[data-ui-component="ai-agent-request"] [data-ui-part="request-actions"] {
|
|
197
|
+
display: flex;
|
|
198
|
+
justify-content: flex-end;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
[data-ui-component="ai-chat-panel"] .ai-chat-panel__control {
|
|
202
|
+
display: flex;
|
|
203
|
+
flex-direction: column;
|
|
204
|
+
gap: 0.25rem;
|
|
205
|
+
font-size: 0.75rem;
|
|
206
|
+
color: var(--muted-foreground);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
[data-ui-component="ai-chat-panel"] .ai-chat-panel__control select,
|
|
210
|
+
[data-ui-part="effort-popover"] .ai-chat-panel__control select {
|
|
211
|
+
font: inherit;
|
|
212
|
+
color: var(--foreground);
|
|
213
|
+
background: var(--background);
|
|
214
|
+
border: 1px solid var(--border);
|
|
215
|
+
border-radius: 0.375rem;
|
|
216
|
+
padding: 0.25rem 0.375rem;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
[data-ui-part="effort-popover"],
|
|
220
|
+
[data-ai-part="attach-popover"],
|
|
221
|
+
[data-ai-part="conversation-menu"],
|
|
222
|
+
[data-ui-component="app-shell-settings-dialog"],
|
|
223
|
+
[data-ui-component="workspace-settings"] {
|
|
224
|
+
--font-sans: "DM Sans Variable", sans-serif;
|
|
225
|
+
--ui-workspace-font-sans: var(--font-sans), ui-sans-serif, system-ui,
|
|
226
|
+
sans-serif;
|
|
227
|
+
font-family: var(--ui-workspace-font-sans);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
[data-ui-part="effort-popover"] {
|
|
231
|
+
display: flex;
|
|
232
|
+
flex-direction: column;
|
|
233
|
+
gap: 0.5rem;
|
|
234
|
+
min-width: 14rem;
|
|
235
|
+
padding: 0.75rem;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
[data-ui-component="dropdown-menu"][data-ui-part="dropdown-menu-content"][data-ai-part="conversation-menu"] {
|
|
239
|
+
width: max-content;
|
|
240
|
+
min-width: max-content;
|
|
241
|
+
overflow: visible;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
[data-ai-part="conversation-menu"] [data-ui-part="dropdown-menu-item"] {
|
|
245
|
+
overflow: visible;
|
|
246
|
+
white-space: nowrap;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
[data-ui-component="ai-chat-panel"] .ai-chat-panel__tool-detail {
|
|
250
|
+
display: grid;
|
|
251
|
+
gap: 0.375rem;
|
|
252
|
+
min-width: 0;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
[data-ui-component="ai-chat-panel"] .ai-chat-panel__tool-detail
|
|
256
|
+
[data-ui-component="code-block"] {
|
|
257
|
+
min-width: 0;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
[data-ui-component="popover"][data-ai-part="attach-popover"] {
|
|
261
|
+
z-index: 80;
|
|
262
|
+
gap: 0;
|
|
263
|
+
min-width: 16rem;
|
|
264
|
+
padding: 0;
|
|
265
|
+
overflow: visible;
|
|
266
|
+
border: 1px solid var(--border);
|
|
267
|
+
box-shadow: var(
|
|
268
|
+
--ui-ai-chat-shadow-large,
|
|
269
|
+
0 0.75rem 2rem color-mix(in srgb, var(--foreground) 18%, transparent)
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
[data-ui-component="ai-chat-panel"] .ai-chat-panel__message-actions {
|
|
274
|
+
display: inline-flex;
|
|
275
|
+
align-items: center;
|
|
276
|
+
gap: 0.125rem;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
[data-ui-component="ai-chat-panel"] .ai-chat-panel__command-notice {
|
|
280
|
+
box-sizing: border-box;
|
|
281
|
+
width: 100%;
|
|
282
|
+
margin: 0;
|
|
283
|
+
padding: 0.375rem 0.25rem;
|
|
284
|
+
color: var(--muted-foreground);
|
|
285
|
+
font-size: 0.75rem;
|
|
286
|
+
line-height: 1.35;
|
|
287
|
+
text-align: start;
|
|
288
|
+
white-space: pre-wrap;
|
|
289
|
+
overflow-wrap: anywhere;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
[data-ui-component="ai-chat-panel"]
|
|
293
|
+
.ai-chat-panel__command-notice[data-layout="inventory"] {
|
|
294
|
+
padding: 0;
|
|
295
|
+
color: inherit;
|
|
296
|
+
white-space: normal;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
[data-ui-component="ai-chat-panel"] .ai-chat-panel__working {
|
|
300
|
+
box-sizing: border-box;
|
|
301
|
+
display: flex;
|
|
302
|
+
align-items: center;
|
|
303
|
+
gap: 0.375rem;
|
|
304
|
+
min-height: 1.5rem;
|
|
305
|
+
margin: 0 0 0.375rem;
|
|
306
|
+
padding-inline: 0.25rem;
|
|
307
|
+
color: var(--muted-foreground);
|
|
308
|
+
font-size: 0.75rem;
|
|
309
|
+
line-height: 1.25rem;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
[data-ui-component="ai-chat-panel"] .ai-chat-panel__working svg {
|
|
313
|
+
width: 0.875rem;
|
|
314
|
+
height: 0.875rem;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
[data-ui-component="ai-chat-panel"] .ai-chat-panel__context-usage {
|
|
318
|
+
display: inline-flex;
|
|
319
|
+
align-items: center;
|
|
320
|
+
gap: 0.375rem;
|
|
321
|
+
color: var(--muted-foreground);
|
|
322
|
+
font-size: 0.6875rem;
|
|
323
|
+
line-height: 1rem;
|
|
324
|
+
white-space: nowrap;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
[data-ui-component="ai-chat-panel"] .ai-chat-panel__context-usage progress {
|
|
328
|
+
width: 4rem;
|
|
329
|
+
height: 0.25rem;
|
|
330
|
+
accent-color: var(--primary);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
[data-ai-part="model-badge"] {
|
|
334
|
+
margin-inline-start: 0.35em;
|
|
335
|
+
color: color-mix(in srgb, var(--foreground) 42%, var(--background));
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
[data-ui-component="ai-chat-panel"]
|
|
339
|
+
[data-ui-component="ai-chat-message-bubble"],
|
|
340
|
+
[data-ui-component="ai-chat-panel"]
|
|
341
|
+
[data-ui-component="ai-chat-composer-input"]
|
|
342
|
+
[data-ui-part="editable"],
|
|
343
|
+
[data-ui-component="ai-chat-panel"]
|
|
344
|
+
[data-ui-component="ai-chat-composer-input"]
|
|
345
|
+
[data-ui-part="placeholder"] {
|
|
346
|
+
font-family: inherit;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
[data-ui-component="ai-chat-panel"] .ai-chat-panel__markdown,
|
|
350
|
+
[data-ui-component="ai-chat-panel"] .ai-chat-panel__markdown
|
|
351
|
+
:where(
|
|
352
|
+
.mira-markdown-preview,
|
|
353
|
+
.markdown-preview-surface,
|
|
354
|
+
.markdown-embed-surface,
|
|
355
|
+
.cm-sizer,
|
|
356
|
+
.markdown-view__document
|
|
357
|
+
) {
|
|
358
|
+
--mira-background: transparent;
|
|
359
|
+
--mira-preview-background: transparent;
|
|
360
|
+
--mira-widget-background: transparent;
|
|
361
|
+
--background: transparent;
|
|
362
|
+
--background-primary: transparent;
|
|
363
|
+
--markdown-surface-background: transparent;
|
|
364
|
+
background: transparent;
|
|
365
|
+
height: auto;
|
|
366
|
+
max-height: none;
|
|
367
|
+
min-height: 0;
|
|
368
|
+
overflow: visible;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
[data-ui-component="ai-chat-panel"] .ai-chat-panel__markdown,
|
|
372
|
+
[data-ui-component="ai-chat-panel"] .ai-chat-panel__markdown
|
|
373
|
+
:where(
|
|
374
|
+
.mira-markdown-preview,
|
|
375
|
+
.markdown-preview-surface,
|
|
376
|
+
.markdown-embed-surface,
|
|
377
|
+
.markdown-view__document
|
|
378
|
+
),
|
|
379
|
+
[data-ui-component="ai-chat-panel"] .ai-chat-panel__markdown
|
|
380
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
381
|
+
font-family: inherit;
|
|
382
|
+
font-size: inherit;
|
|
383
|
+
line-height: inherit;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
[data-ui-component="ai-chat-panel"]
|
|
387
|
+
[data-ui-component="ai-chat-message-bubble"]
|
|
388
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
389
|
+
font-family: var(--ui-workspace-font-sans) !important;
|
|
390
|
+
font-size: inherit !important;
|
|
391
|
+
line-height: inherit !important;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
[data-ui-component="ai-chat-panel"]
|
|
395
|
+
[data-ui-part="bubbles"]
|
|
396
|
+
:where(h1, h2, h3, p, ul, ol, li, table, th, td) {
|
|
397
|
+
font-family: inherit;
|
|
398
|
+
font-size: inherit;
|
|
399
|
+
line-height: inherit;
|
|
400
|
+
font-weight: inherit;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
[data-ui-component="ai-chat-panel"]
|
|
404
|
+
[data-ui-part="bubbles"]
|
|
405
|
+
:where(h1, h2, h3, p, ul) {
|
|
406
|
+
margin: 0 0 0.5rem;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
[data-ui-component="ai-chat-panel"] [data-ui-part="bubbles"] ul {
|
|
410
|
+
padding-inline-start: 1.25rem;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
[data-ui-component="ai-chat-panel"] [data-ui-part="bubbles"] code {
|
|
414
|
+
font-family: var(--font-mono, ui-monospace, monospace);
|
|
415
|
+
font-size: 0.8125em;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
[data-ui-component="ai-chat-panel"] [data-ui-part="bubbles"] pre {
|
|
419
|
+
margin: 0 0 0.5rem;
|
|
420
|
+
padding: 0.5rem 0.75rem;
|
|
421
|
+
overflow: auto;
|
|
422
|
+
border-radius: 0.375rem;
|
|
423
|
+
background: color-mix(in srgb, var(--muted) 70%, transparent);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
[data-ui-component="ai-chat-panel"]
|
|
427
|
+
[data-ui-component="ai-chat-message-list"]
|
|
428
|
+
[data-ui-part="list-inner"],
|
|
429
|
+
[data-ui-component="ai-chat-panel"] [data-ui-part="empty-state"] {
|
|
430
|
+
padding-block-end: 2.5rem;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
[data-ui-component="ai-chat-panel"] .ai-chat-panel__scope-path {
|
|
434
|
+
margin: 1.5rem 0 0;
|
|
435
|
+
padding: 0 0.75rem;
|
|
436
|
+
text-align: center;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
[data-ui-component="ai-chat-panel"] .ai-chat-panel__scope-button {
|
|
440
|
+
max-width: 100%;
|
|
441
|
+
color: color-mix(
|
|
442
|
+
in srgb,
|
|
443
|
+
var(--ui-workspace-view-foreground) 68%,
|
|
444
|
+
var(--ui-workspace-view-background)
|
|
445
|
+
);
|
|
446
|
+
font-size: 0.75rem;
|
|
447
|
+
line-height: 1.25rem;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
[data-ai-part="scope-picker-popover"] {
|
|
451
|
+
width: min(20rem, calc(100vw - 2rem));
|
|
452
|
+
padding: 0;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
[data-ui-component="ai-chat-panel"] .ai-chat-panel__conversation-picker {
|
|
456
|
+
padding: 0.25rem 0 1rem;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
[data-ui-component="ai-jsonl-view"] {
|
|
460
|
+
width: 100%;
|
|
461
|
+
height: 100%;
|
|
462
|
+
min-width: 0;
|
|
463
|
+
min-height: 0;
|
|
464
|
+
background: var(--background);
|
|
465
|
+
color: var(--foreground);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
[data-ui-component="ai-jsonl-view"]
|
|
469
|
+
[data-ui-component="ai-chat-layout"]
|
|
470
|
+
[data-ui-part="composer-dock"] {
|
|
471
|
+
display: none;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
[data-ui-component="ai-jsonl-view"]
|
|
475
|
+
[data-ui-component="ai-chat-layout"]
|
|
476
|
+
[data-ui-part="message-area"] {
|
|
477
|
+
padding-block-end: 1rem;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
[data-ui-component="ai-jsonl-view"] .ai-jsonl-view__record {
|
|
481
|
+
display: grid;
|
|
482
|
+
gap: 0.5rem;
|
|
483
|
+
width: 100%;
|
|
484
|
+
min-width: 0;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
[data-ui-component="ai-jsonl-view"] .ai-jsonl-view__tool-detail {
|
|
488
|
+
display: grid;
|
|
489
|
+
gap: 0.5rem;
|
|
490
|
+
width: 100%;
|
|
491
|
+
min-width: 0;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
[data-ui-component="ai-jsonl-view"] .ai-jsonl-view__markdown,
|
|
495
|
+
[data-ui-component="ai-jsonl-view"] .ai-jsonl-view__markdown
|
|
496
|
+
:where(
|
|
497
|
+
.mira-markdown-preview,
|
|
498
|
+
.markdown-preview-surface,
|
|
499
|
+
.markdown-embed-surface,
|
|
500
|
+
.cm-sizer,
|
|
501
|
+
.markdown-view__document
|
|
502
|
+
) {
|
|
503
|
+
--mira-background: transparent;
|
|
504
|
+
--mira-preview-background: transparent;
|
|
505
|
+
--mira-widget-background: transparent;
|
|
506
|
+
--background: transparent;
|
|
507
|
+
--background-primary: transparent;
|
|
508
|
+
--markdown-surface-background: transparent;
|
|
509
|
+
height: auto;
|
|
510
|
+
max-height: none;
|
|
511
|
+
min-height: 0;
|
|
512
|
+
overflow: visible;
|
|
513
|
+
background: transparent;
|
|
514
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type AppToolApprovalDetails, type AppToolRegistry, type AppToolResult, type RegisteredAppTool } from "@lapis-notes/api/agent-tools";
|
|
2
|
+
import type { AppToolSessionDescriptor, ApprovalOptionKind, ApprovalRequest } from "../core/types";
|
|
3
|
+
import { type AiPluginSettings } from "../settings/ai-settings";
|
|
4
|
+
export type AppToolExecutionErrorCode = "approval_denied" | "cancelled" | "execution_failed" | "invalid_arguments" | "invalid_result" | "invalid_tool_schema" | "timed_out" | "tool_unavailable";
|
|
5
|
+
export declare class AppToolExecutionError extends Error {
|
|
6
|
+
readonly code: AppToolExecutionErrorCode;
|
|
7
|
+
constructor(code: AppToolExecutionErrorCode, message: string);
|
|
8
|
+
}
|
|
9
|
+
export type AppToolPolicySettings = Pick<AiPluginSettings, "appToolsEnabled" | "disabledAppToolNames" | "enabledAppToolNames" | "enabledCommunityToolPluginIds">;
|
|
10
|
+
export interface CreateAppToolSessionInput {
|
|
11
|
+
conversationId: string;
|
|
12
|
+
agentBindingId: string;
|
|
13
|
+
scopeDir: string;
|
|
14
|
+
launchNotePath?: string;
|
|
15
|
+
runtimeSupportsAppTools: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface AppToolCall {
|
|
18
|
+
runId: string;
|
|
19
|
+
toolCallId: string;
|
|
20
|
+
name: string;
|
|
21
|
+
input: unknown;
|
|
22
|
+
}
|
|
23
|
+
export type AppToolApprovalListener = (request: ApprovalRequest, bindingId: string) => void;
|
|
24
|
+
export declare class AppToolApprovalBroker {
|
|
25
|
+
#private;
|
|
26
|
+
subscribe(listener: AppToolApprovalListener): () => void;
|
|
27
|
+
request(bindingId: string, tool: RegisteredAppTool, input: unknown, details: AppToolApprovalDetails | undefined, signal: AbortSignal): Promise<ApprovalOptionKind>;
|
|
28
|
+
respond(requestId: string, decision: ApprovalOptionKind): boolean;
|
|
29
|
+
closeBinding(bindingId: string): void;
|
|
30
|
+
close(): void;
|
|
31
|
+
}
|
|
32
|
+
export declare class AppToolHost {
|
|
33
|
+
#private;
|
|
34
|
+
private readonly registry;
|
|
35
|
+
private readonly settings;
|
|
36
|
+
private readonly timeoutMs;
|
|
37
|
+
readonly approvals: AppToolApprovalBroker;
|
|
38
|
+
constructor(registry: AppToolRegistry, settings: () => AppToolPolicySettings, timeoutMs?: number);
|
|
39
|
+
createSession(input: CreateAppToolSessionInput): AppToolSessionDescriptor;
|
|
40
|
+
getSession(agentBindingId: string): AppToolSessionDescriptor | undefined;
|
|
41
|
+
invoke(agentBindingId: string, call: AppToolCall, signal?: AbortSignal): Promise<AppToolResult>;
|
|
42
|
+
closeBinding(agentBindingId: string): void;
|
|
43
|
+
expireOwner(ownerPluginId: string): void;
|
|
44
|
+
close(): void;
|
|
45
|
+
private validateInput;
|
|
46
|
+
private validateResult;
|
|
47
|
+
}
|