@fideliosai/shared 2026.331.0-canary.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/LICENSE +22 -0
- package/dist/agent-url-key.d.ts +4 -0
- package/dist/agent-url-key.d.ts.map +1 -0
- package/dist/agent-url-key.js +22 -0
- package/dist/agent-url-key.js.map +1 -0
- package/dist/api.d.ts +20 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +20 -0
- package/dist/api.js.map +1 -0
- package/dist/config-schema.d.ts +905 -0
- package/dist/config-schema.d.ts.map +1 -0
- package/dist/config-schema.js +159 -0
- package/dist/config-schema.js.map +1 -0
- package/dist/constants.d.ts +224 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +553 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/project-mentions.d.ts +17 -0
- package/dist/project-mentions.d.ts.map +1 -0
- package/dist/project-mentions.js +123 -0
- package/dist/project-mentions.js.map +1 -0
- package/dist/project-mentions.test.d.ts +2 -0
- package/dist/project-mentions.test.d.ts.map +1 -0
- package/dist/project-mentions.test.js +21 -0
- package/dist/project-mentions.test.js.map +1 -0
- package/dist/project-url-key.d.ts +3 -0
- package/dist/project-url-key.d.ts.map +1 -0
- package/dist/project-url-key.js +16 -0
- package/dist/project-url-key.js.map +1 -0
- package/dist/types/access.d.ts +67 -0
- package/dist/types/access.d.ts.map +1 -0
- package/dist/types/access.js +2 -0
- package/dist/types/access.js.map +1 -0
- package/dist/types/activity.d.ts +14 -0
- package/dist/types/activity.d.ts.map +1 -0
- package/dist/types/activity.js +2 -0
- package/dist/types/activity.js.map +1 -0
- package/dist/types/adapter-skills.d.ts +31 -0
- package/dist/types/adapter-skills.d.ts.map +1 -0
- package/dist/types/adapter-skills.js +2 -0
- package/dist/types/adapter-skills.js.map +1 -0
- package/dist/types/agent.d.ts +108 -0
- package/dist/types/agent.d.ts.map +1 -0
- package/dist/types/agent.js +2 -0
- package/dist/types/agent.js.map +1 -0
- package/dist/types/approval.d.ts +26 -0
- package/dist/types/approval.d.ts.map +1 -0
- package/dist/types/approval.js +2 -0
- package/dist/types/approval.js.map +1 -0
- package/dist/types/asset.d.ts +16 -0
- package/dist/types/asset.d.ts.map +1 -0
- package/dist/types/asset.js +2 -0
- package/dist/types/asset.js.map +1 -0
- package/dist/types/budget.d.ts +86 -0
- package/dist/types/budget.d.ts.map +1 -0
- package/dist/types/budget.js +2 -0
- package/dist/types/budget.js.map +1 -0
- package/dist/types/company-portability.d.ts +276 -0
- package/dist/types/company-portability.d.ts.map +1 -0
- package/dist/types/company-portability.js +2 -0
- package/dist/types/company-portability.js.map +1 -0
- package/dist/types/company-skill.d.ts +135 -0
- package/dist/types/company-skill.d.ts.map +1 -0
- package/dist/types/company-skill.js +2 -0
- package/dist/types/company-skill.js.map +1 -0
- package/dist/types/company.d.ts +20 -0
- package/dist/types/company.d.ts.map +1 -0
- package/dist/types/company.js +2 -0
- package/dist/types/company.js.map +1 -0
- package/dist/types/cost.d.ts +106 -0
- package/dist/types/cost.d.ts.map +1 -0
- package/dist/types/cost.js +2 -0
- package/dist/types/cost.js.map +1 -0
- package/dist/types/dashboard.d.ts +28 -0
- package/dist/types/dashboard.d.ts.map +1 -0
- package/dist/types/dashboard.js +2 -0
- package/dist/types/dashboard.js.map +1 -0
- package/dist/types/finance.d.ts +57 -0
- package/dist/types/finance.d.ts.map +1 -0
- package/dist/types/finance.js +2 -0
- package/dist/types/finance.js.map +1 -0
- package/dist/types/goal.d.ts +14 -0
- package/dist/types/goal.d.ts.map +1 -0
- package/dist/types/goal.js +2 -0
- package/dist/types/goal.js.map +1 -0
- package/dist/types/heartbeat.d.ts +118 -0
- package/dist/types/heartbeat.d.ts.map +1 -0
- package/dist/types/heartbeat.js +2 -0
- package/dist/types/heartbeat.js.map +1 -0
- package/dist/types/index.d.ts +28 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/instance.d.ts +15 -0
- package/dist/types/instance.d.ts.map +1 -0
- package/dist/types/instance.js +2 -0
- package/dist/types/instance.js.map +1 -0
- package/dist/types/issue.d.ts +165 -0
- package/dist/types/issue.d.ts.map +1 -0
- package/dist/types/issue.js +2 -0
- package/dist/types/issue.js.map +1 -0
- package/dist/types/live.d.ts +9 -0
- package/dist/types/live.d.ts.map +1 -0
- package/dist/types/live.js +2 -0
- package/dist/types/live.js.map +1 -0
- package/dist/types/plugin.d.ts +419 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/plugin.js +2 -0
- package/dist/types/plugin.js.map +1 -0
- package/dist/types/project.d.ts +67 -0
- package/dist/types/project.d.ts.map +1 -0
- package/dist/types/project.js +2 -0
- package/dist/types/project.js.map +1 -0
- package/dist/types/quota.d.ts +26 -0
- package/dist/types/quota.d.ts.map +1 -0
- package/dist/types/quota.js +2 -0
- package/dist/types/quota.js.map +1 -0
- package/dist/types/routine.d.ts +113 -0
- package/dist/types/routine.d.ts.map +1 -0
- package/dist/types/routine.js +2 -0
- package/dist/types/routine.js.map +1 -0
- package/dist/types/secrets.d.ts +32 -0
- package/dist/types/secrets.d.ts.map +1 -0
- package/dist/types/secrets.js +2 -0
- package/dist/types/secrets.js.map +1 -0
- package/dist/types/sidebar-badges.d.ts +7 -0
- package/dist/types/sidebar-badges.d.ts.map +1 -0
- package/dist/types/sidebar-badges.js +2 -0
- package/dist/types/sidebar-badges.js.map +1 -0
- package/dist/types/work-product.d.ts +27 -0
- package/dist/types/work-product.d.ts.map +1 -0
- package/dist/types/work-product.js +2 -0
- package/dist/types/work-product.js.map +1 -0
- package/dist/types/workspace-operation.d.ts +26 -0
- package/dist/types/workspace-operation.d.ts.map +1 -0
- package/dist/types/workspace-operation.js +2 -0
- package/dist/types/workspace-operation.js.map +1 -0
- package/dist/types/workspace-runtime.d.ts +86 -0
- package/dist/types/workspace-runtime.d.ts.map +1 -0
- package/dist/types/workspace-runtime.js +2 -0
- package/dist/types/workspace-runtime.js.map +1 -0
- package/dist/validators/access.d.ts +136 -0
- package/dist/validators/access.d.ts.map +1 -0
- package/dist/validators/access.js +53 -0
- package/dist/validators/access.js.map +1 -0
- package/dist/validators/adapter-skills.d.ts +156 -0
- package/dist/validators/adapter-skills.d.ts.map +1 -0
- package/dist/validators/adapter-skills.js +48 -0
- package/dist/validators/adapter-skills.js.map +1 -0
- package/dist/validators/agent.d.ts +279 -0
- package/dist/validators/agent.d.ts.map +1 -0
- package/dist/validators/agent.js +85 -0
- package/dist/validators/agent.js.map +1 -0
- package/dist/validators/approval.d.ts +57 -0
- package/dist/validators/approval.d.ts.map +1 -0
- package/dist/validators/approval.js +23 -0
- package/dist/validators/approval.js.map +1 -0
- package/dist/validators/asset.d.ts +10 -0
- package/dist/validators/asset.d.ts.map +1 -0
- package/dist/validators/asset.js +11 -0
- package/dist/validators/asset.js.map +1 -0
- package/dist/validators/budget.d.ts +56 -0
- package/dist/validators/budget.d.ts.map +1 -0
- package/dist/validators/budget.js +27 -0
- package/dist/validators/budget.js.map +1 -0
- package/dist/validators/company-portability.d.ts +1656 -0
- package/dist/validators/company-portability.d.ts.map +1 -0
- package/dist/validators/company-portability.js +211 -0
- package/dist/validators/company-portability.js.map +1 -0
- package/dist/validators/company-skill.d.ts +797 -0
- package/dist/validators/company-skill.d.ts.map +1 -0
- package/dist/validators/company-skill.js +116 -0
- package/dist/validators/company-skill.js.map +1 -0
- package/dist/validators/company.d.ts +73 -0
- package/dist/validators/company.d.ts.map +1 -0
- package/dist/validators/company.js +31 -0
- package/dist/validators/company.js.map +1 -0
- package/dist/validators/cost.d.ts +92 -0
- package/dist/validators/cost.d.ts.map +1 -0
- package/dist/validators/cost.js +26 -0
- package/dist/validators/cost.js.map +1 -0
- package/dist/validators/execution-workspace.d.ts +20 -0
- package/dist/validators/execution-workspace.d.ts.map +1 -0
- package/dist/validators/execution-workspace.js +15 -0
- package/dist/validators/execution-workspace.js.map +1 -0
- package/dist/validators/finance.d.ts +129 -0
- package/dist/validators/finance.d.ts.map +1 -0
- package/dist/validators/finance.js +32 -0
- package/dist/validators/finance.js.map +1 -0
- package/dist/validators/goal.d.ts +48 -0
- package/dist/validators/goal.d.ts.map +1 -0
- package/dist/validators/goal.js +12 -0
- package/dist/validators/goal.js.map +1 -0
- package/dist/validators/index.d.ts +21 -0
- package/dist/validators/index.d.ts.map +1 -0
- package/dist/validators/index.js +21 -0
- package/dist/validators/index.js.map +1 -0
- package/dist/validators/instance.d.ts +40 -0
- package/dist/validators/instance.d.ts.map +1 -0
- package/dist/validators/instance.js +11 -0
- package/dist/validators/instance.js.map +1 -0
- package/dist/validators/issue.d.ts +427 -0
- package/dist/validators/issue.d.ts.map +1 -0
- package/dist/validators/issue.js +91 -0
- package/dist/validators/issue.js.map +1 -0
- package/dist/validators/plugin.d.ts +1173 -0
- package/dist/validators/plugin.d.ts.map +1 -0
- package/dist/validators/plugin.js +547 -0
- package/dist/validators/plugin.js.map +1 -0
- package/dist/validators/project.d.ts +583 -0
- package/dist/validators/project.d.ts.map +1 -0
- package/dist/validators/project.js +93 -0
- package/dist/validators/project.js.map +1 -0
- package/dist/validators/routine.d.ts +167 -0
- package/dist/validators/routine.d.ts.map +1 -0
- package/dist/validators/routine.js +50 -0
- package/dist/validators/routine.js.map +1 -0
- package/dist/validators/secret.d.ts +114 -0
- package/dist/validators/secret.d.ts.map +1 -0
- package/dist/validators/secret.js +35 -0
- package/dist/validators/secret.js.map +1 -0
- package/dist/validators/work-product.d.ts +105 -0
- package/dist/validators/work-product.d.ts.map +1 -0
- package/dist/validators/work-product.js +46 -0
- package/dist/validators/work-product.js.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
import type { PluginStatus, PluginCategory, PluginCapability, PluginUiSlotType, PluginUiSlotEntityType, PluginStateScopeKind, PluginLauncherPlacementZone, PluginLauncherAction, PluginLauncherBounds, PluginLauncherRenderEnvironment } from "../constants.js";
|
|
2
|
+
/**
|
|
3
|
+
* A JSON Schema object used for plugin config schemas and tool parameter schemas.
|
|
4
|
+
* Plugins provide these as plain JSON Schema compatible objects.
|
|
5
|
+
*/
|
|
6
|
+
export type JsonSchema = Record<string, unknown>;
|
|
7
|
+
/**
|
|
8
|
+
* Declares a scheduled job a plugin can run.
|
|
9
|
+
*
|
|
10
|
+
* @see PLUGIN_SPEC.md §17 — Scheduled Jobs
|
|
11
|
+
*/
|
|
12
|
+
export interface PluginJobDeclaration {
|
|
13
|
+
/** Stable identifier for this job, unique within the plugin. */
|
|
14
|
+
jobKey: string;
|
|
15
|
+
/** Human-readable name shown in the operator UI. */
|
|
16
|
+
displayName: string;
|
|
17
|
+
/** Optional description of what the job does. */
|
|
18
|
+
description?: string;
|
|
19
|
+
/** Cron expression for the schedule (e.g. "star/15 star star star star" or "0 * * * *"). */
|
|
20
|
+
schedule?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Declares a webhook endpoint the plugin can receive.
|
|
24
|
+
* Route: `POST /api/plugins/:pluginId/webhooks/:endpointKey`
|
|
25
|
+
*
|
|
26
|
+
* @see PLUGIN_SPEC.md §18 — Webhooks
|
|
27
|
+
*/
|
|
28
|
+
export interface PluginWebhookDeclaration {
|
|
29
|
+
/** Stable identifier for this endpoint, unique within the plugin. */
|
|
30
|
+
endpointKey: string;
|
|
31
|
+
/** Human-readable name shown in the operator UI. */
|
|
32
|
+
displayName: string;
|
|
33
|
+
/** Optional description of what this webhook handles. */
|
|
34
|
+
description?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Declares an agent tool contributed by the plugin. Tools are namespaced
|
|
38
|
+
* by plugin ID at runtime (e.g. `linear:search-issues`).
|
|
39
|
+
*
|
|
40
|
+
* Requires the `agent.tools.register` capability.
|
|
41
|
+
*
|
|
42
|
+
* @see PLUGIN_SPEC.md §11 — Agent Tools
|
|
43
|
+
*/
|
|
44
|
+
export interface PluginToolDeclaration {
|
|
45
|
+
/** Tool name, unique within the plugin. Namespaced by plugin ID at runtime. */
|
|
46
|
+
name: string;
|
|
47
|
+
/** Human-readable name shown to agents and in the UI. */
|
|
48
|
+
displayName: string;
|
|
49
|
+
/** Description provided to the agent so it knows when to use this tool. */
|
|
50
|
+
description: string;
|
|
51
|
+
/** JSON Schema describing the tool's input parameters. */
|
|
52
|
+
parametersSchema: JsonSchema;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Declares a UI extension slot the plugin fills with a React component.
|
|
56
|
+
*
|
|
57
|
+
* @see PLUGIN_SPEC.md §19 — UI Extension Model
|
|
58
|
+
*/
|
|
59
|
+
export interface PluginUiSlotDeclaration {
|
|
60
|
+
/** The type of UI mount point (page, detailTab, taskDetailView, toolbarButton, etc.). */
|
|
61
|
+
type: PluginUiSlotType;
|
|
62
|
+
/** Unique slot identifier within the plugin. */
|
|
63
|
+
id: string;
|
|
64
|
+
/** Human-readable name shown in navigation or tab labels. */
|
|
65
|
+
displayName: string;
|
|
66
|
+
/** Which export name in the UI bundle provides this component. */
|
|
67
|
+
exportName: string;
|
|
68
|
+
/**
|
|
69
|
+
* Entity targets for context-sensitive slots.
|
|
70
|
+
* Required for `detailTab`, `taskDetailView`, and `contextMenuItem`.
|
|
71
|
+
*/
|
|
72
|
+
entityTypes?: PluginUiSlotEntityType[];
|
|
73
|
+
/**
|
|
74
|
+
* Optional company-scoped route segment for page slots.
|
|
75
|
+
* Example: `kitchensink` becomes `/:companyPrefix/kitchensink`.
|
|
76
|
+
*/
|
|
77
|
+
routePath?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Optional ordering hint within a slot surface. Lower numbers appear first.
|
|
80
|
+
* Defaults to host-defined ordering if omitted.
|
|
81
|
+
*/
|
|
82
|
+
order?: number;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Describes the action triggered by a plugin launcher surface.
|
|
86
|
+
*/
|
|
87
|
+
export interface PluginLauncherActionDeclaration {
|
|
88
|
+
/** What kind of launch behavior the host should perform. */
|
|
89
|
+
type: PluginLauncherAction;
|
|
90
|
+
/**
|
|
91
|
+
* Stable target identifier or URL. The meaning depends on `type`
|
|
92
|
+
* (for example a route, tab key, action key, or external URL).
|
|
93
|
+
*/
|
|
94
|
+
target: string;
|
|
95
|
+
/** Optional arbitrary parameters passed along to the target. */
|
|
96
|
+
params?: Record<string, unknown>;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Optional render metadata for the destination opened by a launcher.
|
|
100
|
+
*/
|
|
101
|
+
export interface PluginLauncherRenderDeclaration {
|
|
102
|
+
/** High-level container the launcher expects the host to use. */
|
|
103
|
+
environment: PluginLauncherRenderEnvironment;
|
|
104
|
+
/** Optional size hint for the destination surface. */
|
|
105
|
+
bounds?: PluginLauncherBounds;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Serializable runtime snapshot of the host launcher/container environment.
|
|
109
|
+
*/
|
|
110
|
+
export interface PluginLauncherRenderContextSnapshot {
|
|
111
|
+
/** The current launcher/container environment selected by the host. */
|
|
112
|
+
environment: PluginLauncherRenderEnvironment | null;
|
|
113
|
+
/** Launcher id that opened this surface, if any. */
|
|
114
|
+
launcherId: string | null;
|
|
115
|
+
/** Current host-applied bounds hint for the environment, if any. */
|
|
116
|
+
bounds: PluginLauncherBounds | null;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Declares a plugin launcher surface independent of the low-level slot
|
|
120
|
+
* implementation that mounts it.
|
|
121
|
+
*/
|
|
122
|
+
export interface PluginLauncherDeclaration {
|
|
123
|
+
/** Stable identifier for this launcher, unique within the plugin. */
|
|
124
|
+
id: string;
|
|
125
|
+
/** Human-readable label shown for the launcher. */
|
|
126
|
+
displayName: string;
|
|
127
|
+
/** Optional description for operator-facing docs or future UI affordances. */
|
|
128
|
+
description?: string;
|
|
129
|
+
/** Where in the host UI this launcher should be placed. */
|
|
130
|
+
placementZone: PluginLauncherPlacementZone;
|
|
131
|
+
/** Optional export name in the UI bundle when the launcher has custom UI. */
|
|
132
|
+
exportName?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Optional entity targeting for context-sensitive launcher zones.
|
|
135
|
+
* Reuses the same entity union as UI slots for consistency.
|
|
136
|
+
*/
|
|
137
|
+
entityTypes?: PluginUiSlotEntityType[];
|
|
138
|
+
/** Optional ordering hint within the placement zone. */
|
|
139
|
+
order?: number;
|
|
140
|
+
/** What should happen when the launcher is activated. */
|
|
141
|
+
action: PluginLauncherActionDeclaration;
|
|
142
|
+
/** Optional render/container hints for the launched destination. */
|
|
143
|
+
render?: PluginLauncherRenderDeclaration;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Lower-bound semver requirement for the FideliOS host.
|
|
147
|
+
*
|
|
148
|
+
* The host should reject installation when its running version is lower than
|
|
149
|
+
* the declared minimum.
|
|
150
|
+
*/
|
|
151
|
+
export type PluginMinimumHostVersion = string;
|
|
152
|
+
/**
|
|
153
|
+
* Groups plugin UI declarations that are served from the shared UI bundle
|
|
154
|
+
* root declared in `entrypoints.ui`.
|
|
155
|
+
*/
|
|
156
|
+
export interface PluginUiDeclaration {
|
|
157
|
+
/** UI extension slots this plugin fills. */
|
|
158
|
+
slots?: PluginUiSlotDeclaration[];
|
|
159
|
+
/** Declarative launcher metadata for host-mounted plugin entry points. */
|
|
160
|
+
launchers?: PluginLauncherDeclaration[];
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* The manifest shape every plugin package must export.
|
|
164
|
+
* See PLUGIN_SPEC.md §10.1 for the normative definition.
|
|
165
|
+
*/
|
|
166
|
+
export interface FideliOSPluginManifestV1 {
|
|
167
|
+
/** Globally unique plugin identifier (e.g. `"acme.linear-sync"`). Must be lowercase alphanumeric with dots, hyphens, or underscores. */
|
|
168
|
+
id: string;
|
|
169
|
+
/** Plugin API version. Must be `1` for the current spec. */
|
|
170
|
+
apiVersion: 1;
|
|
171
|
+
/** Semver version of the plugin package (e.g. `"1.2.0"`). */
|
|
172
|
+
version: string;
|
|
173
|
+
/** Human-readable name (max 100 chars). */
|
|
174
|
+
displayName: string;
|
|
175
|
+
/** Short description (max 500 chars). */
|
|
176
|
+
description: string;
|
|
177
|
+
/** Author name (max 200 chars). May include email in angle brackets, e.g. `"Jane Doe <jane@example.com>"`. */
|
|
178
|
+
author: string;
|
|
179
|
+
/** One or more categories classifying this plugin. */
|
|
180
|
+
categories: PluginCategory[];
|
|
181
|
+
/**
|
|
182
|
+
* Minimum host version required (semver lower bound).
|
|
183
|
+
* Preferred generic field for new manifests.
|
|
184
|
+
*/
|
|
185
|
+
minimumHostVersion?: PluginMinimumHostVersion;
|
|
186
|
+
/**
|
|
187
|
+
* Legacy alias for `minimumHostVersion`.
|
|
188
|
+
* Kept for backwards compatibility with existing manifests and docs.
|
|
189
|
+
*/
|
|
190
|
+
minimumFideliOSVersion?: PluginMinimumHostVersion;
|
|
191
|
+
/** Capabilities this plugin requires from the host. Enforced at runtime. */
|
|
192
|
+
capabilities: PluginCapability[];
|
|
193
|
+
/** Entrypoint paths relative to the package root. */
|
|
194
|
+
entrypoints: {
|
|
195
|
+
/** Path to the worker entrypoint (required). */
|
|
196
|
+
worker: string;
|
|
197
|
+
/** Path to the UI bundle directory (required when `ui.slots` is declared). */
|
|
198
|
+
ui?: string;
|
|
199
|
+
};
|
|
200
|
+
/** JSON Schema for operator-editable instance configuration. */
|
|
201
|
+
instanceConfigSchema?: JsonSchema;
|
|
202
|
+
/** Scheduled jobs this plugin declares. Requires `jobs.schedule` capability. */
|
|
203
|
+
jobs?: PluginJobDeclaration[];
|
|
204
|
+
/** Webhook endpoints this plugin declares. Requires `webhooks.receive` capability. */
|
|
205
|
+
webhooks?: PluginWebhookDeclaration[];
|
|
206
|
+
/** Agent tools this plugin contributes. Requires `agent.tools.register` capability. */
|
|
207
|
+
tools?: PluginToolDeclaration[];
|
|
208
|
+
/**
|
|
209
|
+
* Legacy top-level launcher declarations.
|
|
210
|
+
* Prefer `ui.launchers` for new manifests.
|
|
211
|
+
*/
|
|
212
|
+
launchers?: PluginLauncherDeclaration[];
|
|
213
|
+
/** UI bundle declarations. Requires `entrypoints.ui` when populated. */
|
|
214
|
+
ui?: PluginUiDeclaration;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Domain type for an installed plugin as persisted in the `plugins` table.
|
|
218
|
+
* See PLUGIN_SPEC.md §21.3 for the schema definition.
|
|
219
|
+
*/
|
|
220
|
+
export interface PluginRecord {
|
|
221
|
+
/** UUID primary key. */
|
|
222
|
+
id: string;
|
|
223
|
+
/** Unique key derived from `manifest.id`. Used for lookups. */
|
|
224
|
+
pluginKey: string;
|
|
225
|
+
/** npm package name (e.g. `"@acme/plugin-linear"`). */
|
|
226
|
+
packageName: string;
|
|
227
|
+
/** Installed semver version. */
|
|
228
|
+
version: string;
|
|
229
|
+
/** Plugin API version from the manifest. */
|
|
230
|
+
apiVersion: number;
|
|
231
|
+
/** Plugin categories from the manifest. */
|
|
232
|
+
categories: PluginCategory[];
|
|
233
|
+
/** Full manifest snapshot persisted at install/upgrade time. */
|
|
234
|
+
manifestJson: FideliOSPluginManifestV1;
|
|
235
|
+
/** Current lifecycle status. */
|
|
236
|
+
status: PluginStatus;
|
|
237
|
+
/** Deterministic load order (null if not yet assigned). */
|
|
238
|
+
installOrder: number | null;
|
|
239
|
+
/** Resolved package path for local-path installs; used to find worker entrypoint. */
|
|
240
|
+
packagePath: string | null;
|
|
241
|
+
/** Most recent error message, or operator-provided disable reason. */
|
|
242
|
+
lastError: string | null;
|
|
243
|
+
/** Timestamp when the plugin was first installed. */
|
|
244
|
+
installedAt: Date;
|
|
245
|
+
/** Timestamp of the most recent status or metadata change. */
|
|
246
|
+
updatedAt: Date;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Domain type for a single scoped key-value entry in the `plugin_state` table.
|
|
250
|
+
* Plugins read and write these entries through `ctx.state` in the SDK.
|
|
251
|
+
*
|
|
252
|
+
* The five-part composite key `(pluginId, scopeKind, scopeId, namespace, stateKey)`
|
|
253
|
+
* uniquely identifies a state entry.
|
|
254
|
+
*
|
|
255
|
+
* @see PLUGIN_SPEC.md §21.3 — `plugin_state`
|
|
256
|
+
*/
|
|
257
|
+
export interface PluginStateRecord {
|
|
258
|
+
/** UUID primary key. */
|
|
259
|
+
id: string;
|
|
260
|
+
/** FK to `plugins.id`. */
|
|
261
|
+
pluginId: string;
|
|
262
|
+
/** Granularity of the scope. */
|
|
263
|
+
scopeKind: PluginStateScopeKind;
|
|
264
|
+
/**
|
|
265
|
+
* UUID or text identifier for the scoped object.
|
|
266
|
+
* `null` for `instance` scope (no associated entity).
|
|
267
|
+
*/
|
|
268
|
+
scopeId: string | null;
|
|
269
|
+
/**
|
|
270
|
+
* Sub-namespace within the scope to avoid key collisions.
|
|
271
|
+
* Defaults to `"default"` if not explicitly set by the plugin.
|
|
272
|
+
*/
|
|
273
|
+
namespace: string;
|
|
274
|
+
/** The key for this state entry within the namespace. */
|
|
275
|
+
stateKey: string;
|
|
276
|
+
/** Stored JSON value. May be any JSON-serializable type. */
|
|
277
|
+
valueJson: unknown;
|
|
278
|
+
/** Timestamp of the most recent write. */
|
|
279
|
+
updatedAt: Date;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Domain type for a plugin's instance configuration as persisted in the
|
|
283
|
+
* `plugin_config` table.
|
|
284
|
+
* See PLUGIN_SPEC.md §21.3 for the schema definition.
|
|
285
|
+
*/
|
|
286
|
+
export interface PluginConfig {
|
|
287
|
+
/** UUID primary key. */
|
|
288
|
+
id: string;
|
|
289
|
+
/** FK to `plugins.id`. Unique — each plugin has at most one config row. */
|
|
290
|
+
pluginId: string;
|
|
291
|
+
/** Operator-provided configuration values (validated against `instanceConfigSchema`). */
|
|
292
|
+
configJson: Record<string, unknown>;
|
|
293
|
+
/** Most recent config validation error, if any. */
|
|
294
|
+
lastError: string | null;
|
|
295
|
+
/** Timestamp when the config row was created. */
|
|
296
|
+
createdAt: Date;
|
|
297
|
+
/** Timestamp of the most recent config update. */
|
|
298
|
+
updatedAt: Date;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Query filter for `ctx.entities.list`.
|
|
302
|
+
*/
|
|
303
|
+
export interface PluginEntityQuery {
|
|
304
|
+
/** Optional filter by entity type (e.g. 'project', 'issue'). */
|
|
305
|
+
entityType?: string;
|
|
306
|
+
/** Optional filter by external system identifier. */
|
|
307
|
+
externalId?: string;
|
|
308
|
+
/** Maximum number of records to return. Defaults to 100. */
|
|
309
|
+
limit?: number;
|
|
310
|
+
/** Number of records to skip. Defaults to 0. */
|
|
311
|
+
offset?: number;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Domain type for an external entity mapping as persisted in the `plugin_entities` table.
|
|
315
|
+
*/
|
|
316
|
+
export interface PluginEntityRecord {
|
|
317
|
+
/** UUID primary key. */
|
|
318
|
+
id: string;
|
|
319
|
+
/** FK to `plugins.id`. */
|
|
320
|
+
pluginId: string;
|
|
321
|
+
/** Plugin-defined entity type. */
|
|
322
|
+
entityType: string;
|
|
323
|
+
/** Scope where this entity lives. */
|
|
324
|
+
scopeKind: PluginStateScopeKind;
|
|
325
|
+
/** UUID or text identifier for the scoped object. */
|
|
326
|
+
scopeId: string | null;
|
|
327
|
+
/** External identifier in the remote system. */
|
|
328
|
+
externalId: string | null;
|
|
329
|
+
/** Human-readable title. */
|
|
330
|
+
title: string | null;
|
|
331
|
+
/** Optional status string. */
|
|
332
|
+
status: string | null;
|
|
333
|
+
/** Full entity data blob. */
|
|
334
|
+
data: Record<string, unknown>;
|
|
335
|
+
/** ISO 8601 creation timestamp. */
|
|
336
|
+
createdAt: Date;
|
|
337
|
+
/** ISO 8601 last-updated timestamp. */
|
|
338
|
+
updatedAt: Date;
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Domain type for a registered plugin job as persisted in the `plugin_jobs` table.
|
|
342
|
+
*/
|
|
343
|
+
export interface PluginJobRecord {
|
|
344
|
+
/** UUID primary key. */
|
|
345
|
+
id: string;
|
|
346
|
+
/** FK to `plugins.id`. */
|
|
347
|
+
pluginId: string;
|
|
348
|
+
/** Job key matching the manifest declaration. */
|
|
349
|
+
jobKey: string;
|
|
350
|
+
/** Cron expression for the schedule. */
|
|
351
|
+
schedule: string;
|
|
352
|
+
/** Current job status. */
|
|
353
|
+
status: "active" | "paused" | "failed";
|
|
354
|
+
/** Last time the job was executed. */
|
|
355
|
+
lastRunAt: Date | null;
|
|
356
|
+
/** Next scheduled execution time. */
|
|
357
|
+
nextRunAt: Date | null;
|
|
358
|
+
/** ISO 8601 creation timestamp. */
|
|
359
|
+
createdAt: Date;
|
|
360
|
+
/** ISO 8601 last-updated timestamp. */
|
|
361
|
+
updatedAt: Date;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Domain type for a job execution history record.
|
|
365
|
+
*/
|
|
366
|
+
export interface PluginJobRunRecord {
|
|
367
|
+
/** UUID primary key. */
|
|
368
|
+
id: string;
|
|
369
|
+
/** FK to `plugin_jobs.id`. */
|
|
370
|
+
jobId: string;
|
|
371
|
+
/** FK to `plugins.id`. */
|
|
372
|
+
pluginId: string;
|
|
373
|
+
/** What triggered this run. */
|
|
374
|
+
trigger: "schedule" | "manual" | "retry";
|
|
375
|
+
/** Current run status. */
|
|
376
|
+
status: "pending" | "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
377
|
+
/** Run duration in milliseconds. */
|
|
378
|
+
durationMs: number | null;
|
|
379
|
+
/** Error message if the run failed. */
|
|
380
|
+
error: string | null;
|
|
381
|
+
/** Run logs. */
|
|
382
|
+
logs: string[];
|
|
383
|
+
/** ISO 8601 start timestamp. */
|
|
384
|
+
startedAt: Date | null;
|
|
385
|
+
/** ISO 8601 finish timestamp. */
|
|
386
|
+
finishedAt: Date | null;
|
|
387
|
+
/** ISO 8601 creation timestamp. */
|
|
388
|
+
createdAt: Date;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Domain type for an inbound webhook delivery record.
|
|
392
|
+
*/
|
|
393
|
+
export interface PluginWebhookDeliveryRecord {
|
|
394
|
+
/** UUID primary key. */
|
|
395
|
+
id: string;
|
|
396
|
+
/** FK to `plugins.id`. */
|
|
397
|
+
pluginId: string;
|
|
398
|
+
/** Webhook endpoint key matching the manifest. */
|
|
399
|
+
webhookKey: string;
|
|
400
|
+
/** External identifier from the remote system. */
|
|
401
|
+
externalId: string | null;
|
|
402
|
+
/** Delivery status. */
|
|
403
|
+
status: "pending" | "success" | "failed";
|
|
404
|
+
/** Processing duration in milliseconds. */
|
|
405
|
+
durationMs: number | null;
|
|
406
|
+
/** Error message if processing failed. */
|
|
407
|
+
error: string | null;
|
|
408
|
+
/** Webhook payload. */
|
|
409
|
+
payload: Record<string, unknown>;
|
|
410
|
+
/** Webhook headers. */
|
|
411
|
+
headers: Record<string, string>;
|
|
412
|
+
/** ISO 8601 start timestamp. */
|
|
413
|
+
startedAt: Date | null;
|
|
414
|
+
/** ISO 8601 finish timestamp. */
|
|
415
|
+
finishedAt: Date | null;
|
|
416
|
+
/** ISO 8601 creation timestamp. */
|
|
417
|
+
createdAt: Date;
|
|
418
|
+
}
|
|
419
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/types/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,EACpB,2BAA2B,EAC3B,oBAAoB,EACpB,oBAAoB,EACpB,+BAA+B,EAChC,MAAM,iBAAiB,CAAC;AAMzB;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAMjD;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;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gC;IAChC,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,iCAAiC;IACjC,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,mCAAmC;IACnC,SAAS,EAAE,IAAI,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/types/plugin.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { PauseReason, ProjectStatus } from "../constants.js";
|
|
2
|
+
import type { ProjectExecutionWorkspacePolicy, WorkspaceRuntimeService } from "./workspace-runtime.js";
|
|
3
|
+
export type ProjectWorkspaceSourceType = "local_path" | "git_repo" | "remote_managed" | "non_git_path";
|
|
4
|
+
export type ProjectWorkspaceVisibility = "default" | "advanced";
|
|
5
|
+
export interface ProjectGoalRef {
|
|
6
|
+
id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ProjectWorkspace {
|
|
10
|
+
id: string;
|
|
11
|
+
companyId: string;
|
|
12
|
+
projectId: string;
|
|
13
|
+
name: string;
|
|
14
|
+
sourceType: ProjectWorkspaceSourceType;
|
|
15
|
+
cwd: string | null;
|
|
16
|
+
repoUrl: string | null;
|
|
17
|
+
repoRef: string | null;
|
|
18
|
+
defaultRef: string | null;
|
|
19
|
+
visibility: ProjectWorkspaceVisibility;
|
|
20
|
+
setupCommand: string | null;
|
|
21
|
+
cleanupCommand: string | null;
|
|
22
|
+
remoteProvider: string | null;
|
|
23
|
+
remoteWorkspaceRef: string | null;
|
|
24
|
+
sharedWorkspaceKey: string | null;
|
|
25
|
+
metadata: Record<string, unknown> | null;
|
|
26
|
+
isPrimary: boolean;
|
|
27
|
+
runtimeServices?: WorkspaceRuntimeService[];
|
|
28
|
+
createdAt: Date;
|
|
29
|
+
updatedAt: Date;
|
|
30
|
+
}
|
|
31
|
+
export type ProjectCodebaseOrigin = "local_folder" | "managed_checkout";
|
|
32
|
+
export interface ProjectCodebase {
|
|
33
|
+
workspaceId: string | null;
|
|
34
|
+
repoUrl: string | null;
|
|
35
|
+
repoRef: string | null;
|
|
36
|
+
defaultRef: string | null;
|
|
37
|
+
repoName: string | null;
|
|
38
|
+
localFolder: string | null;
|
|
39
|
+
managedFolder: string;
|
|
40
|
+
effectiveLocalFolder: string;
|
|
41
|
+
origin: ProjectCodebaseOrigin;
|
|
42
|
+
}
|
|
43
|
+
export interface Project {
|
|
44
|
+
id: string;
|
|
45
|
+
companyId: string;
|
|
46
|
+
urlKey: string;
|
|
47
|
+
/** @deprecated Use goalIds / goals instead */
|
|
48
|
+
goalId: string | null;
|
|
49
|
+
goalIds: string[];
|
|
50
|
+
goals: ProjectGoalRef[];
|
|
51
|
+
name: string;
|
|
52
|
+
description: string | null;
|
|
53
|
+
status: ProjectStatus;
|
|
54
|
+
leadAgentId: string | null;
|
|
55
|
+
targetDate: string | null;
|
|
56
|
+
color: string | null;
|
|
57
|
+
pauseReason: PauseReason | null;
|
|
58
|
+
pausedAt: Date | null;
|
|
59
|
+
executionWorkspacePolicy: ProjectExecutionWorkspacePolicy | null;
|
|
60
|
+
codebase: ProjectCodebase;
|
|
61
|
+
workspaces: ProjectWorkspace[];
|
|
62
|
+
primaryWorkspace: ProjectWorkspace | null;
|
|
63
|
+
archivedAt: Date | null;
|
|
64
|
+
createdAt: Date;
|
|
65
|
+
updatedAt: Date;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/types/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,+BAA+B,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEvG,MAAM,MAAM,0BAA0B,GAAG,YAAY,GAAG,UAAU,GAAG,gBAAgB,GA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1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,MAAM,EAAE,qBAAqB,CAAC;CAC/B;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB,wBAAwB,EAAE,+BAA+B,GAAG,IAAI,CAAC;IACjE,QAAQ,EAAE,eAAe,CAAC;IAC1B,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,gBAAgB,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC1C,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/types/project.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** a single rate-limit or usage window returned by a provider quota API */
|
|
2
|
+
export interface QuotaWindow {
|
|
3
|
+
/** human label, e.g. "5h", "7d", "Sonnet 7d", "Credits" */
|
|
4
|
+
label: string;
|
|
5
|
+
/** percent of the window already consumed (0-100), null when not reported */
|
|
6
|
+
usedPercent: number | null;
|
|
7
|
+
/** iso timestamp when this window resets, null when not reported */
|
|
8
|
+
resetsAt: string | null;
|
|
9
|
+
/** free-form value label for credit-style windows, e.g. "$4.20 remaining" */
|
|
10
|
+
valueLabel: string | null;
|
|
11
|
+
/** optional supporting text, e.g. reset details or provider-specific notes */
|
|
12
|
+
detail?: string | null;
|
|
13
|
+
}
|
|
14
|
+
/** result for one provider from the quota-windows endpoint */
|
|
15
|
+
export interface ProviderQuotaResult {
|
|
16
|
+
/** provider slug, e.g. "anthropic", "openai" */
|
|
17
|
+
provider: string;
|
|
18
|
+
/** source label when the provider reports where the quota data came from */
|
|
19
|
+
source?: string | null;
|
|
20
|
+
/** true when the fetch succeeded and windows is populated */
|
|
21
|
+
ok: boolean;
|
|
22
|
+
/** error message when ok is false */
|
|
23
|
+
error?: string;
|
|
24
|
+
windows: QuotaWindow[];
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=quota.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quota.d.ts","sourceRoot":"","sources":["../../src/types/quota.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,MAAM,WAAW,WAAW;IAC1B,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,oEAAoE;IACpE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,6EAA6E;IAC7E,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,8DAA8D;AAC9D,MAAM,WAAW,mBAAmB;IAClC,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,6DAA6D;IAC7D,EAAE,EAAE,OAAO,CAAC;IACZ,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quota.js","sourceRoot":"","sources":["../../src/types/quota.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { IssueOriginKind } from "../constants.js";
|
|
2
|
+
export interface RoutineProjectSummary {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string | null;
|
|
6
|
+
status: string;
|
|
7
|
+
goalId?: string | null;
|
|
8
|
+
}
|
|
9
|
+
export interface RoutineAgentSummary {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
role: string;
|
|
13
|
+
title: string | null;
|
|
14
|
+
urlKey?: string | null;
|
|
15
|
+
}
|
|
16
|
+
export interface RoutineIssueSummary {
|
|
17
|
+
id: string;
|
|
18
|
+
identifier: string | null;
|
|
19
|
+
title: string;
|
|
20
|
+
status: string;
|
|
21
|
+
priority: string;
|
|
22
|
+
updatedAt: Date;
|
|
23
|
+
}
|
|
24
|
+
export interface Routine {
|
|
25
|
+
id: string;
|
|
26
|
+
companyId: string;
|
|
27
|
+
projectId: string;
|
|
28
|
+
goalId: string | null;
|
|
29
|
+
parentIssueId: string | null;
|
|
30
|
+
title: string;
|
|
31
|
+
description: string | null;
|
|
32
|
+
assigneeAgentId: string;
|
|
33
|
+
priority: string;
|
|
34
|
+
status: string;
|
|
35
|
+
concurrencyPolicy: string;
|
|
36
|
+
catchUpPolicy: string;
|
|
37
|
+
createdByAgentId: string | null;
|
|
38
|
+
createdByUserId: string | null;
|
|
39
|
+
updatedByAgentId: string | null;
|
|
40
|
+
updatedByUserId: string | null;
|
|
41
|
+
lastTriggeredAt: Date | null;
|
|
42
|
+
lastEnqueuedAt: Date | null;
|
|
43
|
+
createdAt: Date;
|
|
44
|
+
updatedAt: Date;
|
|
45
|
+
}
|
|
46
|
+
export interface RoutineTrigger {
|
|
47
|
+
id: string;
|
|
48
|
+
companyId: string;
|
|
49
|
+
routineId: string;
|
|
50
|
+
kind: string;
|
|
51
|
+
label: string | null;
|
|
52
|
+
enabled: boolean;
|
|
53
|
+
cronExpression: string | null;
|
|
54
|
+
timezone: string | null;
|
|
55
|
+
nextRunAt: Date | null;
|
|
56
|
+
lastFiredAt: Date | null;
|
|
57
|
+
publicId: string | null;
|
|
58
|
+
secretId: string | null;
|
|
59
|
+
signingMode: string | null;
|
|
60
|
+
replayWindowSec: number | null;
|
|
61
|
+
lastRotatedAt: Date | null;
|
|
62
|
+
lastResult: string | null;
|
|
63
|
+
createdByAgentId: string | null;
|
|
64
|
+
createdByUserId: string | null;
|
|
65
|
+
updatedByAgentId: string | null;
|
|
66
|
+
updatedByUserId: string | null;
|
|
67
|
+
createdAt: Date;
|
|
68
|
+
updatedAt: Date;
|
|
69
|
+
}
|
|
70
|
+
export interface RoutineRun {
|
|
71
|
+
id: string;
|
|
72
|
+
companyId: string;
|
|
73
|
+
routineId: string;
|
|
74
|
+
triggerId: string | null;
|
|
75
|
+
source: string;
|
|
76
|
+
status: string;
|
|
77
|
+
triggeredAt: Date;
|
|
78
|
+
idempotencyKey: string | null;
|
|
79
|
+
triggerPayload: Record<string, unknown> | null;
|
|
80
|
+
linkedIssueId: string | null;
|
|
81
|
+
coalescedIntoRunId: string | null;
|
|
82
|
+
failureReason: string | null;
|
|
83
|
+
completedAt: Date | null;
|
|
84
|
+
createdAt: Date;
|
|
85
|
+
updatedAt: Date;
|
|
86
|
+
}
|
|
87
|
+
export interface RoutineTriggerSecretMaterial {
|
|
88
|
+
webhookUrl: string;
|
|
89
|
+
webhookSecret: string;
|
|
90
|
+
}
|
|
91
|
+
export interface RoutineDetail extends Routine {
|
|
92
|
+
project: RoutineProjectSummary | null;
|
|
93
|
+
assignee: RoutineAgentSummary | null;
|
|
94
|
+
parentIssue: RoutineIssueSummary | null;
|
|
95
|
+
triggers: RoutineTrigger[];
|
|
96
|
+
recentRuns: RoutineRunSummary[];
|
|
97
|
+
activeIssue: RoutineIssueSummary | null;
|
|
98
|
+
}
|
|
99
|
+
export interface RoutineRunSummary extends RoutineRun {
|
|
100
|
+
linkedIssue: RoutineIssueSummary | null;
|
|
101
|
+
trigger: Pick<RoutineTrigger, "id" | "kind" | "label"> | null;
|
|
102
|
+
}
|
|
103
|
+
export interface RoutineExecutionIssueOrigin {
|
|
104
|
+
kind: Extract<IssueOriginKind, "routine_execution">;
|
|
105
|
+
routineId: string;
|
|
106
|
+
runId: string | null;
|
|
107
|
+
}
|
|
108
|
+
export interface RoutineListItem extends Routine {
|
|
109
|
+
triggers: Pick<RoutineTrigger, "id" | "kind" | "label" | "enabled" | "nextRunAt" | "lastFiredAt" | "lastResult">[];
|
|
110
|
+
lastRun: RoutineRunSummary | null;
|
|
111
|
+
activeIssue: RoutineIssueSummary | null;
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=routine.d.ts.map
|