@nimbalyst/extension-sdk 0.1.5 → 0.2.1
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 +30 -0
- package/dist/__tests__/createTextCollabContentAdapter.test.d.ts +2 -0
- package/dist/__tests__/createTextCollabContentAdapter.test.d.ts.map +1 -0
- package/dist/__tests__/createTextCollabContentAdapter.test.js +60 -0
- package/dist/__tests__/hasSeedableContent.test.d.ts +2 -0
- package/dist/__tests__/hasSeedableContent.test.d.ts.map +1 -0
- package/dist/__tests__/hasSeedableContent.test.js +25 -0
- package/dist/__tests__/manifestValidation.agentProviders.test.d.ts +2 -0
- package/dist/__tests__/manifestValidation.agentProviders.test.d.ts.map +1 -0
- package/dist/__tests__/manifestValidation.agentProviders.test.js +44 -0
- package/dist/agents/AgentProtocol.d.ts +227 -0
- package/dist/agents/AgentProtocol.d.ts.map +1 -0
- package/dist/agents/AgentProtocol.js +23 -0
- package/dist/agents/AgentProtocolHost.d.ts +190 -0
- package/dist/agents/AgentProtocolHost.d.ts.map +1 -0
- package/dist/agents/AgentProtocolHost.js +42 -0
- package/dist/agents/index.d.ts +26 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +24 -0
- package/dist/collab/createTextCollabContentAdapter.d.ts +26 -0
- package/dist/collab/createTextCollabContentAdapter.d.ts.map +1 -0
- package/dist/collab/createTextCollabContentAdapter.js +79 -0
- package/dist/createReadOnlyHost.d.ts +5 -0
- package/dist/createReadOnlyHost.d.ts.map +1 -1
- package/dist/createReadOnlyHost.js +4 -0
- package/dist/externals.d.ts +3 -3
- package/dist/externals.d.ts.map +1 -1
- package/dist/externals.js +7 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/manifestValidation.d.ts +118 -0
- package/dist/manifestValidation.d.ts.map +1 -0
- package/dist/manifestValidation.js +475 -0
- package/dist/types/collab.d.ts +138 -0
- package/dist/types/collab.d.ts.map +1 -0
- package/dist/types/collab.js +1 -0
- package/dist/types/editor.d.ts +198 -0
- package/dist/types/editor.d.ts.map +1 -1
- package/dist/types/editors.d.ts +4 -0
- package/dist/types/editors.d.ts.map +1 -1
- package/dist/types/extension.d.ts +438 -5
- package/dist/types/extension.d.ts.map +1 -1
- package/dist/types/extension.js +11 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -0
- package/dist/types/panel.d.ts +50 -0
- package/dist/types/panel.d.ts.map +1 -1
- package/dist/types/permissions.d.ts +117 -0
- package/dist/types/permissions.d.ts.map +1 -0
- package/dist/types/permissions.js +33 -0
- package/dist/types/theme.d.ts +67 -0
- package/dist/types/theme.d.ts.map +1 -1
- package/dist/types/theme.js +7 -1
- package/dist/types/trackerImporter.d.ts +147 -0
- package/dist/types/trackerImporter.d.ts.map +1 -0
- package/dist/types/trackerImporter.js +33 -0
- package/dist/useCollaborativeEditor.d.ts +165 -0
- package/dist/useCollaborativeEditor.d.ts.map +1 -0
- package/dist/useCollaborativeEditor.js +253 -0
- package/dist/useEditorLifecycle.d.ts.map +1 -1
- package/dist/useEditorLifecycle.js +9 -5
- package/dist/validate.browser.d.ts +5 -0
- package/dist/validate.browser.d.ts.map +1 -0
- package/dist/validate.browser.js +27 -0
- package/dist/validate.d.ts +2 -8
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +117 -0
- package/dist/validationTypes.d.ts +9 -0
- package/dist/validationTypes.d.ts.map +1 -0
- package/dist/validationTypes.js +1 -0
- package/package.json +16 -3
package/dist/types/panel.d.ts
CHANGED
|
@@ -282,6 +282,46 @@ export interface PanelHost {
|
|
|
282
282
|
* @returns Promise resolving to exec result with stdout, stderr, and exit code
|
|
283
283
|
*/
|
|
284
284
|
exec(command: string, options?: ExecOptions): Promise<ExecResult>;
|
|
285
|
+
/**
|
|
286
|
+
* Read-only access to Nimbalyst's local PGLite database.
|
|
287
|
+
*
|
|
288
|
+
* Requires the extension to declare `"nimbalyst-database-read"` in
|
|
289
|
+
* `permissions.catalog` in manifest.json. Queries run inside a
|
|
290
|
+
* `READ ONLY` transaction with a bounded statement_timeout; any DML/DDL
|
|
291
|
+
* is rejected by the planner.
|
|
292
|
+
*
|
|
293
|
+
* Tables and columns are not part of any stable contract -- this surface
|
|
294
|
+
* is intended for built-in extensions today and will be redesigned when
|
|
295
|
+
* Nimbalyst's storage layer ports to native SQLite. Pin to the host
|
|
296
|
+
* version you tested against.
|
|
297
|
+
*/
|
|
298
|
+
readonly data: ExtensionDataAccess;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Read-only data access surface exposed to extension panels.
|
|
302
|
+
*
|
|
303
|
+
* @example
|
|
304
|
+
* ```typescript
|
|
305
|
+
* const rows = await host.data.query<{ id: string; title: string }>(
|
|
306
|
+
* 'SELECT id, title FROM ai_sessions ORDER BY created_at DESC LIMIT $1',
|
|
307
|
+
* [50]
|
|
308
|
+
* );
|
|
309
|
+
* ```
|
|
310
|
+
*/
|
|
311
|
+
export interface ExtensionDataAccess {
|
|
312
|
+
/**
|
|
313
|
+
* Run a read-only SQL query against the local PGLite database.
|
|
314
|
+
*
|
|
315
|
+
* The query is wrapped in `BEGIN; SET TRANSACTION READ ONLY; SET LOCAL
|
|
316
|
+
* statement_timeout = '5s'; <sql>; COMMIT;` -- DML/DDL is rejected by PG.
|
|
317
|
+
* Multi-statement scripts are not supported; use a single SELECT or CTE.
|
|
318
|
+
*
|
|
319
|
+
* @param sql Parameterized SQL (use `$1`, `$2`, ... placeholders)
|
|
320
|
+
* @param params Bound parameter values (optional)
|
|
321
|
+
* @returns Resolves with the result rows. Rejects with the raw PG error on
|
|
322
|
+
* read-only violations, timeouts, syntax errors, or missing tables.
|
|
323
|
+
*/
|
|
324
|
+
query<T = unknown>(sql: string, params?: unknown[]): Promise<T[]>;
|
|
285
325
|
}
|
|
286
326
|
/**
|
|
287
327
|
* Options for PanelHost.exec() subprocess execution.
|
|
@@ -571,5 +611,15 @@ export interface SettingsPanelProps {
|
|
|
571
611
|
* Current application theme.
|
|
572
612
|
*/
|
|
573
613
|
theme: string;
|
|
614
|
+
/**
|
|
615
|
+
* Call one of this extension's backend-module MCP tools and return its parsed
|
|
616
|
+
* JSON result. Pass the advertised, namespaced tool name (`<extShort>.<tool>`,
|
|
617
|
+
* e.g. `memory.status`). Mirrors {@link ExtensionAIService.callBackendTool};
|
|
618
|
+
* present only for extensions whose backend module registers MCP tools. Lets a
|
|
619
|
+
* settings panel show live state (index status, stored facts) and trigger
|
|
620
|
+
* maintenance actions (rebuild). Throws if the tool errors or the module is
|
|
621
|
+
* not running.
|
|
622
|
+
*/
|
|
623
|
+
callBackendTool?: (toolName: string, args?: Record<string, unknown>) => Promise<unknown>;
|
|
574
624
|
}
|
|
575
625
|
//# sourceMappingURL=panel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../src/types/panel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAM3C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;;;;;;;;;;OAeG;IACH,SAAS,EAAE,SAAS,GAAG,YAAY,GAAG,UAAU,GAAG,QAAQ,CAAC;IAE5D;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE5B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;A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AM,CAAC;IAEX;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,YAAY,EAAE,iBAAiB,CAAC;IAEhC;;OAEG;IACH,OAAO,EAAE,WAAW,CAAC;IAErB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,YAAY,EAAE,yBAAyB,CAAC;IAExC;;OAEG;IACH,SAAS,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,OAAO,EAAE,gBAAgB,CAAC;IAE1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,CAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC3B,OAAO,CAAC,OAAO,CAAC,CAAC;CACvB"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extension permission types.
|
|
3
|
+
*
|
|
4
|
+
* The catalog of valid permission ids is owned by the host (Nimbalyst core).
|
|
5
|
+
* Extensions reference permission ids; they cannot register new ids.
|
|
6
|
+
*
|
|
7
|
+
* Scope of what this catalog actually enforces
|
|
8
|
+
* --------------------------------------------
|
|
9
|
+
* The catalog only contains permissions for capabilities Nimbalyst exposes
|
|
10
|
+
* through main-process brokers (database, workspace files, MCP registration,
|
|
11
|
+
* secrets). Brokers can refuse a call when the grant is missing, so these
|
|
12
|
+
* checks are real.
|
|
13
|
+
*
|
|
14
|
+
* The catalog deliberately does NOT contain ids for ambient Node capabilities
|
|
15
|
+
* like spawn-process, raw fs access, or arbitrary network. Once a backend
|
|
16
|
+
* module is granted (see BackendModuleContribution below), it can call
|
|
17
|
+
* `require('child_process')`, `require('fs')`, `require('net')` directly --
|
|
18
|
+
* there is no in-process sandbox that can prevent that. Listing those as
|
|
19
|
+
* granular permissions would advertise enforcement we cannot deliver.
|
|
20
|
+
*
|
|
21
|
+
* Instead, granting a backend module is itself the consent that "this
|
|
22
|
+
* extension may run native code on this machine with the same trust as your
|
|
23
|
+
* user account." The first-use prompt says this verbatim. Anything finer
|
|
24
|
+
* than that requires OS sandboxing or a different runtime model and is not
|
|
25
|
+
* in scope here.
|
|
26
|
+
*
|
|
27
|
+
* Risk tiers shape how the consent prompt groups brokered permissions:
|
|
28
|
+
* low - routine, low-impact (e.g., reading workspace files)
|
|
29
|
+
* elevated - non-trivial but bounded (e.g., registering MCP tools)
|
|
30
|
+
* high - powerful, broad impact (e.g., writing the host DB, reading
|
|
31
|
+
* secrets)
|
|
32
|
+
*/
|
|
33
|
+
export type PermissionRiskTier = 'low' | 'elevated' | 'high';
|
|
34
|
+
/**
|
|
35
|
+
* The full set of permission ids understood by the host. Every entry here is
|
|
36
|
+
* a host-brokered capability: the renderer or backend module calls a main-
|
|
37
|
+
* process surface that consults the grant before running.
|
|
38
|
+
*
|
|
39
|
+
* Adding a new id here is a coordinated host change: the runtime catalog
|
|
40
|
+
* in the privileged host's `permissionRegistry` must gain a matching entry.
|
|
41
|
+
*
|
|
42
|
+
* Database access splits into read and write so extensions can declare
|
|
43
|
+
* least-privilege intent without composing two grants into one.
|
|
44
|
+
*/
|
|
45
|
+
export type ExtensionPermissionId = 'workspace-files' | 'nimbalyst-database-read' | 'nimbalyst-database-write' | 'secrets-read' | 'mcp-server-register';
|
|
46
|
+
/**
|
|
47
|
+
* Backend module runtime. The privileged host loads the module in one of two
|
|
48
|
+
* isolated runtimes. Choose based on workload:
|
|
49
|
+
*
|
|
50
|
+
* utility-process - separate OS process via Electron `utilityProcess.fork`.
|
|
51
|
+
* Use for process-spawning, networked, or crash-prone
|
|
52
|
+
* backends (kernels, language servers, daemons).
|
|
53
|
+
* worker-thread - `node:worker_threads`. Use for lighter compute / indexing
|
|
54
|
+
* helpers that share the main-process Node lifecycle but
|
|
55
|
+
* run off the event loop.
|
|
56
|
+
*/
|
|
57
|
+
export type BackendModuleRuntime = 'utility-process' | 'worker-thread';
|
|
58
|
+
/**
|
|
59
|
+
* How a privileged capability is enabled.
|
|
60
|
+
*
|
|
61
|
+
* `default: 'disabled'` is the only supported value today. Capabilities are
|
|
62
|
+
* always opt-in by the user.
|
|
63
|
+
*
|
|
64
|
+
* `promptOn: 'firstUse'` defers the consent prompt until the user takes an
|
|
65
|
+
* action that needs the capability. This avoids first-launch consent walls.
|
|
66
|
+
*
|
|
67
|
+
* `purpose` is a one-sentence, human-readable description shown verbatim in
|
|
68
|
+
* the consent prompt. It is the actual security copy the user reads, so
|
|
69
|
+
* write it from the user's perspective ("Run Jupyter kernels and execute
|
|
70
|
+
* notebook cells locally."), not the implementation's.
|
|
71
|
+
*/
|
|
72
|
+
export interface BackendModuleEnablement {
|
|
73
|
+
default: 'disabled';
|
|
74
|
+
promptOn: 'firstUse';
|
|
75
|
+
purpose: string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* A backend module contributed by an extension.
|
|
79
|
+
*
|
|
80
|
+
* Backend modules live outside the renderer in the privileged host. They are
|
|
81
|
+
* inert until the user grants the module at first use.
|
|
82
|
+
*
|
|
83
|
+
* Granting a backend module is itself the consent to run native code on the
|
|
84
|
+
* user's machine. The catalog ids in `permissions` only cover ADDITIONAL
|
|
85
|
+
* host-brokered capabilities (Nimbalyst DB, secrets, MCP registration). They
|
|
86
|
+
* do NOT enumerate raw Node capabilities the module already has via standard
|
|
87
|
+
* `require()`. See the catalog docs at the top of this file.
|
|
88
|
+
*
|
|
89
|
+
* Only extensions on the host's backend-module allowlist may load a module.
|
|
90
|
+
* Built-in extensions are allowed by default; marketplace extensions need an
|
|
91
|
+
* explicit allowlist entry; dev-mode installs require an opt-in env flag.
|
|
92
|
+
*
|
|
93
|
+
* `entry` is a path relative to the extension root pointing at a compiled JS
|
|
94
|
+
* file. The file is loaded inside the chosen runtime, never in Electron main.
|
|
95
|
+
*/
|
|
96
|
+
export interface BackendModuleContribution {
|
|
97
|
+
/** Unique within the extension (e.g., "jupyter-runtime") */
|
|
98
|
+
id: string;
|
|
99
|
+
/** Path to compiled JS entry, relative to extension root */
|
|
100
|
+
entry: string;
|
|
101
|
+
/** Which isolated runtime hosts the module */
|
|
102
|
+
runtime: BackendModuleRuntime;
|
|
103
|
+
/**
|
|
104
|
+
* Additional host-brokered permissions this module requires beyond the
|
|
105
|
+
* implicit "run native code" grant. Optional -- a module that only needs
|
|
106
|
+
* ambient Node capabilities (fs, net, child_process) declares an empty
|
|
107
|
+
* array. The consent prompt always shows the "run native code" line; the
|
|
108
|
+
* brokered ids here appear as additional checkboxes grouped by risk tier.
|
|
109
|
+
*
|
|
110
|
+
* The runtime gate refuses any host-brokered RPC call whose permission is
|
|
111
|
+
* not in this list and not in the user's grant set.
|
|
112
|
+
*/
|
|
113
|
+
permissions: ExtensionPermissionId[];
|
|
114
|
+
/** How/when the user is asked to enable this module */
|
|
115
|
+
enablement: BackendModuleEnablement;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=permissions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/types/permissions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,UAAU,GAAG,MAAM,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,MAAM,MAAM,qBAAqB,GAC7B,iBAAiB,GACjB,yBAAyB,GACzB,0BAA0B,GAC1B,cAAc,GACd,qBAAqB,CAAC;AAE1B;;;;;;;;;;GAUG;AACH,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,GAAG,eAAe,CAAC;AAEvE;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,UAAU,CAAC;IACpB,QAAQ,EAAE,UAAU,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,yBAAyB;IACxC,4DAA4D;IAC5D,EAAE,EAAE,MAAM,CAAC;IAEX,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAC;IAEd,8CAA8C;IAC9C,OAAO,EAAE,oBAAoB,CAAC;IAE9B;;;;;;;;;OASG;IACH,WAAW,EAAE,qBAAqB,EAAE,CAAC;IAErC,uDAAuD;IACvD,UAAU,EAAE,uBAAuB,CAAC;CACrC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extension permission types.
|
|
3
|
+
*
|
|
4
|
+
* The catalog of valid permission ids is owned by the host (Nimbalyst core).
|
|
5
|
+
* Extensions reference permission ids; they cannot register new ids.
|
|
6
|
+
*
|
|
7
|
+
* Scope of what this catalog actually enforces
|
|
8
|
+
* --------------------------------------------
|
|
9
|
+
* The catalog only contains permissions for capabilities Nimbalyst exposes
|
|
10
|
+
* through main-process brokers (database, workspace files, MCP registration,
|
|
11
|
+
* secrets). Brokers can refuse a call when the grant is missing, so these
|
|
12
|
+
* checks are real.
|
|
13
|
+
*
|
|
14
|
+
* The catalog deliberately does NOT contain ids for ambient Node capabilities
|
|
15
|
+
* like spawn-process, raw fs access, or arbitrary network. Once a backend
|
|
16
|
+
* module is granted (see BackendModuleContribution below), it can call
|
|
17
|
+
* `require('child_process')`, `require('fs')`, `require('net')` directly --
|
|
18
|
+
* there is no in-process sandbox that can prevent that. Listing those as
|
|
19
|
+
* granular permissions would advertise enforcement we cannot deliver.
|
|
20
|
+
*
|
|
21
|
+
* Instead, granting a backend module is itself the consent that "this
|
|
22
|
+
* extension may run native code on this machine with the same trust as your
|
|
23
|
+
* user account." The first-use prompt says this verbatim. Anything finer
|
|
24
|
+
* than that requires OS sandboxing or a different runtime model and is not
|
|
25
|
+
* in scope here.
|
|
26
|
+
*
|
|
27
|
+
* Risk tiers shape how the consent prompt groups brokered permissions:
|
|
28
|
+
* low - routine, low-impact (e.g., reading workspace files)
|
|
29
|
+
* elevated - non-trivial but bounded (e.g., registering MCP tools)
|
|
30
|
+
* high - powerful, broad impact (e.g., writing the host DB, reading
|
|
31
|
+
* secrets)
|
|
32
|
+
*/
|
|
33
|
+
export {};
|
package/dist/types/theme.d.ts
CHANGED
|
@@ -14,9 +14,66 @@ export type ThemeColorKey = 'bg' | 'bg-secondary' | 'bg-tertiary' | 'bg-hover' |
|
|
|
14
14
|
* All colors are optional - missing colors will fall back to base theme.
|
|
15
15
|
*/
|
|
16
16
|
export type ThemeColors = Partial<Record<ThemeColorKey, string>>;
|
|
17
|
+
/**
|
|
18
|
+
* Built-in Monaco theme ids accepted as the `base` field on a
|
|
19
|
+
* `MonacoThemeContribution`. Single source of truth -- the manifest
|
|
20
|
+
* validator, the renderer registry helper, and consumer-facing docs
|
|
21
|
+
* all derive from this list.
|
|
22
|
+
*/
|
|
23
|
+
export declare const MONACO_BASE_THEMES: readonly ["vs", "vs-dark", "hc-black", "hc-light"];
|
|
24
|
+
export type MonacoBaseTheme = typeof MONACO_BASE_THEMES[number];
|
|
25
|
+
/**
|
|
26
|
+
* Monaco editor token rule -- mirrors monaco-editor's
|
|
27
|
+
* `editor.ITokenThemeRule`. Keeping the shape redeclared (rather than
|
|
28
|
+
* importing from monaco-editor) so extension manifests can be validated
|
|
29
|
+
* and processed in contexts that don't bundle Monaco.
|
|
30
|
+
*/
|
|
31
|
+
export interface MonacoTokenRule {
|
|
32
|
+
/** Token id (e.g. 'comment', 'keyword.js', 'string.escape') */
|
|
33
|
+
token: string;
|
|
34
|
+
/** Hex color WITHOUT leading '#' (Monaco convention) */
|
|
35
|
+
foreground?: string;
|
|
36
|
+
/** Hex color WITHOUT leading '#' */
|
|
37
|
+
background?: string;
|
|
38
|
+
/** Space-separated styles: 'italic', 'bold', 'underline' */
|
|
39
|
+
fontStyle?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Monaco editor theme contribution embedded in a ThemeContribution.
|
|
43
|
+
* When present, the runtime registers a matching Monaco theme via
|
|
44
|
+
* `monaco.editor.defineTheme()` and routes Monaco-backed editors
|
|
45
|
+
* (code files, JSON, etc.) to use it.
|
|
46
|
+
*
|
|
47
|
+
* `base` selects the Monaco built-in theme to inherit from. `rules`
|
|
48
|
+
* carries token-level color rules; `colors` carries Monaco's
|
|
49
|
+
* editor.* color keys (e.g. 'editor.background').
|
|
50
|
+
*/
|
|
51
|
+
export interface MonacoThemeContribution {
|
|
52
|
+
/** Built-in Monaco theme used as the base for inheritance */
|
|
53
|
+
base: MonacoBaseTheme;
|
|
54
|
+
/**
|
|
55
|
+
* Whether to inherit unspecified rules/colors from `base`.
|
|
56
|
+
* Defaults to true (matches Monaco's `defineTheme` default).
|
|
57
|
+
*/
|
|
58
|
+
inherit?: boolean;
|
|
59
|
+
/** Token rules applied to syntax-highlighted text */
|
|
60
|
+
rules: MonacoTokenRule[];
|
|
61
|
+
/**
|
|
62
|
+
* Editor color overrides keyed by Monaco color id
|
|
63
|
+
* (e.g. 'editor.background', 'editor.foreground').
|
|
64
|
+
*/
|
|
65
|
+
colors: Record<string, string>;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Where a theme entry returned by `theme:list` originated from.
|
|
69
|
+
*/
|
|
70
|
+
export type ThemeManifestOrigin = 'builtin' | 'user' | 'extension';
|
|
17
71
|
/**
|
|
18
72
|
* Theme manifest schema (theme.json).
|
|
19
73
|
* This is the schema for standalone theme packages.
|
|
74
|
+
*
|
|
75
|
+
* The same shape is also returned by the runtime `theme:list` IPC for
|
|
76
|
+
* extension-contributed themes, with `origin` and `contributedBy` populated.
|
|
20
77
|
*/
|
|
21
78
|
export interface ThemeManifest {
|
|
22
79
|
/** Unique theme identifier (e.g., 'solarized-dark') */
|
|
@@ -45,6 +102,16 @@ export interface ThemeManifest {
|
|
|
45
102
|
license?: string;
|
|
46
103
|
/** Homepage or repository URL */
|
|
47
104
|
homepage?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Where this theme came from. Populated by the runtime when listing themes.
|
|
107
|
+
* Not part of the on-disk theme.json schema.
|
|
108
|
+
*/
|
|
109
|
+
origin?: ThemeManifestOrigin;
|
|
110
|
+
/**
|
|
111
|
+
* Extension ID that contributed this theme (only set when `origin === 'extension'`).
|
|
112
|
+
* Not part of the on-disk theme.json schema.
|
|
113
|
+
*/
|
|
114
|
+
contributedBy?: string;
|
|
48
115
|
}
|
|
49
116
|
/**
|
|
50
117
|
* Full theme object with metadata and resolved colors.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/types/theme.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,MAAM,aAAa,GAErB,IAAI,GAAG,cAAc,GAAG,aAAa,GAAG,UAAU,GAAG,aAAa,GAAG,WAAW,GAEhF,MAAM,GAAG,YAAY,GAAG,YAAY,GAAG,eAAe,GAEtD,QAAQ,GAAG,cAAc,GAEzB,SAAS,GAAG,eAAe,GAE3B,MAAM,GAAG,YAAY,GAErB,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAE7C;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC;AAEjE;;;
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/types/theme.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,MAAM,aAAa,GAErB,IAAI,GAAG,cAAc,GAAG,aAAa,GAAG,UAAU,GAAG,aAAa,GAAG,WAAW,GAEhF,MAAM,GAAG,YAAY,GAAG,YAAY,GAAG,eAAe,GAEtD,QAAQ,GAAG,cAAc,GAEzB,SAAS,GAAG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AE,MAAM,CAAC;IAEb,aAAa;IACb,MAAM,EAAE,MAAM,CAAC;IAEf,cAAc;IACd,OAAO,EAAE,MAAM,CAAC;IAEhB,kBAAkB;IAClB,WAAW,EAAE,MAAM,CAAC;IAEpB,qBAAqB;IACrB,SAAS,EAAE,MAAM,CAAC;IAElB,2BAA2B;IAC3B,MAAM,EAAE,MAAM,CAAC;IAEf,WAAW;IACX,IAAI,EAAE,MAAM,EAAE,CAAC;IAEf,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;IAEhB,qCAAqC;IACrC,WAAW,EAAE,MAAM,CAAC;IAEpB,4BAA4B;IAC5B,WAAW,EAAE,MAAM,CAAC;IAEpB,cAAc;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,mBAAmB;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,iCAAiC;IACjC,KAAK,EAAE,OAAO,CAAC;IAEf,iCAAiC;IACjC,MAAM,EAAE,MAAM,EAAE,CAAC;IAEjB,sCAAsC;IACtC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IAEf,uDAAuD;IACvD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAC;IAEhB,iDAAiD;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB"}
|
package/dist/types/theme.js
CHANGED
|
@@ -4,4 +4,10 @@
|
|
|
4
4
|
* Themes are separate from extensions - they provide styling only, no code.
|
|
5
5
|
* This module defines the schema for theme.json manifests and theme metadata.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Built-in Monaco theme ids accepted as the `base` field on a
|
|
9
|
+
* `MonacoThemeContribution`. Single source of truth -- the manifest
|
|
10
|
+
* validator, the renderer registry helper, and consumer-facing docs
|
|
11
|
+
* all derive from this list.
|
|
12
|
+
*/
|
|
13
|
+
export const MONACO_BASE_THEMES = ['vs', 'vs-dark', 'hc-black', 'hc-light'];
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tracker importer contract.
|
|
3
|
+
*
|
|
4
|
+
* An importer lets Nimbalyst pull items from an external system (GitHub Issues,
|
|
5
|
+
* Linear, ...) into the native tracker as ordinary items that carry a back-link
|
|
6
|
+
* to their upstream source (see the `origin` field on tracker items).
|
|
7
|
+
*
|
|
8
|
+
* This is a strict READ-side, one-shot subset of the broader `TrackerProvider`
|
|
9
|
+
* design: `listBindings` + `list` + `fetch` are enough to power snapshot import.
|
|
10
|
+
* Write/sync/comment methods can be added later as optional methods without
|
|
11
|
+
* breaking importers written against this contract.
|
|
12
|
+
*
|
|
13
|
+
* ## Runtime model
|
|
14
|
+
*
|
|
15
|
+
* Importers do privileged work (network calls, spawning `gh`, reading tokens),
|
|
16
|
+
* so the implementation runs inside the extension's **backend module**
|
|
17
|
+
* (utility-process) — not the renderer. The methods below are the RPC surface
|
|
18
|
+
* the backend module exports under the `importer.*` namespace; the host's
|
|
19
|
+
* `TrackerImporterRegistry` invokes them and owns turning a {@link TrackerSnapshot}
|
|
20
|
+
* into a real tracker item through the normal create path (so sync, body Y.Doc,
|
|
21
|
+
* activity, and issue-key allocation all fire identically to a hand-created item).
|
|
22
|
+
*
|
|
23
|
+
* The contribution therefore points at a `backendModuleId` (declared in
|
|
24
|
+
* `contributions.backendModules`) rather than a renderer component.
|
|
25
|
+
*/
|
|
26
|
+
/** Method names the importer backend module must export, namespaced `importer.*`. */
|
|
27
|
+
export declare const TRACKER_IMPORTER_RPC_METHODS: {
|
|
28
|
+
readonly isAuthenticated: "importer.isAuthenticated";
|
|
29
|
+
readonly listBindings: "importer.listBindings";
|
|
30
|
+
readonly list: "importer.list";
|
|
31
|
+
readonly fetch: "importer.fetch";
|
|
32
|
+
readonly openExternal: "importer.openExternal";
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Manifest declaration for an importer. Lives in
|
|
36
|
+
* `contributions.trackerImporters[]`.
|
|
37
|
+
*/
|
|
38
|
+
export interface TrackerImporterContribution {
|
|
39
|
+
/** Stable id, kebab-case. Used as the `providerId` on imported items' origin. */
|
|
40
|
+
id: string;
|
|
41
|
+
/** Human-readable name, e.g. 'GitHub Issues'. */
|
|
42
|
+
displayName: string;
|
|
43
|
+
/** Material icon name, e.g. 'bug_report'. */
|
|
44
|
+
icon: string;
|
|
45
|
+
/** URN scheme this importer owns, e.g. 'github' | 'linear'. Routes by URN. */
|
|
46
|
+
urnScheme: string;
|
|
47
|
+
/**
|
|
48
|
+
* Id of the backend module (from `contributions.backendModules`) that
|
|
49
|
+
* implements the `importer.*` RPC methods.
|
|
50
|
+
*/
|
|
51
|
+
backendModuleId: string;
|
|
52
|
+
/** Tracker types this importer may create. Empty/undefined = any creatable type. */
|
|
53
|
+
importsAs?: string[];
|
|
54
|
+
/** Settings panel id (from `contributions.settingsPanel`) handling auth + bindings. */
|
|
55
|
+
settingsPanelId?: string;
|
|
56
|
+
}
|
|
57
|
+
/** A configured import target within a provider (a GitHub repo, a Linear team, ...). */
|
|
58
|
+
export interface ImporterBinding {
|
|
59
|
+
/** Per-binding id, e.g. 'nimbalyst/nimbalyst' for a GitHub repo. */
|
|
60
|
+
id: string;
|
|
61
|
+
/** Human-readable label for the binding chooser. */
|
|
62
|
+
label: string;
|
|
63
|
+
}
|
|
64
|
+
/** Advisory filters for {@link ImporterMethods.list}. The importer applies what it supports. */
|
|
65
|
+
export interface ImporterListFilter {
|
|
66
|
+
search?: string;
|
|
67
|
+
state?: 'open' | 'closed' | 'all';
|
|
68
|
+
labels?: string[];
|
|
69
|
+
cursor?: string;
|
|
70
|
+
limit?: number;
|
|
71
|
+
}
|
|
72
|
+
/** Lightweight list entry; the full body is fetched lazily via {@link ImporterMethods.fetch}. */
|
|
73
|
+
export interface ImporterListEntry {
|
|
74
|
+
externalId: string;
|
|
75
|
+
urn: string;
|
|
76
|
+
url: string;
|
|
77
|
+
title: string;
|
|
78
|
+
state: string;
|
|
79
|
+
updatedAt: string;
|
|
80
|
+
}
|
|
81
|
+
export interface ImporterListPage {
|
|
82
|
+
items: ImporterListEntry[];
|
|
83
|
+
nextCursor?: string;
|
|
84
|
+
}
|
|
85
|
+
/** Identity of an upstream author, matching the host's tracker identity shape. */
|
|
86
|
+
export interface ImporterIdentity {
|
|
87
|
+
email: string | null;
|
|
88
|
+
displayName: string;
|
|
89
|
+
gitName?: string | null;
|
|
90
|
+
gitEmail?: string | null;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Pointer to the upstream record, minus the host-stamped timestamps
|
|
94
|
+
* (`importedAt` / `lastSyncedAt`), which the host fills in on import.
|
|
95
|
+
*/
|
|
96
|
+
export interface ImporterExternalRef {
|
|
97
|
+
providerId: string;
|
|
98
|
+
externalId: string;
|
|
99
|
+
urn: string;
|
|
100
|
+
url: string;
|
|
101
|
+
titleSnapshot: string;
|
|
102
|
+
stateSnapshot?: string;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* One-shot snapshot returned by {@link ImporterMethods.fetch}. The host converts
|
|
106
|
+
* this into a tracker item (markdown body -> Lexical state, status mapped to a
|
|
107
|
+
* workspace status, etc.).
|
|
108
|
+
*/
|
|
109
|
+
export interface TrackerSnapshot {
|
|
110
|
+
external: ImporterExternalRef;
|
|
111
|
+
/** Tracker type to create as; importer picks from its `importsAs`. */
|
|
112
|
+
primaryType: string;
|
|
113
|
+
title: string;
|
|
114
|
+
/** Markdown body; host converts to Lexical content on insert. */
|
|
115
|
+
body?: string;
|
|
116
|
+
status?: string;
|
|
117
|
+
priority?: string;
|
|
118
|
+
labels?: string[];
|
|
119
|
+
authorIdentity?: ImporterIdentity | null;
|
|
120
|
+
upstreamCreatedAt?: string;
|
|
121
|
+
upstreamUpdatedAt?: string;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* The RPC surface an importer backend module implements. Each method maps to a
|
|
125
|
+
* `TRACKER_IMPORTER_RPC_METHODS` entry. All are async (they cross the
|
|
126
|
+
* backend-module RPC boundary).
|
|
127
|
+
*/
|
|
128
|
+
export interface ImporterMethods {
|
|
129
|
+
/** Has the user authenticated this importer? UI hides import flows otherwise. */
|
|
130
|
+
isAuthenticated(): Promise<boolean>;
|
|
131
|
+
/** Per-workspace targets the user configured (repos, teams). */
|
|
132
|
+
listBindings(): Promise<ImporterBinding[]>;
|
|
133
|
+
/** Page through importable items for one binding. */
|
|
134
|
+
list(args: {
|
|
135
|
+
binding: ImporterBinding;
|
|
136
|
+
filters: ImporterListFilter;
|
|
137
|
+
}): Promise<ImporterListPage>;
|
|
138
|
+
/** Pull one external item as a snapshot. One-shot read; the host decides create vs merge. */
|
|
139
|
+
fetch(args: {
|
|
140
|
+
externalId: string;
|
|
141
|
+
}): Promise<TrackerSnapshot>;
|
|
142
|
+
/** Optional: open the external item in the default browser. */
|
|
143
|
+
openExternal?(args: {
|
|
144
|
+
externalId: string;
|
|
145
|
+
}): Promise<void>;
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=trackerImporter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trackerImporter.d.ts","sourceRoot":"","sources":["../../src/types/trackerImporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,qFAAqF;AACrF,eAAO,MAAM,4BAA4B;;;;;;CAM/B,CAAC;AAEX;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,iFAAiF;IACjF,EAAE,EAAE,MAAM,CAAC;IACX,iDAAiD;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,SAAS,EAAE,MA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balyst pull items from an external system (GitHub Issues,
|
|
5
|
+
* Linear, ...) into the native tracker as ordinary items that carry a back-link
|
|
6
|
+
* to their upstream source (see the `origin` field on tracker items).
|
|
7
|
+
*
|
|
8
|
+
* This is a strict READ-side, one-shot subset of the broader `TrackerProvider`
|
|
9
|
+
* design: `listBindings` + `list` + `fetch` are enough to power snapshot import.
|
|
10
|
+
* Write/sync/comment methods can be added later as optional methods without
|
|
11
|
+
* breaking importers written against this contract.
|
|
12
|
+
*
|
|
13
|
+
* ## Runtime model
|
|
14
|
+
*
|
|
15
|
+
* Importers do privileged work (network calls, spawning `gh`, reading tokens),
|
|
16
|
+
* so the implementation runs inside the extension's **backend module**
|
|
17
|
+
* (utility-process) — not the renderer. The methods below are the RPC surface
|
|
18
|
+
* the backend module exports under the `importer.*` namespace; the host's
|
|
19
|
+
* `TrackerImporterRegistry` invokes them and owns turning a {@link TrackerSnapshot}
|
|
20
|
+
* into a real tracker item through the normal create path (so sync, body Y.Doc,
|
|
21
|
+
* activity, and issue-key allocation all fire identically to a hand-created item).
|
|
22
|
+
*
|
|
23
|
+
* The contribution therefore points at a `backendModuleId` (declared in
|
|
24
|
+
* `contributions.backendModules`) rather than a renderer component.
|
|
25
|
+
*/
|
|
26
|
+
/** Method names the importer backend module must export, namespaced `importer.*`. */
|
|
27
|
+
export const TRACKER_IMPORTER_RPC_METHODS = {
|
|
28
|
+
isAuthenticated: 'importer.isAuthenticated',
|
|
29
|
+
listBindings: 'importer.listBindings',
|
|
30
|
+
list: 'importer.list',
|
|
31
|
+
fetch: 'importer.fetch',
|
|
32
|
+
openExternal: 'importer.openExternal',
|
|
33
|
+
};
|