@omercnet/paseo-context-mode 0.0.0-next.127.2
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/LICENSE +21 -0
- package/NOTICE +7 -0
- package/README.md +74 -0
- package/client/actions-section.tsx +621 -0
- package/client/analytics-dashboard.tsx +721 -0
- package/client/context-mode-pill.tsx +106 -0
- package/client/context-mode-surface.tsx +414 -0
- package/client/knowledge-section.tsx +780 -0
- package/client/settings-screen.tsx +226 -0
- package/index.client.tsx +43 -0
- package/index.server.ts +54 -0
- package/package.json +72 -0
- package/paseo-plugin.json +5 -0
- package/server/actions.ts +146 -0
- package/server/analytics.ts +424 -0
- package/server/binary.ts +182 -0
- package/server/context-mode-db.ts +481 -0
- package/server/handlers.ts +200 -0
- package/server/integration.ts +441 -0
- package/server/knowledge.ts +187 -0
- package/server/mcp-process.ts +357 -0
- package/server/storage-discovery.ts +225 -0
- package/shared/actions.ts +57 -0
- package/shared/analytics.ts +134 -0
- package/shared/contracts.ts +95 -0
- package/shared/index.ts +5 -0
- package/shared/knowledge.ts +150 -0
- package/shared/settings.ts +51 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Omer Cohen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
paseo-context-mode is an independent integration for Context Mode.
|
|
2
|
+
|
|
3
|
+
Context Mode is developed by Mert Koseoglu and contributors at
|
|
4
|
+
https://github.com/mksglu/context-mode and is distributed under the Elastic
|
|
5
|
+
License 2.0. This package declares Context Mode as a runtime dependency and
|
|
6
|
+
retains its license and notices. Context Mode remains a separate work subject
|
|
7
|
+
to its Elastic License 2.0 terms.
|
package/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Paseo Context Mode
|
|
2
|
+
|
|
3
|
+
A Paseo sidebar and provider integration for [Context Mode](https://github.com/mksglu/context-mode). It bundles a pinned Context Mode runtime, shows health and savings, and activates Context Mode for supported Paseo agents without replacing existing provider-native integrations.
|
|
4
|
+
|
|
5
|
+
## Screenshots
|
|
6
|
+
|
|
7
|
+
These previews were captured from an isolated Paseo test daemon with Context Mode installed on a disposable home. The browser opened the real plugin surface on the daemon's Tailscale address, and both PNGs are 2× captures of the live data-backed UI.
|
|
8
|
+
|
|
9
|
+
### Wide surface
|
|
10
|
+
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
### Compact surface
|
|
14
|
+
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
## Current scope
|
|
18
|
+
|
|
19
|
+
- Bundles Context Mode as a runtime dependency; a separately installed global executable remains optional.
|
|
20
|
+
- Resolves a configured absolute executable first, then the daemon's `PATH`, then the bundled runtime.
|
|
21
|
+
- Shows Context Mode version, structured diagnostics, provider activation, storage roots, lifetime savings, activity, categories, and indexed sources.
|
|
22
|
+
- Reads Context Mode 1.0.169 SQLite databases in query-only mode, honors active WAL state, isolates corrupt databases, and reports partial coverage instead of mutating schemas.
|
|
23
|
+
- Injects the bundled stdio MCP server into new supported agents through Paseo's `agent.create` hook.
|
|
24
|
+
- Injects provider identity and an existing provider-specific storage root on create, resume, refresh, and import.
|
|
25
|
+
- Preserves existing MCP servers and explicit environment overrides.
|
|
26
|
+
- Prefers detected native provider integrations to avoid duplicate `ctx_*` tools.
|
|
27
|
+
- Reuses existing provider-specific databases. It does not merge session databases across providers because Context Mode intentionally isolates their session identities.
|
|
28
|
+
- Provides provider- and project-scoped knowledge search, local-path indexing, URL fetch/index, indexed-source visibility, and an Insight link.
|
|
29
|
+
- Requires an explicit provider, project path, scope review, and second confirmation before purge. Purge remains delegated to Context Mode's own MCP contract.
|
|
30
|
+
- Returns structured install and provider-specific upgrade argv for review; Paseo never executes those commands automatically.
|
|
31
|
+
- Adds a per-agent composer shortcut to the Context Mode surface.
|
|
32
|
+
|
|
33
|
+
Context Mode currently couples sessions, stats, and indexed content under `CONTEXT_MODE_DIR`. Until upstream supports separate session and content roots, this plugin keeps storage provider-scoped instead of risking cross-provider session contamination.
|
|
34
|
+
|
|
35
|
+
## Prerequisites
|
|
36
|
+
|
|
37
|
+
Node.js 24 or later is required by this plugin. The bundled Context Mode runtime is installed with the plugin. Native provider integrations such as OMP's plugin remain recommended because generic MCP injection provides tools but cannot add provider-native lifecycle hooks.
|
|
38
|
+
|
|
39
|
+
The plugin depends on the upstream `context-mode` npm package under the Elastic License 2.0. See [NOTICE](NOTICE).
|
|
40
|
+
|
|
41
|
+
## Install
|
|
42
|
+
|
|
43
|
+
Plugins are trusted, unsandboxed code. Install only on a Paseo daemon you control.
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
cd context-mode
|
|
47
|
+
npm ci
|
|
48
|
+
npm run typecheck
|
|
49
|
+
paseo plugin install /absolute/path/to/context-mode --host 127.0.0.1:PORT
|
|
50
|
+
paseo plugin ls --host 127.0.0.1:PORT
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Enable plugins for that host before installation. For development, start the daemon with an explicit isolated `--home`, then target its explicit `--host` for plugin lifecycle commands. Current Paseo rejects supplying `--home` and `--host` together because they are alternate target selectors.
|
|
54
|
+
|
|
55
|
+
Open **Context Mode** in the sidebar, use the per-agent composer pill, or run **Open Context Mode** from the Command Center. Use **Settings → Plugins → Context Mode settings** to configure executable precedence, automatic activation, native-integration preference, and refresh interval.
|
|
56
|
+
|
|
57
|
+
## Commands and limits
|
|
58
|
+
|
|
59
|
+
The daemon launches Context Mode directly with an argv array and no shell. MCP calls cover diagnostics, raw stats fallback, search, indexing, fetch/index, and explicitly confirmed purge. Each subprocess has a 12-second timeout and a 192 KiB combined output cap. Status is cached for 10 seconds and raw stats for 5 seconds.
|
|
60
|
+
|
|
61
|
+
Install and upgrade actions return separate program and argument fields. They are displayed for review and never executed by the plugin. Older Context Mode builds that lack required tools are reported as unsupported. Missing executables, launch failures, timeouts, protocol errors, output limits, unsupported database schemas, locked databases, and partial database scans are surfaced as typed states or warnings.
|
|
62
|
+
|
|
63
|
+
## Development
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npm ci
|
|
67
|
+
npm run typecheck
|
|
68
|
+
npm test
|
|
69
|
+
npm run check
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Licensing and attribution
|
|
73
|
+
|
|
74
|
+
The plugin is MIT licensed. Context Mode is a separate project by Mert Koseoglu and contributors, distributed under the Elastic License 2.0. See [NOTICE](NOTICE).
|