@nanobpm/nano-ide-ext-types 1.2.0 → 1.4.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/dist/index.d.ts +128 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ExtKind = "lang" | "app" | "example" | "theme";
|
|
1
|
+
export type ExtKind = "lang" | "app" | "example" | "theme" | "trigger";
|
|
2
2
|
export interface FileType {
|
|
3
3
|
/** File extension including the dot, e.g. ".rs". */
|
|
4
4
|
ext: string;
|
|
@@ -69,6 +69,125 @@ export interface ThemeSpec {
|
|
|
69
69
|
/** Design-token name -> CSS colour. Unknown keys are ignored by the host. */
|
|
70
70
|
tokens: Partial<Record<ThemeTokenKey, string>>;
|
|
71
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* IntelliSense data a lang pack ships for the console's Monaco editor. The
|
|
74
|
+
* console has a real language service only for TypeScript/JavaScript (Monaco's
|
|
75
|
+
* built-in TS worker); every other language gets tokenisation only. A pack can
|
|
76
|
+
* light up completion, hover, and signature help for its `monacoLang` by
|
|
77
|
+
* shipping this curated data — no in-browser language server required. The host
|
|
78
|
+
* registers one provider per `monacoLang` and feeds it every pack's entries.
|
|
79
|
+
*/
|
|
80
|
+
export interface LangIntellisense {
|
|
81
|
+
/** Monaco language id these entries apply to (e.g. "csharp", "rust"). */
|
|
82
|
+
monacoLang: string;
|
|
83
|
+
/** Extra characters that reopen the completion popup (e.g. ["."]). The word
|
|
84
|
+
* character set always triggers completion; add member-access dots etc. */
|
|
85
|
+
triggerCharacters?: string[];
|
|
86
|
+
/** Completion items offered in files of this language. */
|
|
87
|
+
completions?: CompletionSpec[];
|
|
88
|
+
/** Hover cards keyed by the exact symbol under the cursor. */
|
|
89
|
+
hovers?: HoverSpec[];
|
|
90
|
+
/** Signature-help entries shown while typing a call's arguments. */
|
|
91
|
+
signatures?: SignatureSpec[];
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Monaco `CompletionItemKind` names a pack may use. The listed names are the
|
|
95
|
+
* commonly-emitted ones and exist only as authoring hints — the real authority
|
|
96
|
+
* is the host's kind→Monaco mapping, which renders any unknown value as
|
|
97
|
+
* `Value`. The union is intentionally open (`string & {}`) because the mapping
|
|
98
|
+
* lives in a separate repo (the console), so a closed set here can't be
|
|
99
|
+
* compile-time reconciled with it and would only drift; keeping it open means a
|
|
100
|
+
* new generator-emitted kind never breaks consumers of this package.
|
|
101
|
+
*/
|
|
102
|
+
export type CompletionKind = "keyword" | "snippet" | "function" | "method" | "constructor" | "class" | "struct" | "interface" | "enum" | "module" | "property" | "field" | "variable" | "constant" | "value" | (string & {});
|
|
103
|
+
/** One completion item. `insertText` defaults to `label`. */
|
|
104
|
+
export interface CompletionSpec {
|
|
105
|
+
/** Text shown in the completion list. */
|
|
106
|
+
label: string;
|
|
107
|
+
/** Icon/category. Defaults to "value" when omitted. */
|
|
108
|
+
kind?: CompletionKind;
|
|
109
|
+
/** Text inserted on accept. Defaults to `label`. */
|
|
110
|
+
insertText?: string;
|
|
111
|
+
/** When true, `insertText` is a Monaco snippet (`${1:name}` placeholders). */
|
|
112
|
+
snippet?: boolean;
|
|
113
|
+
/** Short right-aligned signature/type (e.g. the return type). */
|
|
114
|
+
detail?: string;
|
|
115
|
+
/** Markdown documentation shown in the details flyout. */
|
|
116
|
+
documentation?: string;
|
|
117
|
+
}
|
|
118
|
+
/** A hover card: shown when the pointer rests on `symbol`. */
|
|
119
|
+
export interface HoverSpec {
|
|
120
|
+
/** Exact identifier that triggers this hover (whole-word match). */
|
|
121
|
+
symbol: string;
|
|
122
|
+
/** Markdown rendered in the hover card. */
|
|
123
|
+
contents: string;
|
|
124
|
+
}
|
|
125
|
+
/** One function/method signature surfaced by signature help. */
|
|
126
|
+
export interface SignatureSpec {
|
|
127
|
+
/** Identifier that, when followed by `(`, triggers this help (e.g.
|
|
128
|
+
* "CreateProcessInstanceAsync"). */
|
|
129
|
+
trigger: string;
|
|
130
|
+
/** Full signature line shown in the popup. */
|
|
131
|
+
label: string;
|
|
132
|
+
/** Markdown documentation for the call. */
|
|
133
|
+
documentation?: string;
|
|
134
|
+
/** Ordered parameters; the active one is highlighted by comma position. */
|
|
135
|
+
parameters?: SignatureParam[];
|
|
136
|
+
}
|
|
137
|
+
/** One parameter within a {@link SignatureSpec}. */
|
|
138
|
+
export interface SignatureParam {
|
|
139
|
+
/** Parameter label as it appears in the signature (e.g. "id: string"). */
|
|
140
|
+
label: string;
|
|
141
|
+
/** Markdown documentation for this parameter. */
|
|
142
|
+
documentation?: string;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* One config field a pack surfaces in the console (read-only in the IDE config
|
|
146
|
+
* panel; for a trigger source, the fields a trigger of this `kind` renders).
|
|
147
|
+
*/
|
|
148
|
+
export interface ConfigField {
|
|
149
|
+
/** Stable key within the pack (the manifest trigger's `config[key]`). */
|
|
150
|
+
key: string;
|
|
151
|
+
/** Human-facing label. */
|
|
152
|
+
label: string;
|
|
153
|
+
/** What the field controls. */
|
|
154
|
+
description?: string;
|
|
155
|
+
/** Environment variable this field reads its current value from, if any. */
|
|
156
|
+
env?: string;
|
|
157
|
+
/** Documented default when unset. */
|
|
158
|
+
default?: string;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* How a trigger source pack's events reach the runtime (ADR 0025 §6). Only
|
|
162
|
+
* `webhook` — the universal ingress the driver POSTs to — is honoured in v1;
|
|
163
|
+
* the field is forward-declared so a pack states its contract explicitly.
|
|
164
|
+
*/
|
|
165
|
+
export type SourceTransport = "webhook";
|
|
166
|
+
/**
|
|
167
|
+
* One trigger source **kind** a `kind: "trigger"` pack contributes (ADR 0025
|
|
168
|
+
* §6). Registering a `kind` lets a manifest trigger use it and the
|
|
169
|
+
* console/validation recognise it. The pack's out-of-process `driver` (a
|
|
170
|
+
* Node/Deno process, ADR 0038/0036) emits events over the trigger ingress; the
|
|
171
|
+
* runtime owns the inbox/dispatch/retry — the pack only produces events.
|
|
172
|
+
*/
|
|
173
|
+
export interface TriggerSourceSpec {
|
|
174
|
+
/** The `type` string a manifest trigger uses (e.g. "mqtt", "imap"). */
|
|
175
|
+
kind: string;
|
|
176
|
+
/** Human label for the console source picker. */
|
|
177
|
+
displayName?: string;
|
|
178
|
+
/** How the runtime receives this source's events. Defaults to "webhook". */
|
|
179
|
+
transport?: SourceTransport;
|
|
180
|
+
/** Config fields the console renders for a trigger of this kind. */
|
|
181
|
+
configFields?: ConfigField[];
|
|
182
|
+
/**
|
|
183
|
+
* Pack-relative path to the out-of-process driver entrypoint (a Node/Deno
|
|
184
|
+
* `.ts`/`.js`/`.mjs` file). When present, the runtime auto-launches and
|
|
185
|
+
* supervises the driver while an App with a trigger of this `kind` runs
|
|
186
|
+
* (ADR 0025 phase 4): one child process per such trigger, restarted with
|
|
187
|
+
* backoff on crash, killed when the App stops. Absent = declaration-only.
|
|
188
|
+
*/
|
|
189
|
+
driver?: string;
|
|
190
|
+
}
|
|
72
191
|
export interface ExtManifest {
|
|
73
192
|
id: string;
|
|
74
193
|
kind: ExtKind;
|
|
@@ -93,7 +212,15 @@ export interface ExtManifest {
|
|
|
93
212
|
summary?: string;
|
|
94
213
|
/** theme packs: the console colour themes this pack contributes. */
|
|
95
214
|
themes?: ThemeSpec[];
|
|
215
|
+
/** lang packs: curated IntelliSense (completion/hover/signature) for the
|
|
216
|
+
* pack's languages, since the console has no in-browser language server for
|
|
217
|
+
* anything but TypeScript. One entry per `monacoLang`. */
|
|
218
|
+
intellisense?: LangIntellisense[];
|
|
96
219
|
/** Built-in packs set this; published packs omit it. */
|
|
97
220
|
builtin?: boolean;
|
|
221
|
+
/** trigger packs: the trigger source kinds this pack contributes (ADR 0025
|
|
222
|
+
* §6). Each entry registers a `type` a manifest trigger can use; the pack's
|
|
223
|
+
* out-of-process driver emits events over the trigger ingress. */
|
|
224
|
+
triggerSources?: TriggerSourceSpec[];
|
|
98
225
|
}
|
|
99
226
|
export declare const MANIFEST_FILE = "nano-ide.ext.json";
|