@aigile/core 0.2.1 → 0.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/agent-config.d.ts +850 -0
- package/dist/agent-config.d.ts.map +1 -0
- package/dist/agent-config.js +111 -0
- package/dist/agent-config.js.map +1 -0
- package/dist/collections.d.ts +33 -1
- package/dist/collections.d.ts.map +1 -1
- package/dist/collections.js +33 -1
- package/dist/collections.js.map +1 -1
- package/dist/config-sections.d.ts +78 -0
- package/dist/config-sections.d.ts.map +1 -0
- package/dist/config-sections.js +42 -0
- package/dist/config-sections.js.map +1 -0
- package/dist/config.d.ts +6795 -445
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +724 -87
- package/dist/config.js.map +1 -1
- package/dist/domain/action-item.d.ts +409 -0
- package/dist/domain/action-item.d.ts.map +1 -0
- package/dist/domain/action-item.js +155 -0
- package/dist/domain/action-item.js.map +1 -0
- package/dist/domain/ai-call.d.ts +15 -11
- package/dist/domain/ai-call.d.ts.map +1 -1
- package/dist/domain/ai-call.js +2 -0
- package/dist/domain/ai-call.js.map +1 -1
- package/dist/domain/build.d.ts +47 -5
- package/dist/domain/build.d.ts.map +1 -1
- package/dist/domain/build.js +6 -0
- package/dist/domain/build.js.map +1 -1
- package/dist/domain/change-set.d.ts +216 -0
- package/dist/domain/change-set.d.ts.map +1 -0
- package/dist/domain/change-set.js +48 -0
- package/dist/domain/change-set.js.map +1 -0
- package/dist/domain/common.d.ts +6 -3
- package/dist/domain/common.d.ts.map +1 -1
- package/dist/domain/common.js +4 -1
- package/dist/domain/common.js.map +1 -1
- package/dist/domain/conflict.d.ts +8 -8
- package/dist/domain/conversation.d.ts +78 -8
- package/dist/domain/conversation.d.ts.map +1 -1
- package/dist/domain/conversation.js +2 -0
- package/dist/domain/conversation.js.map +1 -1
- package/dist/domain/deliverable.d.ts +235 -0
- package/dist/domain/deliverable.d.ts.map +1 -0
- package/dist/domain/deliverable.js +76 -0
- package/dist/domain/deliverable.js.map +1 -0
- package/dist/domain/index.d.ts +4 -1
- package/dist/domain/index.d.ts.map +1 -1
- package/dist/domain/index.js +4 -1
- package/dist/domain/index.js.map +1 -1
- package/dist/domain/message.d.ts +7 -7
- package/dist/domain/milestone.d.ts +11 -11
- package/dist/domain/organization.d.ts +2 -2
- package/dist/domain/project.d.ts +524 -3
- package/dist/domain/project.d.ts.map +1 -1
- package/dist/domain/project.js +38 -1
- package/dist/domain/project.js.map +1 -1
- package/dist/domain/question.d.ts +238 -26
- package/dist/domain/question.d.ts.map +1 -1
- package/dist/domain/question.js +49 -4
- package/dist/domain/question.js.map +1 -1
- package/dist/domain/reassignment.d.ts +23 -18
- package/dist/domain/reassignment.d.ts.map +1 -1
- package/dist/domain/reassignment.js +14 -6
- package/dist/domain/reassignment.js.map +1 -1
- package/dist/domain/reference.d.ts +595 -0
- package/dist/domain/reference.d.ts.map +1 -0
- package/dist/domain/reference.js +180 -0
- package/dist/domain/reference.js.map +1 -0
- package/dist/domain/release.d.ts +246 -10
- package/dist/domain/release.d.ts.map +1 -1
- package/dist/domain/release.js +6 -0
- package/dist/domain/release.js.map +1 -1
- package/dist/domain/review.d.ts +11 -11
- package/dist/domain/role-assignment.d.ts +5 -5
- package/dist/domain/role-assignment.js +1 -1
- package/dist/domain/role.d.ts +41 -6
- package/dist/domain/role.d.ts.map +1 -1
- package/dist/domain/role.js +12 -0
- package/dist/domain/role.js.map +1 -1
- package/dist/domain/spec.d.ts +197 -6
- package/dist/domain/spec.d.ts.map +1 -1
- package/dist/domain/spec.js +73 -1
- package/dist/domain/spec.js.map +1 -1
- package/dist/domain/sweep.d.ts +11 -11
- package/dist/domain/sweep.d.ts.map +1 -1
- package/dist/domain/sweep.js +1 -1
- package/dist/domain/sweep.js.map +1 -1
- package/dist/domain/track.d.ts +16 -16
- package/dist/domain/user.d.ts +50 -2
- package/dist/domain/user.d.ts.map +1 -1
- package/dist/domain/user.js +13 -0
- package/dist/domain/user.js.map +1 -1
- package/dist/domain/verification.d.ts +4 -4
- package/dist/id.d.ts +114 -0
- package/dist/id.d.ts.map +1 -0
- package/dist/id.js +204 -0
- package/dist/id.js.map +1 -0
- package/dist/ids.d.ts +0 -2
- package/dist/ids.d.ts.map +1 -1
- package/dist/ids.js +0 -5
- package/dist/ids.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/jira.d.ts +26 -0
- package/dist/jira.d.ts.map +1 -0
- package/dist/jira.js +37 -0
- package/dist/jira.js.map +1 -0
- package/dist/outline.d.ts +64 -0
- package/dist/outline.d.ts.map +1 -0
- package/dist/outline.js +127 -0
- package/dist/outline.js.map +1 -0
- package/dist/plugins/action-source.d.ts +44 -0
- package/dist/plugins/action-source.d.ts.map +1 -0
- package/dist/plugins/action-source.js +2 -0
- package/dist/plugins/action-source.js.map +1 -0
- package/dist/plugins/ai.d.ts +5 -0
- package/dist/plugins/ai.d.ts.map +1 -1
- package/dist/plugins/blob-store.d.ts +36 -0
- package/dist/plugins/blob-store.d.ts.map +1 -0
- package/dist/plugins/blob-store.js +11 -0
- package/dist/plugins/blob-store.js.map +1 -0
- package/dist/plugins/datastore.d.ts +6 -0
- package/dist/plugins/datastore.d.ts.map +1 -1
- package/dist/plugins/design.d.ts +62 -0
- package/dist/plugins/design.d.ts.map +1 -0
- package/dist/plugins/design.js +2 -0
- package/dist/plugins/design.js.map +1 -0
- package/dist/plugins/git-host.d.ts +35 -0
- package/dist/plugins/git-host.d.ts.map +1 -0
- package/dist/plugins/git-host.js +2 -0
- package/dist/plugins/git-host.js.map +1 -0
- package/dist/plugins/index.d.ts +9 -0
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +9 -0
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/registry.d.ts +360 -0
- package/dist/plugins/registry.d.ts.map +1 -0
- package/dist/plugins/registry.js +218 -0
- package/dist/plugins/registry.js.map +1 -0
- package/dist/plugins/release-gate.d.ts +53 -0
- package/dist/plugins/release-gate.d.ts.map +1 -0
- package/dist/plugins/release-gate.js +2 -0
- package/dist/plugins/release-gate.js.map +1 -0
- package/dist/plugins/spec-cache.d.ts +23 -0
- package/dist/plugins/spec-cache.d.ts.map +1 -0
- package/dist/plugins/spec-cache.js +2 -0
- package/dist/plugins/spec-cache.js.map +1 -0
- package/dist/plugins/spec-source.d.ts +177 -0
- package/dist/plugins/spec-source.d.ts.map +1 -0
- package/dist/plugins/spec-source.js +31 -0
- package/dist/plugins/spec-source.js.map +1 -0
- package/dist/plugins/test-runner.d.ts +68 -0
- package/dist/plugins/test-runner.d.ts.map +1 -0
- package/dist/plugins/test-runner.js +14 -0
- package/dist/plugins/test-runner.js.map +1 -0
- package/dist/preamble.d.ts +11 -0
- package/dist/preamble.d.ts.map +1 -0
- package/dist/preamble.js +12 -0
- package/dist/preamble.js.map +1 -0
- package/dist/prompts.d.ts +8 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +13 -0
- package/dist/prompts.js.map +1 -0
- package/dist/settings.d.ts +90 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settings.js +120 -0
- package/dist/settings.js.map +1 -0
- package/dist/template.d.ts +89 -0
- package/dist/template.d.ts.map +1 -0
- package/dist/template.js +9 -0
- package/dist/template.js.map +1 -0
- package/package.json +9 -3
- package/prompts/mission.md +3 -0
- package/prompts/preamble.md +37 -0
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import type { ActionSource } from './action-source.js';
|
|
3
|
+
import type { DesignSource } from './design.js';
|
|
4
|
+
import type { TestRunner } from './test-runner.js';
|
|
5
|
+
import type { AiProvider } from './ai.js';
|
|
6
|
+
import type { AuthProvider } from './auth.js';
|
|
7
|
+
import type { BlobStore } from './blob-store.js';
|
|
8
|
+
import type { DataStore } from './datastore.js';
|
|
9
|
+
import type { GitHostProvider } from './git-host.js';
|
|
10
|
+
import type { ReleaseGate } from './release-gate.js';
|
|
11
|
+
import type { SpecCache } from './spec-cache.js';
|
|
12
|
+
import type { SpecSource } from './spec-source.js';
|
|
13
|
+
import type { TemplateDefinition } from '../template.js';
|
|
14
|
+
/** What a factory may need besides its own settings: the datastore once it is open, and where the installation lives. */
|
|
15
|
+
export interface PluginDeps {
|
|
16
|
+
store?: DataStore | undefined;
|
|
17
|
+
installRoot?: string | undefined;
|
|
18
|
+
/** Who commits on the installation's behalf (a git spec source's commits). */
|
|
19
|
+
committer?: {
|
|
20
|
+
name: string;
|
|
21
|
+
email: string;
|
|
22
|
+
} | undefined;
|
|
23
|
+
/** The workspace's public address (`publicUrl`), for links in what a plugin writes. */
|
|
24
|
+
publicUrl?: string | null | undefined;
|
|
25
|
+
/** The installation's identity (config `branding`), for what a plugin writes to people (emails): its name and the logo file to show on a light background, with the web app's path for it. */
|
|
26
|
+
branding?: {
|
|
27
|
+
name: string;
|
|
28
|
+
logo: string | null;
|
|
29
|
+
logoPath?: string;
|
|
30
|
+
} | undefined;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Plugins (documentation/plugins.md): how aigile reaches other systems. A
|
|
34
|
+
* plugin declares what it provides and the configuration it needs; aigile
|
|
35
|
+
* reads all of the configuration, checks each instance against the plugin's
|
|
36
|
+
* schema, resolves its secrets from the environment, and hands the plugin
|
|
37
|
+
* plain values. A plugin never reads the environment or the config file
|
|
38
|
+
* itself. aigile's own plugins are registered at start; an installation adds
|
|
39
|
+
* its own in its plugins folder, as packages carrying the marker, or by naming
|
|
40
|
+
* their modules in `plugins.modules` (documentation/plugins.md "Discovery").
|
|
41
|
+
*/
|
|
42
|
+
/** A message for people outside aigile (a Teams channel): what happened and where to look. */
|
|
43
|
+
export interface Notice {
|
|
44
|
+
/** One line: "An approval for Ada: Build of web-app". */
|
|
45
|
+
title: string;
|
|
46
|
+
/** A few lines of Markdown. */
|
|
47
|
+
body: string;
|
|
48
|
+
/** Where to act on it in aigile, when the installation's public URL is known. */
|
|
49
|
+
url: string | null;
|
|
50
|
+
/** What it is about, for a notifier that routes by kind ("approval", "gate"). */
|
|
51
|
+
kind: string;
|
|
52
|
+
/** The people it is for (aigile user ids), when it is for someone. */
|
|
53
|
+
userIds: string[];
|
|
54
|
+
/** Their email addresses, where aigile knows them (an email notifier writes to them). */
|
|
55
|
+
emails?: string[];
|
|
56
|
+
/** What it is about, stable across its notices (the action item's id), so a notifier can resolve what it opened (PagerDuty's dedup key). */
|
|
57
|
+
key?: string | null;
|
|
58
|
+
}
|
|
59
|
+
/** Sends notices somewhere people already look (Teams, Slack, email). */
|
|
60
|
+
export interface Notifier {
|
|
61
|
+
readonly id: string;
|
|
62
|
+
readonly kind: string;
|
|
63
|
+
/** Whether this notice goes to it (by kind); the rest are left alone. */
|
|
64
|
+
wants(notice: Notice): boolean;
|
|
65
|
+
send(notice: Notice): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Send a notice to this one address and nobody else, whatever the kinds and
|
|
68
|
+
* the fixed recipients (a team list): for what only its owner may read, a
|
|
69
|
+
* set-password link. Only notifiers that write to addresses have it (email).
|
|
70
|
+
*/
|
|
71
|
+
deliver?(address: string, notice: Notice): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* The thing a notice was about is done in aigile (the incident resolved).
|
|
74
|
+
* Only notifiers that have this hear it (PagerDuty resolves its incident);
|
|
75
|
+
* the rest post only when something waits on someone.
|
|
76
|
+
*/
|
|
77
|
+
resolve?(notice: Notice): Promise<void>;
|
|
78
|
+
}
|
|
79
|
+
/** What one Monitor probe found: passed or not, and the output the Monitor reads to grade it. */
|
|
80
|
+
export interface MonitorProbeResult {
|
|
81
|
+
ok: boolean;
|
|
82
|
+
/** A few lines: what was measured, against what threshold. */
|
|
83
|
+
output: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* A Monitor probe a plugin provides (documentation/plugins.md "Monitor
|
|
87
|
+
* probes"): run with the installation's command probes on each sweep, read
|
|
88
|
+
* only. Its result is graded by the Monitor like a command probe's.
|
|
89
|
+
*/
|
|
90
|
+
export interface MonitorProbe {
|
|
91
|
+
/** Its name in the sweep ("errors-5xx"). */
|
|
92
|
+
readonly name: string;
|
|
93
|
+
/** What it does, in one line, shown where a command probe shows its command ("elasticsearch count logs-* > 50 in 15m"). */
|
|
94
|
+
readonly describe: string;
|
|
95
|
+
readonly projectId: string | null;
|
|
96
|
+
run(): Promise<MonitorProbeResult>;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Configuration from somewhere else (documentation/plugins.md "Configuration
|
|
100
|
+
* sources"): keys and values, read when aigile starts (and by the CLI at build
|
|
101
|
+
* time). aigile reads them as it reads its environment: its own settings
|
|
102
|
+
* (`AIGILE_*`, `ANTHROPIC_API_KEY`…) and every other plugin's secrets resolve
|
|
103
|
+
* from them where the process environment does not set the key.
|
|
104
|
+
*/
|
|
105
|
+
export interface ConfigSource {
|
|
106
|
+
readonly id: string;
|
|
107
|
+
readonly kind: string;
|
|
108
|
+
/** Every key it holds now, with its value. */
|
|
109
|
+
load(): Promise<Record<string, string>>;
|
|
110
|
+
}
|
|
111
|
+
/** What a plugin can provide; each is a factory aigile calls once per configured instance. */
|
|
112
|
+
export interface PluginProvides<C> {
|
|
113
|
+
designSource?: (instance: PluginInstanceContext<C>) => DesignSource;
|
|
114
|
+
actionSource?: (instance: PluginInstanceContext<C>) => ActionSource;
|
|
115
|
+
notifier?: (instance: PluginInstanceContext<C>, deps: PluginDeps) => Notifier;
|
|
116
|
+
configSource?: (instance: PluginInstanceContext<C>) => ConfigSource;
|
|
117
|
+
testRunner?: (instance: PluginInstanceContext<C>) => TestRunner;
|
|
118
|
+
/** Probes the Monitor runs on each sweep, beside the command probes in `agents.monitor.probes`. */
|
|
119
|
+
monitorProbes?: (instance: PluginInstanceContext<C>) => readonly MonitorProbe[];
|
|
120
|
+
/** Whether a release may go to an environment now (a release calendar); the Release Manager asks every one before a go. Given the datastore (approvals, open incidents). */
|
|
121
|
+
releaseGate?: (instance: PluginInstanceContext<C>, deps: PluginDeps) => ReleaseGate;
|
|
122
|
+
/** Where records are kept (git-fs, sql, mongodb): one instance. */
|
|
123
|
+
datastore?: (instance: PluginInstanceContext<C>, deps: PluginDeps) => DataStore;
|
|
124
|
+
/** How people sign in (local, oidc): one instance; given the datastore. */
|
|
125
|
+
auth?: (instance: PluginInstanceContext<C>, deps: PluginDeps) => AuthProvider;
|
|
126
|
+
/** The agents' model provider (claude, stub): one instance. */
|
|
127
|
+
ai?: (instance: PluginInstanceContext<C>, deps: PluginDeps) => AiProvider;
|
|
128
|
+
/** Where read spec versions are cached (memory, file, redis, datastore): one instance; given the datastore. */
|
|
129
|
+
specCache?: (instance: PluginInstanceContext<C>, deps: PluginDeps) => SpecCache;
|
|
130
|
+
/** Where specs come from (git, Confluence, Jira, HTTP, SQL): one per source. */
|
|
131
|
+
specSource?: (instance: PluginInstanceContext<C>, deps: PluginDeps) => SpecSource;
|
|
132
|
+
/** Where pull requests are opened (Bitbucket, GitHub, GitLab). */
|
|
133
|
+
gitHost?: (instance: PluginInstanceContext<C>, deps: PluginDeps) => GitHostProvider;
|
|
134
|
+
/** Where kept files live, by content hash (filesystem, S3, Azure, GCS): one instance at most. */
|
|
135
|
+
blobStore?: (instance: PluginInstanceContext<C>, deps: PluginDeps) => BlobStore;
|
|
136
|
+
/** A kind of work: its seats, briefs and agents (the engine's TemplateModule). */
|
|
137
|
+
template?: (instance: PluginInstanceContext<C>, deps: PluginDeps) => TemplateDefinition & Record<string, unknown>;
|
|
138
|
+
}
|
|
139
|
+
/** The kinds a plugin may provide, for listings. */
|
|
140
|
+
export type PluginKind = keyof PluginProvides<unknown>;
|
|
141
|
+
/**
|
|
142
|
+
* How an instance stands (documentation/plugins.md "Health"): `ok` (working),
|
|
143
|
+
* `warning` (running, something off: a token missing that a feature needs),
|
|
144
|
+
* `error` (not working or not started), `off` (no instance configured).
|
|
145
|
+
*/
|
|
146
|
+
export interface PluginHealth {
|
|
147
|
+
status: 'ok' | 'warning' | 'error' | 'off';
|
|
148
|
+
detail: string;
|
|
149
|
+
}
|
|
150
|
+
/** One row of `PluginRegistry.health()`: an instance's health and where it comes from (a check, a start-time issue, or no instance). */
|
|
151
|
+
export interface PluginHealthRow extends PluginHealth {
|
|
152
|
+
plugin: string;
|
|
153
|
+
instanceId: string | null;
|
|
154
|
+
source: 'health' | 'issue' | 'none';
|
|
155
|
+
}
|
|
156
|
+
/** A secret a plugin needs: aigile reads it from the environment variable the instance names (or this default). */
|
|
157
|
+
export interface PluginSecret {
|
|
158
|
+
/** The environment variable read when the instance does not name another. */
|
|
159
|
+
env: string;
|
|
160
|
+
description: string;
|
|
161
|
+
/** Without it the instance does not start (an optional one leaves a feature off, e.g. rendering). */
|
|
162
|
+
required: boolean;
|
|
163
|
+
/** Other variables read, in order, when `env` is unset and the instance names no variable of its own (ai-claude: AIGILE_ANTHROPIC_API_KEY after ANTHROPIC_API_KEY). */
|
|
164
|
+
alsoEnv?: readonly string[];
|
|
165
|
+
/** When `env` is another tool's convention rather than aigile's own, whose ("the Anthropic SDK"): `aigile plugins env` says so. */
|
|
166
|
+
convention?: string;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* A variable a plugin's libraries read on their own, by a third party's
|
|
170
|
+
* convention (the AWS default credential chain's AWS_REGION, Google's
|
|
171
|
+
* GOOGLE_APPLICATION_CREDENTIALS): not a declared secret, listed by
|
|
172
|
+
* `aigile plugins env` so a deployment knows to set it.
|
|
173
|
+
*/
|
|
174
|
+
export interface PluginEnvironmentVariable {
|
|
175
|
+
env: string;
|
|
176
|
+
description: string;
|
|
177
|
+
/** Whose convention ("the AWS default credential chain"). */
|
|
178
|
+
convention: string;
|
|
179
|
+
}
|
|
180
|
+
/** The AWS SDK's default credential chain: what a plugin that signs with it may read. */
|
|
181
|
+
export declare const AWS_DEFAULT_CHAIN_ENV: readonly PluginEnvironmentVariable[];
|
|
182
|
+
/** Google's Application Default Credentials. */
|
|
183
|
+
export declare const GOOGLE_ADC_ENV: readonly PluginEnvironmentVariable[];
|
|
184
|
+
/** Azure's DefaultAzureCredential (environment, workload identity, managed identity). */
|
|
185
|
+
export declare const AZURE_DEFAULT_CREDENTIAL_ENV: readonly PluginEnvironmentVariable[];
|
|
186
|
+
/**
|
|
187
|
+
* An access scope or permission a plugin's credentials need on the other
|
|
188
|
+
* system ("read:jira-work", "Contents: read"), so whoever makes the token
|
|
189
|
+
* grants exactly these. Shown on the Plugins window under each plugin.
|
|
190
|
+
*/
|
|
191
|
+
export interface PluginAccess {
|
|
192
|
+
/** The scope or permission as the other system names it. */
|
|
193
|
+
scope: string;
|
|
194
|
+
/** What aigile does with it. */
|
|
195
|
+
description: string;
|
|
196
|
+
/** Without it the plugin does not work; an optional one turns a feature on (write-back, rendering). */
|
|
197
|
+
required: boolean;
|
|
198
|
+
}
|
|
199
|
+
/** What a factory is given for one instance: its id, its checked settings, and its secrets' values. */
|
|
200
|
+
export interface PluginInstanceContext<C> {
|
|
201
|
+
instanceId: string;
|
|
202
|
+
/** The environment this instance is for, when it serves one target (documentation/plugins.md "Targets"). */
|
|
203
|
+
target: string | null;
|
|
204
|
+
config: C;
|
|
205
|
+
/** Each declared secret's value (undefined when its variable is not set), never read from anywhere else. */
|
|
206
|
+
secrets: Record<string, string | undefined>;
|
|
207
|
+
/** The variable each secret was read from, for messages ("set AIGILE_FIGMA_TOKEN"). */
|
|
208
|
+
secretEnv: Record<string, string>;
|
|
209
|
+
}
|
|
210
|
+
export interface PluginDefinition<C = unknown> {
|
|
211
|
+
/** Its id in the config ("figma", "teams"). */
|
|
212
|
+
id: string;
|
|
213
|
+
name: string;
|
|
214
|
+
description: string;
|
|
215
|
+
/** Its settings for one instance: checked by aigile, defaults filled in, before the factory sees them. */
|
|
216
|
+
config: z.ZodType<C, z.ZodTypeDef, unknown>;
|
|
217
|
+
secrets?: Record<string, PluginSecret>;
|
|
218
|
+
/** Variables its libraries read on their own by a third party's convention (the AWS default credential chain), for `aigile plugins env`. */
|
|
219
|
+
environment?: readonly PluginEnvironmentVariable[];
|
|
220
|
+
provides: PluginProvides<C>;
|
|
221
|
+
/**
|
|
222
|
+
* Whether an instance works, without side effects (reach the service, check
|
|
223
|
+
* the credentials): shown in the plugin list on every look. Required.
|
|
224
|
+
*/
|
|
225
|
+
health: (instance: PluginInstanceContext<C>, built: PluginBuilt) => Promise<PluginHealth>;
|
|
226
|
+
/** A fuller check a person asks for, which may act (send a test notice); the health check when absent. */
|
|
227
|
+
test?: (instance: PluginInstanceContext<C>, built: PluginBuilt) => Promise<PluginHealth>;
|
|
228
|
+
/** The scopes or permissions its credentials need, required and optional. */
|
|
229
|
+
access?: readonly PluginAccess[];
|
|
230
|
+
/**
|
|
231
|
+
* `planned`: named so it is not forgotten, not built yet (documentation/plugins.md "Planned").
|
|
232
|
+
* Listed with what it will provide; an instance of it does not start.
|
|
233
|
+
*/
|
|
234
|
+
status?: 'available' | 'planned';
|
|
235
|
+
/** A planned plugin's kinds, for the listing (it has no factories yet). */
|
|
236
|
+
plannedProvides?: readonly string[];
|
|
237
|
+
/** Instances to start when the config names none (Figma's link finding works with no token). */
|
|
238
|
+
defaultInstances?: Array<{
|
|
239
|
+
id: string;
|
|
240
|
+
config?: unknown;
|
|
241
|
+
}>;
|
|
242
|
+
}
|
|
243
|
+
/** What this process has built from an instance, by kind (the open datastore, the spec source), for a health check that asks the live object rather than opening another. */
|
|
244
|
+
export type PluginBuilt = Partial<Record<PluginKind, unknown>>;
|
|
245
|
+
/** A plugin module (a file in the plugins folder, a package with the marker, or one in `plugins.modules`): it exports `plugins`, a list of definitions. */
|
|
246
|
+
export interface PluginModule {
|
|
247
|
+
plugins: readonly PluginDefinition<any>[];
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Where a plugin's definition came from (documentation/plugins.md "Discovery"):
|
|
251
|
+
* `built-in` (shipped with aigile: `name` is its package), `package` (a
|
|
252
|
+
* node_modules package carrying the marker), `folder` (a file in the
|
|
253
|
+
* installation's plugins folder) or `module` (named in `plugins.modules`).
|
|
254
|
+
*/
|
|
255
|
+
export interface PluginSource {
|
|
256
|
+
kind: 'built-in' | 'package' | 'folder' | 'module';
|
|
257
|
+
/** The package name, or the file or module as the installation names it ("plugins/status.mjs"). */
|
|
258
|
+
name: string;
|
|
259
|
+
/** The module's file on disk, when known. */
|
|
260
|
+
path: string | null;
|
|
261
|
+
}
|
|
262
|
+
/** One configured instance of a plugin, as the config gives it. */
|
|
263
|
+
export interface PluginInstanceConfig {
|
|
264
|
+
plugin: string;
|
|
265
|
+
id: string;
|
|
266
|
+
config?: unknown;
|
|
267
|
+
/** Secret name → the environment variable to read it from, over the plugin's default. */
|
|
268
|
+
secrets?: Record<string, string>;
|
|
269
|
+
/** The environment it serves (a configuration source for one test target); its values are kept apart from aigile's own. */
|
|
270
|
+
target?: string | null;
|
|
271
|
+
/**
|
|
272
|
+
* Disabled in the Plugins window (StoredSettings.disabled): not started, and
|
|
273
|
+
* its plugin's default instances are not started in its place. `plugin` may
|
|
274
|
+
* be empty when the id is a default instance's (`pluginInstancesOf`).
|
|
275
|
+
*/
|
|
276
|
+
disabled?: boolean;
|
|
277
|
+
}
|
|
278
|
+
/** Something wrong or missing with a plugin instance, found at start. */
|
|
279
|
+
export interface PluginIssue {
|
|
280
|
+
instanceId: string;
|
|
281
|
+
plugin: string;
|
|
282
|
+
severity: 'error' | 'warning';
|
|
283
|
+
message: string;
|
|
284
|
+
}
|
|
285
|
+
/** A plugin and its instances as `aigile plugins` and the admin page show them. */
|
|
286
|
+
export interface PluginReport {
|
|
287
|
+
id: string;
|
|
288
|
+
name: string;
|
|
289
|
+
description: string;
|
|
290
|
+
provides: string[];
|
|
291
|
+
builtIn: boolean;
|
|
292
|
+
/** Where its definition came from; null when it was registered without one. */
|
|
293
|
+
source: PluginSource | null;
|
|
294
|
+
status: 'available' | 'planned';
|
|
295
|
+
secrets: Array<{
|
|
296
|
+
name: string;
|
|
297
|
+
env: string;
|
|
298
|
+
required: boolean;
|
|
299
|
+
description: string;
|
|
300
|
+
alsoEnv?: readonly string[];
|
|
301
|
+
convention?: string;
|
|
302
|
+
}>;
|
|
303
|
+
/** Variables its libraries read by a third party's convention. */
|
|
304
|
+
environment?: readonly PluginEnvironmentVariable[];
|
|
305
|
+
access: PluginAccess[];
|
|
306
|
+
instances: Array<{
|
|
307
|
+
id: string;
|
|
308
|
+
secrets: Record<string, {
|
|
309
|
+
env: string;
|
|
310
|
+
set: boolean;
|
|
311
|
+
}>;
|
|
312
|
+
}>;
|
|
313
|
+
/** Its instances disabled in the Plugins window (StoredSettings.disabled): not started. */
|
|
314
|
+
disabled: string[];
|
|
315
|
+
}
|
|
316
|
+
/** Plugins and their instances, checked and ready to build what they provide. */
|
|
317
|
+
export declare class PluginRegistry {
|
|
318
|
+
private readonly defs;
|
|
319
|
+
private instances;
|
|
320
|
+
issues: PluginIssue[];
|
|
321
|
+
/** The instances disabled in the Plugins window, with their plugins (a default instance's plugin is known only here). */
|
|
322
|
+
disabled: Array<{
|
|
323
|
+
plugin: string;
|
|
324
|
+
id: string;
|
|
325
|
+
}>;
|
|
326
|
+
register<C>(def: PluginDefinition<C>, builtIn?: boolean, source?: PluginSource | null): this;
|
|
327
|
+
get(id: string): PluginDefinition<unknown> | null;
|
|
328
|
+
/**
|
|
329
|
+
* Check every configured instance (and each plugin's default instances when
|
|
330
|
+
* the config names none of it) and resolve its secrets from `env`. An
|
|
331
|
+
* instance with an unknown plugin, settings its schema refuses, or a
|
|
332
|
+
* required secret missing is left out and reported in `issues`.
|
|
333
|
+
*/
|
|
334
|
+
configure(configured: readonly PluginInstanceConfig[], env: Record<string, string | undefined>): this;
|
|
335
|
+
/** Build every configured instance's provision of one kind (design sources, notifiers…). */
|
|
336
|
+
build<K extends keyof PluginProvides<unknown>>(kind: K, deps?: PluginDeps): Array<NonNullable<ReturnType<NonNullable<PluginProvides<unknown>[K]>>>>;
|
|
337
|
+
/** Like `build`, with each instance's id and target beside what it built. */
|
|
338
|
+
entries<K extends keyof PluginProvides<unknown>>(kind: K, deps?: PluginDeps): Array<{
|
|
339
|
+
instanceId: string;
|
|
340
|
+
target: string | null;
|
|
341
|
+
value: NonNullable<ReturnType<NonNullable<PluginProvides<unknown>[K]>>>;
|
|
342
|
+
}>;
|
|
343
|
+
/** The one instance of a single-instance kind (the datastore, sign-in, the AI provider, the spec cache), or an error naming what is wrong. */
|
|
344
|
+
one<K extends 'datastore' | 'auth' | 'ai' | 'specCache'>(kind: K, deps?: PluginDeps): NonNullable<ReturnType<NonNullable<PluginProvides<unknown>[K]>>>;
|
|
345
|
+
/** The one instance of an optional single-instance kind (the blob store): null when none is configured, an error naming them when there are several. */
|
|
346
|
+
oneOrNone<K extends 'blobStore'>(kind: K, deps?: PluginDeps): NonNullable<ReturnType<NonNullable<PluginProvides<unknown>[K]>>> | null;
|
|
347
|
+
/**
|
|
348
|
+
* Each instance's health, and each plugin with none configured as `off`; a check is cut off after `timeoutMs`.
|
|
349
|
+
* `source` says where a row comes from: `health` (the instance started and its check answered), `issue`
|
|
350
|
+
* (the instance was left out at start: unknown settings, a required secret missing) or `none` (no instance).
|
|
351
|
+
*/
|
|
352
|
+
health(timeoutMs?: number): Promise<PluginHealthRow[]>;
|
|
353
|
+
/** A person's test of one instance: the plugin's test (which may act), else its health check. */
|
|
354
|
+
test(instanceId: string, timeoutMs?: number): Promise<PluginHealth>;
|
|
355
|
+
/** What is installed, what each needs, and what each configured instance has. */
|
|
356
|
+
report(): PluginReport[];
|
|
357
|
+
}
|
|
358
|
+
/** Settings with every "${env:NAME}" replaced by that variable's value; a variable that is not set is an error. */
|
|
359
|
+
export declare function fillFromEnv(value: unknown, env: Record<string, string | undefined>): unknown;
|
|
360
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/plugins/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,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,MAAM,GAAG,SAAS,CAAC,GAAG,OAAO,CAW5F"}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/** The AWS SDK's default credential chain: what a plugin that signs with it may read. */
|
|
2
|
+
export const AWS_DEFAULT_CHAIN_ENV = [
|
|
3
|
+
{ env: 'AWS_REGION', description: 'the region (or AWS_DEFAULT_REGION), unless the instance names one', convention: 'the AWS default credential chain' },
|
|
4
|
+
{ env: 'AWS_PROFILE', description: 'a named profile from ~/.aws/config and ~/.aws/credentials', convention: 'the AWS default credential chain' },
|
|
5
|
+
{ env: 'AWS_ACCESS_KEY_ID', description: 'static credentials, with AWS_SECRET_ACCESS_KEY (and AWS_SESSION_TOKEN); unset on AWS, the role of the pod or instance', convention: 'the AWS default credential chain' },
|
|
6
|
+
{ env: 'AWS_ROLE_ARN', description: 'web identity (EKS IRSA), with AWS_WEB_IDENTITY_TOKEN_FILE; set by the platform', convention: 'the AWS default credential chain' },
|
|
7
|
+
];
|
|
8
|
+
/** Google's Application Default Credentials. */
|
|
9
|
+
export const GOOGLE_ADC_ENV = [{ env: 'GOOGLE_APPLICATION_CREDENTIALS', description: 'a service account key file; unset on Google Cloud, the workload’s identity', convention: 'Google Application Default Credentials' }];
|
|
10
|
+
/** Azure's DefaultAzureCredential (environment, workload identity, managed identity). */
|
|
11
|
+
export const AZURE_DEFAULT_CREDENTIAL_ENV = [
|
|
12
|
+
{ env: 'AZURE_TENANT_ID', description: 'the Entra tenant, with AZURE_CLIENT_ID', convention: 'Azure DefaultAzureCredential' },
|
|
13
|
+
{ env: 'AZURE_CLIENT_ID', description: 'an app registration or a user-assigned managed identity', convention: 'Azure DefaultAzureCredential' },
|
|
14
|
+
{ env: 'AZURE_CLIENT_SECRET', description: 'an app registration’s secret (or AZURE_CLIENT_CERTIFICATE_PATH)', convention: 'Azure DefaultAzureCredential' },
|
|
15
|
+
{ env: 'AZURE_FEDERATED_TOKEN_FILE', description: 'workload identity on AKS; set by the platform', convention: 'Azure DefaultAzureCredential' },
|
|
16
|
+
];
|
|
17
|
+
/** Plugins and their instances, checked and ready to build what they provide. */
|
|
18
|
+
export class PluginRegistry {
|
|
19
|
+
defs = new Map();
|
|
20
|
+
instances = [];
|
|
21
|
+
issues = [];
|
|
22
|
+
/** The instances disabled in the Plugins window, with their plugins (a default instance's plugin is known only here). */
|
|
23
|
+
disabled = [];
|
|
24
|
+
register(def, builtIn = true, source = null) {
|
|
25
|
+
if (this.defs.has(def.id))
|
|
26
|
+
throw new Error(`two plugins have the id "${def.id}"`);
|
|
27
|
+
this.defs.set(def.id, { def: def, builtIn, source });
|
|
28
|
+
return this;
|
|
29
|
+
}
|
|
30
|
+
get(id) {
|
|
31
|
+
return this.defs.get(id)?.def ?? null;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Check every configured instance (and each plugin's default instances when
|
|
35
|
+
* the config names none of it) and resolve its secrets from `env`. An
|
|
36
|
+
* instance with an unknown plugin, settings its schema refuses, or a
|
|
37
|
+
* required secret missing is left out and reported in `issues`.
|
|
38
|
+
*/
|
|
39
|
+
configure(configured, env) {
|
|
40
|
+
// What an unchanged instance built is kept, so its health still asks the live object (the open datastore).
|
|
41
|
+
const before = new Map(this.instances.map((i) => [i.ctx.instanceId, i]));
|
|
42
|
+
this.instances = [];
|
|
43
|
+
this.issues = [];
|
|
44
|
+
this.disabled = [];
|
|
45
|
+
// A disabled instance still names its plugin, so the plugin's default instances do not start in its place.
|
|
46
|
+
const named = new Set(configured.filter((c) => c.plugin).map((c) => c.plugin));
|
|
47
|
+
const off = new Set(configured.filter((c) => c.disabled).map((c) => c.id));
|
|
48
|
+
const wanted = [...configured];
|
|
49
|
+
for (const { def } of this.defs.values())
|
|
50
|
+
if (!named.has(def.id))
|
|
51
|
+
for (const d of def.defaultInstances ?? [])
|
|
52
|
+
wanted.push({ plugin: def.id, id: d.id, config: d.config, byDefault: true });
|
|
53
|
+
const ids = new Set();
|
|
54
|
+
for (const c of wanted) {
|
|
55
|
+
if (off.has(c.id)) {
|
|
56
|
+
if (c.plugin && this.defs.has(c.plugin) && !this.disabled.some((d) => d.id === c.id))
|
|
57
|
+
this.disabled.push({ plugin: c.plugin, id: c.id });
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
const entry = this.defs.get(c.plugin);
|
|
61
|
+
if (!entry) {
|
|
62
|
+
this.issues.push({ instanceId: c.id, plugin: c.plugin, severity: 'error', message: `no plugin "${c.plugin}" is installed (installed: ${[...this.defs.keys()].join(', ')})` });
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
if (entry.def.status === 'planned') {
|
|
66
|
+
this.issues.push({ instanceId: c.id, plugin: c.plugin, severity: 'error', message: `${entry.def.name} is planned, not built yet` });
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
if (ids.has(c.id)) {
|
|
70
|
+
this.issues.push({ instanceId: c.id, plugin: c.plugin, severity: 'error', message: `two plugin instances have the id "${c.id}"` });
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
ids.add(c.id);
|
|
74
|
+
// "${env:NAME}" in settings is filled from the environment first (the same image in every environment).
|
|
75
|
+
let settings;
|
|
76
|
+
try {
|
|
77
|
+
settings = fillFromEnv(c.config ?? {}, env);
|
|
78
|
+
}
|
|
79
|
+
catch (err) {
|
|
80
|
+
this.issues.push({ instanceId: c.id, plugin: c.plugin, severity: 'error', message: `its settings: ${err instanceof Error ? err.message : String(err)}` });
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
const parsed = entry.def.config.safeParse(settings);
|
|
84
|
+
if (!parsed.success) {
|
|
85
|
+
this.issues.push({ instanceId: c.id, plugin: c.plugin, severity: 'error', message: `its settings: ${parsed.error.issues.map((i) => `${i.path.join('.') || '(settings)'}: ${i.message}`).join('; ')}` });
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
const secrets = {};
|
|
89
|
+
const secretEnv = {};
|
|
90
|
+
let missing = false;
|
|
91
|
+
for (const [name, s] of Object.entries(entry.def.secrets ?? {})) {
|
|
92
|
+
// The instance's own variable, else the default, else (only when the instance names none) the alternatives in order.
|
|
93
|
+
const candidates = c.secrets?.[name] ? [c.secrets[name]] : [s.env, ...(s.alsoEnv ?? [])];
|
|
94
|
+
const variable = candidates.find((v) => env[v]) ?? candidates[0];
|
|
95
|
+
secretEnv[name] = variable;
|
|
96
|
+
secrets[name] = env[variable] || undefined;
|
|
97
|
+
// A default instance nobody asked for says what it lacks in its health, not at start.
|
|
98
|
+
if (!secrets[name] && (s.required || !c.byDefault)) {
|
|
99
|
+
this.issues.push({ instanceId: c.id, plugin: c.plugin, severity: s.required ? 'error' : 'warning', message: `${variable} is not set (${s.description})` });
|
|
100
|
+
if (s.required)
|
|
101
|
+
missing = true;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (missing)
|
|
105
|
+
continue;
|
|
106
|
+
const ctx = { instanceId: c.id, target: c.target ?? null, config: parsed.data, secrets, secretEnv };
|
|
107
|
+
const old = before.get(c.id);
|
|
108
|
+
const same = old && old.def === entry.def && JSON.stringify([old.ctx.config, old.ctx.secrets, old.ctx.target]) === JSON.stringify([ctx.config, ctx.secrets, ctx.target]);
|
|
109
|
+
this.instances.push({ def: entry.def, ctx, built: same ? old.built : {} });
|
|
110
|
+
}
|
|
111
|
+
return this;
|
|
112
|
+
}
|
|
113
|
+
/** Build every configured instance's provision of one kind (design sources, notifiers…). */
|
|
114
|
+
build(kind, deps = {}) {
|
|
115
|
+
return this.entries(kind, deps).map((e) => e.value);
|
|
116
|
+
}
|
|
117
|
+
/** Like `build`, with each instance's id and target beside what it built. */
|
|
118
|
+
entries(kind, deps = {}) {
|
|
119
|
+
const out = [];
|
|
120
|
+
for (const instance of this.instances) {
|
|
121
|
+
const factory = instance.def.provides[kind];
|
|
122
|
+
if (!factory)
|
|
123
|
+
continue;
|
|
124
|
+
const value = factory(instance.ctx, deps);
|
|
125
|
+
instance.built[kind] = value;
|
|
126
|
+
out.push({ instanceId: instance.ctx.instanceId, target: instance.ctx.target, value });
|
|
127
|
+
}
|
|
128
|
+
return out;
|
|
129
|
+
}
|
|
130
|
+
/** The one instance of a single-instance kind (the datastore, sign-in, the AI provider, the spec cache), or an error naming what is wrong. */
|
|
131
|
+
one(kind, deps = {}) {
|
|
132
|
+
const all = this.entries(kind, deps);
|
|
133
|
+
if (all.length === 1)
|
|
134
|
+
return all[0].value;
|
|
135
|
+
const why = this.issues.filter((i) => i.severity === 'error' && this.defs.get(i.plugin)?.def.provides[kind]).map((i) => `${i.instanceId}: ${i.message}`);
|
|
136
|
+
throw new Error(all.length === 0 ? `no ${kind} plugin is configured${why.length ? ` (${why.join('; ')})` : ''}` : `${all.length} ${kind} plugins are configured (${all.map((e) => e.instanceId).join(', ')}); there must be one`);
|
|
137
|
+
}
|
|
138
|
+
/** The one instance of an optional single-instance kind (the blob store): null when none is configured, an error naming them when there are several. */
|
|
139
|
+
oneOrNone(kind, deps = {}) {
|
|
140
|
+
const all = this.entries(kind, deps);
|
|
141
|
+
if (all.length > 1)
|
|
142
|
+
throw new Error(`${all.length} ${kind} plugins are configured (${all.map((e) => e.instanceId).join(', ')}); there may be one`);
|
|
143
|
+
return all[0]?.value ?? null;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Each instance's health, and each plugin with none configured as `off`; a check is cut off after `timeoutMs`.
|
|
147
|
+
* `source` says where a row comes from: `health` (the instance started and its check answered), `issue`
|
|
148
|
+
* (the instance was left out at start: unknown settings, a required secret missing) or `none` (no instance).
|
|
149
|
+
*/
|
|
150
|
+
async health(timeoutMs = 10_000) {
|
|
151
|
+
const out = [];
|
|
152
|
+
// At once: a look waits for the slowest check, not their sum.
|
|
153
|
+
out.push(...(await Promise.all(this.instances.map(async ({ def, ctx, built }) => ({ plugin: def.id, instanceId: ctx.instanceId, ...(await bounded(Promise.resolve().then(() => def.health(ctx, built)), timeoutMs)), source: 'health' })))));
|
|
154
|
+
// Instances left out at start are not working; say why.
|
|
155
|
+
for (const issue of this.issues.filter((i) => i.severity === 'error'))
|
|
156
|
+
out.push({ plugin: issue.plugin, instanceId: issue.instanceId, status: 'error', detail: issue.message, source: 'issue' });
|
|
157
|
+
for (const { def } of this.defs.values())
|
|
158
|
+
if (!out.some((o) => o.plugin === def.id))
|
|
159
|
+
out.push({ plugin: def.id, instanceId: null, status: 'off', detail: def.status === 'planned' ? 'planned: not built yet' : this.disabled.some((d) => d.plugin === def.id) ? 'disabled in the Plugins window' : 'no instance configured', source: 'none' });
|
|
160
|
+
return out;
|
|
161
|
+
}
|
|
162
|
+
/** A person's test of one instance: the plugin's test (which may act), else its health check. */
|
|
163
|
+
async test(instanceId, timeoutMs = 30_000) {
|
|
164
|
+
const found = this.instances.find((i) => i.ctx.instanceId === instanceId);
|
|
165
|
+
if (!found) {
|
|
166
|
+
const issue = this.issues.find((i) => i.instanceId === instanceId && i.severity === 'error');
|
|
167
|
+
return issue ? { status: 'error', detail: issue.message } : { status: 'error', detail: `no plugin instance "${instanceId}"` };
|
|
168
|
+
}
|
|
169
|
+
return bounded((found.def.test ?? found.def.health)(found.ctx, found.built), timeoutMs);
|
|
170
|
+
}
|
|
171
|
+
/** What is installed, what each needs, and what each configured instance has. */
|
|
172
|
+
report() {
|
|
173
|
+
return [...this.defs.values()].map(({ def, builtIn, source }) => ({
|
|
174
|
+
id: def.id,
|
|
175
|
+
name: def.name,
|
|
176
|
+
description: def.description,
|
|
177
|
+
provides: def.status === 'planned' ? [...(def.plannedProvides ?? [])] : Object.keys(def.provides),
|
|
178
|
+
builtIn,
|
|
179
|
+
source,
|
|
180
|
+
status: def.status ?? 'available',
|
|
181
|
+
secrets: Object.entries(def.secrets ?? {}).map(([name, s]) => ({ name, env: s.env, required: s.required, description: s.description, ...(s.alsoEnv?.length ? { alsoEnv: s.alsoEnv } : {}), ...(s.convention ? { convention: s.convention } : {}) })),
|
|
182
|
+
...(def.environment?.length ? { environment: def.environment } : {}),
|
|
183
|
+
access: [...(def.access ?? [])],
|
|
184
|
+
instances: this.instances.filter((i) => i.def.id === def.id).map((i) => ({ id: i.ctx.instanceId, secrets: Object.fromEntries(Object.entries(i.ctx.secretEnv).map(([name, variable]) => [name, { env: variable, set: !!i.ctx.secrets[name] }])) })),
|
|
185
|
+
disabled: this.disabled.filter((d) => d.plugin === def.id).map((d) => d.id),
|
|
186
|
+
}));
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
/** A check's answer, or an error when it throws or takes longer than `ms`. */
|
|
190
|
+
async function bounded(check, ms) {
|
|
191
|
+
let timer;
|
|
192
|
+
try {
|
|
193
|
+
return await Promise.race([check, new Promise((resolve) => (timer = setTimeout(() => resolve({ status: 'error', detail: `no answer within ${Math.round(ms / 1000)} s` }), ms)))]);
|
|
194
|
+
}
|
|
195
|
+
catch (err) {
|
|
196
|
+
return { status: 'error', detail: err instanceof Error ? err.message : String(err) };
|
|
197
|
+
}
|
|
198
|
+
finally {
|
|
199
|
+
clearTimeout(timer);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
/** Settings with every "${env:NAME}" replaced by that variable's value; a variable that is not set is an error. */
|
|
203
|
+
export function fillFromEnv(value, env) {
|
|
204
|
+
if (typeof value === 'string') {
|
|
205
|
+
return value.replace(/\$\{env:([A-Za-z_][A-Za-z0-9_]*)\}/g, (_m, name) => {
|
|
206
|
+
const v = env[name];
|
|
207
|
+
if (v === undefined || v === '')
|
|
208
|
+
throw new Error(`${name} is not set (named as \${env:${name}})`);
|
|
209
|
+
return v;
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
if (Array.isArray(value))
|
|
213
|
+
return value.map((v) => fillFromEnv(v, env));
|
|
214
|
+
if (value && typeof value === 'object')
|
|
215
|
+
return Object.fromEntries(Object.entries(value).map(([k, v]) => [k, fillFromEnv(v, env)]));
|
|
216
|
+
return value;
|
|
217
|
+
}
|
|
218
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","s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