@evermore.work/shared 2026.509.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/dist/adapter-type.d.ts +4 -0
- package/dist/adapter-type.d.ts.map +1 -0
- package/dist/adapter-type.js +14 -0
- package/dist/adapter-type.js.map +1 -0
- package/dist/adapter-types.test.d.ts +2 -0
- package/dist/adapter-types.test.d.ts.map +1 -0
- package/dist/adapter-types.test.js +46 -0
- package/dist/adapter-types.test.js.map +1 -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 +23 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +23 -0
- package/dist/api.js.map +1 -0
- package/dist/config-schema.d.ts +725 -0
- package/dist/config-schema.d.ts.map +1 -0
- package/dist/config-schema.js +160 -0
- package/dist/config-schema.js.map +1 -0
- package/dist/constants.d.ts +323 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +761 -0
- package/dist/constants.js.map +1 -0
- package/dist/environment-support.d.ts +37 -0
- package/dist/environment-support.d.ts.map +1 -0
- package/dist/environment-support.js +92 -0
- package/dist/environment-support.js.map +1 -0
- package/dist/environment-support.test.d.ts +2 -0
- package/dist/environment-support.test.d.ts.map +1 -0
- package/dist/environment-support.test.js +11 -0
- package/dist/environment-support.test.js.map +1 -0
- package/dist/execution-workspace-guards.d.ts +6 -0
- package/dist/execution-workspace-guards.d.ts.map +1 -0
- package/dist/execution-workspace-guards.js +12 -0
- package/dist/execution-workspace-guards.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/issue-references.d.ts +16 -0
- package/dist/issue-references.d.ts.map +1 -0
- package/dist/issue-references.js +160 -0
- package/dist/issue-references.js.map +1 -0
- package/dist/issue-references.test.d.ts +2 -0
- package/dist/issue-references.test.d.ts.map +1 -0
- package/dist/issue-references.test.js +56 -0
- package/dist/issue-references.test.js.map +1 -0
- package/dist/issue-thread-interactions.test.d.ts +2 -0
- package/dist/issue-thread-interactions.test.d.ts.map +1 -0
- package/dist/issue-thread-interactions.test.js +118 -0
- package/dist/issue-thread-interactions.test.js.map +1 -0
- package/dist/network-bind.d.ts +27 -0
- package/dist/network-bind.d.ts.map +1 -0
- package/dist/network-bind.js +75 -0
- package/dist/network-bind.js.map +1 -0
- package/dist/project-mentions.d.ts +32 -0
- package/dist/project-mentions.d.ts.map +1 -0
- package/dist/project-mentions.js +210 -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 +36 -0
- package/dist/project-mentions.test.js.map +1 -0
- package/dist/project-url-key.d.ts +5 -0
- package/dist/project-url-key.d.ts.map +1 -0
- package/dist/project-url-key.js +39 -0
- package/dist/project-url-key.js.map +1 -0
- package/dist/routine-variables.d.ts +21 -0
- package/dist/routine-variables.d.ts.map +1 -0
- package/dist/routine-variables.js +91 -0
- package/dist/routine-variables.js.map +1 -0
- package/dist/routine-variables.test.d.ts +2 -0
- package/dist/routine-variables.test.d.ts.map +1 -0
- package/dist/routine-variables.test.js +58 -0
- package/dist/routine-variables.test.js.map +1 -0
- package/dist/telemetry/client.d.ts +18 -0
- package/dist/telemetry/client.d.ts.map +1 -0
- package/dist/telemetry/client.js +105 -0
- package/dist/telemetry/client.js.map +1 -0
- package/dist/telemetry/config.d.ts +5 -0
- package/dist/telemetry/config.d.ts.map +1 -0
- package/dist/telemetry/config.js +21 -0
- package/dist/telemetry/config.js.map +1 -0
- package/dist/telemetry/events.d.ts +41 -0
- package/dist/telemetry/events.d.ts.map +1 -0
- package/dist/telemetry/events.js +59 -0
- package/dist/telemetry/events.js.map +1 -0
- package/dist/telemetry/index.d.ts +6 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js +5 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/telemetry/state.d.ts +3 -0
- package/dist/telemetry/state.d.ts.map +1 -0
- package/dist/telemetry/state.js +28 -0
- package/dist/telemetry/state.js.map +1 -0
- package/dist/telemetry/types.d.ts +28 -0
- package/dist/telemetry/types.d.ts.map +1 -0
- package/dist/telemetry/types.js +2 -0
- package/dist/telemetry/types.js.map +1 -0
- package/dist/types/access.d.ts +142 -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 +117 -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 +298 -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 +140 -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 +25 -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 +120 -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 +36 -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/environment.d.ts +73 -0
- package/dist/types/environment.d.ts.map +1 -0
- package/dist/types/environment.js +2 -0
- package/dist/types/environment.js.map +1 -0
- package/dist/types/feedback.d.ts +95 -0
- package/dist/types/feedback.d.ts.map +1 -0
- package/dist/types/feedback.js +7 -0
- package/dist/types/feedback.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 +158 -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/inbox-dismissal.d.ts +10 -0
- package/dist/types/inbox-dismissal.d.ts.map +1 -0
- package/dist/types/inbox-dismissal.js +2 -0
- package/dist/types/inbox-dismissal.js.map +1 -0
- package/dist/types/index.d.ts +37 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/instance.d.ts +63 -0
- package/dist/types/instance.d.ts.map +1 -0
- package/dist/types/instance.js +12 -0
- package/dist/types/instance.js.map +1 -0
- package/dist/types/issue-tree-control.d.ts +102 -0
- package/dist/types/issue-tree-control.d.ts.map +1 -0
- package/dist/types/issue-tree-control.js +2 -0
- package/dist/types/issue-tree-control.js.map +1 -0
- package/dist/types/issue.d.ts +527 -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 +686 -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 +82 -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 +185 -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/search.d.ts +50 -0
- package/dist/types/search.d.ts.map +1 -0
- package/dist/types/search.js +2 -0
- package/dist/types/search.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/sidebar-preferences.d.ts +5 -0
- package/dist/types/sidebar-preferences.d.ts.map +1 -0
- package/dist/types/sidebar-preferences.js +2 -0
- package/dist/types/sidebar-preferences.js.map +1 -0
- package/dist/types/user-profile.d.ts +81 -0
- package/dist/types/user-profile.d.ts.map +1 -0
- package/dist/types/user-profile.js +2 -0
- package/dist/types/user-profile.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 +252 -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 +333 -0
- package/dist/validators/access.d.ts.map +1 -0
- package/dist/validators/access.js +132 -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 +841 -0
- package/dist/validators/agent.d.ts.map +1 -0
- package/dist/validators/agent.js +115 -0
- package/dist/validators/agent.js.map +1 -0
- package/dist/validators/approval.d.ts +51 -0
- package/dist/validators/approval.d.ts.map +1 -0
- package/dist/validators/approval.js +22 -0
- package/dist/validators/approval.js.map +1 -0
- package/dist/validators/approval.test.d.ts +2 -0
- package/dist/validators/approval.test.d.ts.map +1 -0
- package/dist/validators/approval.test.js +25 -0
- package/dist/validators/approval.test.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 +3453 -0
- package/dist/validators/company-portability.d.ts.map +1 -0
- package/dist/validators/company-portability.js +231 -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 +91 -0
- package/dist/validators/company.d.ts.map +1 -0
- package/dist/validators/company.js +43 -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/environment.d.ts +72 -0
- package/dist/validators/environment.d.ts.map +1 -0
- package/dist/validators/environment.js +31 -0
- package/dist/validators/environment.js.map +1 -0
- package/dist/validators/execution-workspace.d.ts +586 -0
- package/dist/validators/execution-workspace.d.ts.map +1 -0
- package/dist/validators/execution-workspace.js +120 -0
- package/dist/validators/execution-workspace.js.map +1 -0
- package/dist/validators/feedback.d.ts +26 -0
- package/dist/validators/feedback.d.ts.map +1 -0
- package/dist/validators/feedback.js +14 -0
- package/dist/validators/feedback.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 +26 -0
- package/dist/validators/index.d.ts.map +1 -0
- package/dist/validators/index.js +26 -0
- package/dist/validators/index.js.map +1 -0
- package/dist/validators/instance.d.ts +137 -0
- package/dist/validators/instance.d.ts.map +1 -0
- package/dist/validators/instance.js +41 -0
- package/dist/validators/instance.js.map +1 -0
- package/dist/validators/issue-tree-control.d.ts +100 -0
- package/dist/validators/issue-tree-control.d.ts.map +1 -0
- package/dist/validators/issue-tree-control.js +31 -0
- package/dist/validators/issue-tree-control.js.map +1 -0
- package/dist/validators/issue.d.ts +4292 -0
- package/dist/validators/issue.d.ts.map +1 -0
- package/dist/validators/issue.js +506 -0
- package/dist/validators/issue.js.map +1 -0
- package/dist/validators/issue.test.d.ts +2 -0
- package/dist/validators/issue.test.d.ts.map +1 -0
- package/dist/validators/issue.test.js +203 -0
- package/dist/validators/issue.test.js.map +1 -0
- package/dist/validators/plugin.d.ts +2426 -0
- package/dist/validators/plugin.d.ts.map +1 -0
- package/dist/validators/plugin.js +837 -0
- package/dist/validators/plugin.js.map +1 -0
- package/dist/validators/plugin.test.d.ts +2 -0
- package/dist/validators/plugin.test.d.ts.map +1 -0
- package/dist/validators/plugin.test.js +64 -0
- package/dist/validators/plugin.test.js.map +1 -0
- package/dist/validators/project.d.ts +784 -0
- package/dist/validators/project.d.ts.map +1 -0
- package/dist/validators/project.js +102 -0
- package/dist/validators/project.js.map +1 -0
- package/dist/validators/routine.d.ts +920 -0
- package/dist/validators/routine.d.ts.map +1 -0
- package/dist/validators/routine.js +125 -0
- package/dist/validators/routine.js.map +1 -0
- package/dist/validators/routine.test.d.ts +2 -0
- package/dist/validators/routine.test.d.ts.map +1 -0
- package/dist/validators/routine.test.js +79 -0
- package/dist/validators/routine.test.js.map +1 -0
- package/dist/validators/search.d.ts +24 -0
- package/dist/validators/search.d.ts.map +1 -0
- package/dist/validators/search.js +33 -0
- package/dist/validators/search.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/sidebar-preferences.d.ts +20 -0
- package/dist/validators/sidebar-preferences.d.ts.map +1 -0
- package/dist/validators/sidebar-preferences.js +10 -0
- package/dist/validators/sidebar-preferences.js.map +1 -0
- package/dist/validators/text.d.ts +4 -0
- package/dist/validators/text.d.ts.map +1 -0
- package/dist/validators/text.js +9 -0
- package/dist/validators/text.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/dist/workspace-commands.d.ts +7 -0
- package/dist/workspace-commands.d.ts.map +1 -0
- package/dist/workspace-commands.js +150 -0
- package/dist/workspace-commands.js.map +1 -0
- package/dist/workspace-commands.test.d.ts +2 -0
- package/dist/workspace-commands.test.d.ts.map +1 -0
- package/dist/workspace-commands.test.js +65 -0
- package/dist/workspace-commands.test.js.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,686 @@
|
|
|
1
|
+
import type { PluginStatus, PluginCategory, PluginCapability, PluginUiSlotType, PluginUiSlotEntityType, PluginStateScopeKind, PluginLauncherPlacementZone, PluginLauncherAction, PluginLauncherBounds, PluginLauncherRenderEnvironment, PluginApiRouteAuthMode, PluginApiRouteCheckoutPolicy, PluginApiRouteMethod, PluginDatabaseCoreReadTable, PluginDatabaseMigrationStatus, PluginDatabaseNamespaceMode, PluginDatabaseNamespaceStatus, AgentAdapterType, AgentRole, AgentStatus, IssuePriority, ProjectStatus, RoutineCatchUpPolicy, RoutineConcurrencyPolicy, RoutineStatus, IssueSurfaceVisibility } from "../constants.js";
|
|
2
|
+
import type { Agent } from "./agent.js";
|
|
3
|
+
import type { Project } from "./project.js";
|
|
4
|
+
import type { Routine, RoutineTrigger, RoutineVariable } from "./routine.js";
|
|
5
|
+
/**
|
|
6
|
+
* A JSON Schema object used for plugin config schemas and tool parameter schemas.
|
|
7
|
+
* Plugins provide these as plain JSON Schema compatible objects.
|
|
8
|
+
*/
|
|
9
|
+
export type JsonSchema = Record<string, unknown>;
|
|
10
|
+
export type { PluginDatabaseCoreReadTable, PluginDatabaseMigrationStatus, PluginDatabaseNamespaceMode, PluginDatabaseNamespaceStatus, } from "../constants.js";
|
|
11
|
+
/**
|
|
12
|
+
* Declares a scheduled job a plugin can run.
|
|
13
|
+
*
|
|
14
|
+
* @see PLUGIN_SPEC.md §17 — Scheduled Jobs
|
|
15
|
+
*/
|
|
16
|
+
export interface PluginJobDeclaration {
|
|
17
|
+
/** Stable identifier for this job, unique within the plugin. */
|
|
18
|
+
jobKey: string;
|
|
19
|
+
/** Human-readable name shown in the operator UI. */
|
|
20
|
+
displayName: string;
|
|
21
|
+
/** Optional description of what the job does. */
|
|
22
|
+
description?: string;
|
|
23
|
+
/** Cron expression for the schedule (e.g. "star/15 star star star star" or "0 * * * *"). */
|
|
24
|
+
schedule?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Declares a webhook endpoint the plugin can receive.
|
|
28
|
+
* Route: `POST /api/plugins/:pluginId/webhooks/:endpointKey`
|
|
29
|
+
*
|
|
30
|
+
* @see PLUGIN_SPEC.md §18 — Webhooks
|
|
31
|
+
*/
|
|
32
|
+
export interface PluginWebhookDeclaration {
|
|
33
|
+
/** Stable identifier for this endpoint, unique within the plugin. */
|
|
34
|
+
endpointKey: string;
|
|
35
|
+
/** Human-readable name shown in the operator UI. */
|
|
36
|
+
displayName: string;
|
|
37
|
+
/** Optional description of what this webhook handles. */
|
|
38
|
+
description?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Declares an agent tool contributed by the plugin. Tools are namespaced
|
|
42
|
+
* by plugin ID at runtime (e.g. `linear:search-issues`).
|
|
43
|
+
*
|
|
44
|
+
* Requires the `agent.tools.register` capability.
|
|
45
|
+
*
|
|
46
|
+
* @see PLUGIN_SPEC.md §11 — Agent Tools
|
|
47
|
+
*/
|
|
48
|
+
export interface PluginToolDeclaration {
|
|
49
|
+
/** Tool name, unique within the plugin. Namespaced by plugin ID at runtime. */
|
|
50
|
+
name: string;
|
|
51
|
+
/** Human-readable name shown to agents and in the UI. */
|
|
52
|
+
displayName: string;
|
|
53
|
+
/** Description provided to the agent so it knows when to use this tool. */
|
|
54
|
+
description: string;
|
|
55
|
+
/** JSON Schema describing the tool's input parameters. */
|
|
56
|
+
parametersSchema: JsonSchema;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Declares an environment runtime driver contributed by the plugin.
|
|
60
|
+
*
|
|
61
|
+
* Requires the `environment.drivers.register` capability.
|
|
62
|
+
*/
|
|
63
|
+
export interface PluginEnvironmentDriverDeclaration {
|
|
64
|
+
/** Stable driver key, unique within the plugin. Namespaced by plugin ID at runtime. */
|
|
65
|
+
driverKey: string;
|
|
66
|
+
/**
|
|
67
|
+
* Driver classification.
|
|
68
|
+
*
|
|
69
|
+
* `environment_driver` is used by core `driver: "plugin"` environments.
|
|
70
|
+
* `sandbox_provider` is used by core `driver: "sandbox"` environments whose
|
|
71
|
+
* provider key is implemented by a plugin.
|
|
72
|
+
*/
|
|
73
|
+
kind?: "environment_driver" | "sandbox_provider";
|
|
74
|
+
/** Human-readable name shown in environment configuration UI. */
|
|
75
|
+
displayName: string;
|
|
76
|
+
/** Optional description for operator-facing docs or UI affordances. */
|
|
77
|
+
description?: string;
|
|
78
|
+
/** JSON Schema describing the driver's provider-specific configuration. */
|
|
79
|
+
configSchema: JsonSchema;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Declares a normal Evermore agent that a plugin can provision and later
|
|
83
|
+
* resolve by stable key within each company.
|
|
84
|
+
*/
|
|
85
|
+
export interface PluginManagedAgentDeclaration {
|
|
86
|
+
/** Stable identifier for this managed agent, unique within the plugin. */
|
|
87
|
+
agentKey: string;
|
|
88
|
+
/** Suggested visible agent name. */
|
|
89
|
+
displayName: string;
|
|
90
|
+
/** Optional suggested role. Defaults to `general`. */
|
|
91
|
+
role?: AgentRole | string;
|
|
92
|
+
/** Optional suggested title shown in agent surfaces. */
|
|
93
|
+
title?: string | null;
|
|
94
|
+
/** Optional icon for agent list/detail surfaces. */
|
|
95
|
+
icon?: string | null;
|
|
96
|
+
/** Suggested capability summary for the agent. */
|
|
97
|
+
capabilities?: string | null;
|
|
98
|
+
/** Suggested adapter type. Defaults to `process`. */
|
|
99
|
+
adapterType?: AgentAdapterType | string;
|
|
100
|
+
/**
|
|
101
|
+
* Optional ordered list of compatible adapter types. When present, the host
|
|
102
|
+
* prefers the most-used compatible adapter already configured in the company,
|
|
103
|
+
* falling back to `adapterType`.
|
|
104
|
+
*/
|
|
105
|
+
adapterPreference?: Array<AgentAdapterType | string>;
|
|
106
|
+
/** Suggested adapter configuration. */
|
|
107
|
+
adapterConfig?: Record<string, unknown>;
|
|
108
|
+
/** Suggested Evermore runtime configuration. */
|
|
109
|
+
runtimeConfig?: Record<string, unknown>;
|
|
110
|
+
/** Suggested permissions object. Normalized by the host on create/reset. */
|
|
111
|
+
permissions?: Record<string, unknown>;
|
|
112
|
+
/** Suggested starting status when no board approval is required. */
|
|
113
|
+
status?: Extract<AgentStatus, "idle" | "paused">;
|
|
114
|
+
/** Suggested monthly budget in cents. */
|
|
115
|
+
budgetMonthlyCents?: number;
|
|
116
|
+
/** Optional managed instructions content or pointer metadata for plugin UI. */
|
|
117
|
+
instructions?: {
|
|
118
|
+
entryFile?: string;
|
|
119
|
+
content?: string;
|
|
120
|
+
assetPath?: string;
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Declares a company-scoped local folder a trusted plugin wants the operator
|
|
125
|
+
* to configure. The host treats this as a generic filesystem root: plugin
|
|
126
|
+
* code may request required relative folders/files, then use SDK helpers for
|
|
127
|
+
* path-safe reads and atomic writes under that root.
|
|
128
|
+
*/
|
|
129
|
+
export interface PluginLocalFolderDeclaration {
|
|
130
|
+
/** Stable identifier for this folder, unique within the plugin. */
|
|
131
|
+
folderKey: string;
|
|
132
|
+
/** Human-readable name shown in plugin settings. */
|
|
133
|
+
displayName: string;
|
|
134
|
+
/** Optional operator-facing description. */
|
|
135
|
+
description?: string;
|
|
136
|
+
/** Access level requested by the plugin. Defaults to `readWrite`. */
|
|
137
|
+
access?: "read" | "readWrite";
|
|
138
|
+
/** Relative directories expected to exist under the configured root. */
|
|
139
|
+
requiredDirectories?: string[];
|
|
140
|
+
/** Relative files expected to exist under the configured root. */
|
|
141
|
+
requiredFiles?: string[];
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Declares a normal Evermore project that a plugin can provision and later
|
|
145
|
+
* resolve by stable key within each company.
|
|
146
|
+
*/
|
|
147
|
+
export interface PluginManagedProjectDeclaration {
|
|
148
|
+
/** Stable identifier for this managed project, unique within the plugin. */
|
|
149
|
+
projectKey: string;
|
|
150
|
+
/** Suggested visible project name. */
|
|
151
|
+
displayName: string;
|
|
152
|
+
/** Suggested project description. */
|
|
153
|
+
description?: string | null;
|
|
154
|
+
/** Suggested starting status. Defaults to `in_progress`. */
|
|
155
|
+
status?: ProjectStatus;
|
|
156
|
+
/** Suggested project color. Defaults to the normal project palette. */
|
|
157
|
+
color?: string | null;
|
|
158
|
+
/** Optional plugin-specific defaults retained for reset/reconcile UI. */
|
|
159
|
+
settings?: Record<string, unknown>;
|
|
160
|
+
}
|
|
161
|
+
export type PluginManagedResourceKind = "agent" | "project" | "routine";
|
|
162
|
+
export interface PluginManagedResourceRef {
|
|
163
|
+
pluginKey?: string;
|
|
164
|
+
resourceKind: PluginManagedResourceKind;
|
|
165
|
+
resourceKey: string;
|
|
166
|
+
}
|
|
167
|
+
export interface PluginManagedRoutineDeclaration {
|
|
168
|
+
/** Stable identifier for this managed routine, unique within the plugin. */
|
|
169
|
+
routineKey: string;
|
|
170
|
+
/** Suggested routine title template. */
|
|
171
|
+
title: string;
|
|
172
|
+
/** Suggested routine description template. */
|
|
173
|
+
description?: string | null;
|
|
174
|
+
/** Stable managed agent reference for the default assignee. */
|
|
175
|
+
assigneeRef?: PluginManagedResourceRef | null;
|
|
176
|
+
/** Stable managed project reference for routine-created issues. */
|
|
177
|
+
projectRef?: PluginManagedResourceRef | null;
|
|
178
|
+
/** Optional goal id to set on the routine in this company. */
|
|
179
|
+
goalId?: string | null;
|
|
180
|
+
/** Suggested starting status. Defaults to `paused` when no assignee is resolved, otherwise `active`. */
|
|
181
|
+
status?: RoutineStatus;
|
|
182
|
+
/** Suggested issue priority. Defaults to `medium`. */
|
|
183
|
+
priority?: IssuePriority;
|
|
184
|
+
/** Suggested concurrency behavior. Defaults to core routine default. */
|
|
185
|
+
concurrencyPolicy?: RoutineConcurrencyPolicy;
|
|
186
|
+
/** Suggested missed-trigger behavior. Defaults to core routine default. */
|
|
187
|
+
catchUpPolicy?: RoutineCatchUpPolicy;
|
|
188
|
+
/** Suggested routine variables. */
|
|
189
|
+
variables?: RoutineVariable[];
|
|
190
|
+
/** Suggested triggers created when the routine is first reconciled. */
|
|
191
|
+
triggers?: Array<Pick<RoutineTrigger, "kind" | "label" | "enabled" | "cronExpression" | "timezone" | "signingMode" | "replayWindowSec">>;
|
|
192
|
+
/** Defaults for issues created by this routine. */
|
|
193
|
+
issueTemplate?: {
|
|
194
|
+
surfaceVisibility?: IssueSurfaceVisibility;
|
|
195
|
+
originId?: string | null;
|
|
196
|
+
billingCode?: string | null;
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
export interface PluginManagedAgentResolution {
|
|
200
|
+
pluginKey: string;
|
|
201
|
+
resourceKind: "agent";
|
|
202
|
+
resourceKey: string;
|
|
203
|
+
companyId: string;
|
|
204
|
+
agentId: string | null;
|
|
205
|
+
agent: Agent | null;
|
|
206
|
+
status: "missing" | "resolved" | "created" | "relinked" | "reset";
|
|
207
|
+
approvalId?: string | null;
|
|
208
|
+
}
|
|
209
|
+
export interface PluginManagedProjectResolution {
|
|
210
|
+
pluginKey: string;
|
|
211
|
+
resourceKind: "project";
|
|
212
|
+
resourceKey: string;
|
|
213
|
+
companyId: string;
|
|
214
|
+
projectId: string | null;
|
|
215
|
+
project: Project | null;
|
|
216
|
+
status: "missing" | "resolved" | "created" | "relinked" | "reset";
|
|
217
|
+
}
|
|
218
|
+
export interface PluginManagedRoutineResolution {
|
|
219
|
+
pluginKey: string;
|
|
220
|
+
resourceKind: "routine";
|
|
221
|
+
resourceKey: string;
|
|
222
|
+
companyId: string;
|
|
223
|
+
routineId: string | null;
|
|
224
|
+
routine: Routine | null;
|
|
225
|
+
status: "missing" | "missing_refs" | "resolved" | "created" | "relinked" | "reset";
|
|
226
|
+
missingRefs?: PluginManagedResourceRef[];
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Declares a UI extension slot the plugin fills with a React component.
|
|
230
|
+
*
|
|
231
|
+
* @see PLUGIN_SPEC.md §19 — UI Extension Model
|
|
232
|
+
*/
|
|
233
|
+
export interface PluginUiSlotDeclaration {
|
|
234
|
+
/** The type of UI mount point (page, detailTab, taskDetailView, toolbarButton, etc.). */
|
|
235
|
+
type: PluginUiSlotType;
|
|
236
|
+
/** Unique slot identifier within the plugin. */
|
|
237
|
+
id: string;
|
|
238
|
+
/** Human-readable name shown in navigation or tab labels. */
|
|
239
|
+
displayName: string;
|
|
240
|
+
/** Which export name in the UI bundle provides this component. */
|
|
241
|
+
exportName: string;
|
|
242
|
+
/**
|
|
243
|
+
* Entity targets for context-sensitive slots.
|
|
244
|
+
* Required for `detailTab`, `taskDetailView`, and `contextMenuItem`.
|
|
245
|
+
*/
|
|
246
|
+
entityTypes?: PluginUiSlotEntityType[];
|
|
247
|
+
/**
|
|
248
|
+
* Optional company-scoped route segment for page and routeSidebar slots.
|
|
249
|
+
* Example: `kitchensink` becomes `/:companyPrefix/kitchensink`.
|
|
250
|
+
*/
|
|
251
|
+
routePath?: string;
|
|
252
|
+
/**
|
|
253
|
+
* Optional ordering hint within a slot surface. Lower numbers appear first.
|
|
254
|
+
* Defaults to host-defined ordering if omitted.
|
|
255
|
+
*/
|
|
256
|
+
order?: number;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Describes the action triggered by a plugin launcher surface.
|
|
260
|
+
*/
|
|
261
|
+
export interface PluginLauncherActionDeclaration {
|
|
262
|
+
/** What kind of launch behavior the host should perform. */
|
|
263
|
+
type: PluginLauncherAction;
|
|
264
|
+
/**
|
|
265
|
+
* Stable target identifier or URL. The meaning depends on `type`
|
|
266
|
+
* (for example a route, tab key, action key, or external URL).
|
|
267
|
+
*/
|
|
268
|
+
target: string;
|
|
269
|
+
/** Optional arbitrary parameters passed along to the target. */
|
|
270
|
+
params?: Record<string, unknown>;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Optional render metadata for the destination opened by a launcher.
|
|
274
|
+
*/
|
|
275
|
+
export interface PluginLauncherRenderDeclaration {
|
|
276
|
+
/** High-level container the launcher expects the host to use. */
|
|
277
|
+
environment: PluginLauncherRenderEnvironment;
|
|
278
|
+
/** Optional size hint for the destination surface. */
|
|
279
|
+
bounds?: PluginLauncherBounds;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Serializable runtime snapshot of the host launcher/container environment.
|
|
283
|
+
*/
|
|
284
|
+
export interface PluginLauncherRenderContextSnapshot {
|
|
285
|
+
/** The current launcher/container environment selected by the host. */
|
|
286
|
+
environment: PluginLauncherRenderEnvironment | null;
|
|
287
|
+
/** Launcher id that opened this surface, if any. */
|
|
288
|
+
launcherId: string | null;
|
|
289
|
+
/** Current host-applied bounds hint for the environment, if any. */
|
|
290
|
+
bounds: PluginLauncherBounds | null;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Declares a plugin launcher surface independent of the low-level slot
|
|
294
|
+
* implementation that mounts it.
|
|
295
|
+
*/
|
|
296
|
+
export interface PluginLauncherDeclaration {
|
|
297
|
+
/** Stable identifier for this launcher, unique within the plugin. */
|
|
298
|
+
id: string;
|
|
299
|
+
/** Human-readable label shown for the launcher. */
|
|
300
|
+
displayName: string;
|
|
301
|
+
/** Optional description for operator-facing docs or future UI affordances. */
|
|
302
|
+
description?: string;
|
|
303
|
+
/** Where in the host UI this launcher should be placed. */
|
|
304
|
+
placementZone: PluginLauncherPlacementZone;
|
|
305
|
+
/** Optional export name in the UI bundle when the launcher has custom UI. */
|
|
306
|
+
exportName?: string;
|
|
307
|
+
/**
|
|
308
|
+
* Optional entity targeting for context-sensitive launcher zones.
|
|
309
|
+
* Reuses the same entity union as UI slots for consistency.
|
|
310
|
+
*/
|
|
311
|
+
entityTypes?: PluginUiSlotEntityType[];
|
|
312
|
+
/** Optional ordering hint within the placement zone. */
|
|
313
|
+
order?: number;
|
|
314
|
+
/** What should happen when the launcher is activated. */
|
|
315
|
+
action: PluginLauncherActionDeclaration;
|
|
316
|
+
/** Optional render/container hints for the launched destination. */
|
|
317
|
+
render?: PluginLauncherRenderDeclaration;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Lower-bound semver requirement for the Evermore host.
|
|
321
|
+
*
|
|
322
|
+
* The host should reject installation when its running version is lower than
|
|
323
|
+
* the declared minimum.
|
|
324
|
+
*/
|
|
325
|
+
export type PluginMinimumHostVersion = string;
|
|
326
|
+
/**
|
|
327
|
+
* Groups plugin UI declarations that are served from the shared UI bundle
|
|
328
|
+
* root declared in `entrypoints.ui`.
|
|
329
|
+
*/
|
|
330
|
+
export interface PluginUiDeclaration {
|
|
331
|
+
/** UI extension slots this plugin fills. */
|
|
332
|
+
slots?: PluginUiSlotDeclaration[];
|
|
333
|
+
/** Declarative launcher metadata for host-mounted plugin entry points. */
|
|
334
|
+
launchers?: PluginLauncherDeclaration[];
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Declares restricted database access for trusted orchestration plugins.
|
|
338
|
+
*
|
|
339
|
+
* The host derives the final namespace from the plugin key and optional slug,
|
|
340
|
+
* applies SQL migrations before worker startup, and gates runtime SQL through
|
|
341
|
+
* the `database.namespace.*` capabilities.
|
|
342
|
+
*/
|
|
343
|
+
export interface PluginDatabaseDeclaration {
|
|
344
|
+
/** Optional stable human-readable slug included in the host-derived namespace. */
|
|
345
|
+
namespaceSlug?: string;
|
|
346
|
+
/** SQL migration directory relative to the plugin package root. */
|
|
347
|
+
migrationsDir: string;
|
|
348
|
+
/** Public core tables this plugin may read or join at runtime. */
|
|
349
|
+
coreReadTables?: PluginDatabaseCoreReadTable[];
|
|
350
|
+
}
|
|
351
|
+
export type PluginApiRouteCompanyResolution = {
|
|
352
|
+
from: "body";
|
|
353
|
+
key: string;
|
|
354
|
+
} | {
|
|
355
|
+
from: "query";
|
|
356
|
+
key: string;
|
|
357
|
+
} | {
|
|
358
|
+
from: "issue";
|
|
359
|
+
param: string;
|
|
360
|
+
};
|
|
361
|
+
export interface PluginApiRouteDeclaration {
|
|
362
|
+
/** Stable plugin-defined route key passed to the worker. */
|
|
363
|
+
routeKey: string;
|
|
364
|
+
/** HTTP method accepted by this route. */
|
|
365
|
+
method: PluginApiRouteMethod;
|
|
366
|
+
/** Plugin-local path under `/api/plugins/:pluginId/api`, e.g. `/issues/:issueId/smoke`. */
|
|
367
|
+
path: string;
|
|
368
|
+
/** Actor class allowed to call the route. */
|
|
369
|
+
auth: PluginApiRouteAuthMode;
|
|
370
|
+
/** Capability required to expose the route. Currently `api.routes.register`. */
|
|
371
|
+
capability: "api.routes.register";
|
|
372
|
+
/** Optional checkout policy enforced by the host before worker dispatch. */
|
|
373
|
+
checkoutPolicy?: PluginApiRouteCheckoutPolicy;
|
|
374
|
+
/** How the host resolves company access for this route. */
|
|
375
|
+
companyResolution?: PluginApiRouteCompanyResolution;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* The manifest shape every plugin package must export.
|
|
379
|
+
* See PLUGIN_SPEC.md §10.1 for the normative definition.
|
|
380
|
+
*/
|
|
381
|
+
export interface EvermorePluginManifestV1 {
|
|
382
|
+
/** Globally unique plugin identifier (e.g. `"acme.linear-sync"`). Must be lowercase alphanumeric with dots, hyphens, or underscores. */
|
|
383
|
+
id: string;
|
|
384
|
+
/** Plugin API version. Must be `1` for the current spec. */
|
|
385
|
+
apiVersion: 1;
|
|
386
|
+
/** Semver version of the plugin package (e.g. `"1.2.0"`). */
|
|
387
|
+
version: string;
|
|
388
|
+
/** Human-readable name (max 100 chars). */
|
|
389
|
+
displayName: string;
|
|
390
|
+
/** Short description (max 500 chars). */
|
|
391
|
+
description: string;
|
|
392
|
+
/** Author name (max 200 chars). May include email in angle brackets, e.g. `"Jane Doe <jane@example.com>"`. */
|
|
393
|
+
author: string;
|
|
394
|
+
/** One or more categories classifying this plugin. */
|
|
395
|
+
categories: PluginCategory[];
|
|
396
|
+
/**
|
|
397
|
+
* Minimum host version required (semver lower bound).
|
|
398
|
+
* Preferred generic field for new manifests.
|
|
399
|
+
*/
|
|
400
|
+
minimumHostVersion?: PluginMinimumHostVersion;
|
|
401
|
+
/**
|
|
402
|
+
* Legacy alias for `minimumHostVersion`.
|
|
403
|
+
* Kept for backwards compatibility with existing manifests and docs.
|
|
404
|
+
*/
|
|
405
|
+
minimumEvermoreVersion?: PluginMinimumHostVersion;
|
|
406
|
+
/** Capabilities this plugin requires from the host. Enforced at runtime. */
|
|
407
|
+
capabilities: PluginCapability[];
|
|
408
|
+
/** Entrypoint paths relative to the package root. */
|
|
409
|
+
entrypoints: {
|
|
410
|
+
/** Path to the worker entrypoint (required). */
|
|
411
|
+
worker: string;
|
|
412
|
+
/** Path to the UI bundle directory (required when `ui.slots` is declared). */
|
|
413
|
+
ui?: string;
|
|
414
|
+
};
|
|
415
|
+
/** JSON Schema for operator-editable instance configuration. */
|
|
416
|
+
instanceConfigSchema?: JsonSchema;
|
|
417
|
+
/** Scheduled jobs this plugin declares. Requires `jobs.schedule` capability. */
|
|
418
|
+
jobs?: PluginJobDeclaration[];
|
|
419
|
+
/** Webhook endpoints this plugin declares. Requires `webhooks.receive` capability. */
|
|
420
|
+
webhooks?: PluginWebhookDeclaration[];
|
|
421
|
+
/** Agent tools this plugin contributes. Requires `agent.tools.register` capability. */
|
|
422
|
+
tools?: PluginToolDeclaration[];
|
|
423
|
+
/** Restricted plugin-owned database namespace declaration. */
|
|
424
|
+
database?: PluginDatabaseDeclaration;
|
|
425
|
+
/** Scoped JSON API routes mounted under `/api/plugins/:pluginId/api/*`. */
|
|
426
|
+
apiRoutes?: PluginApiRouteDeclaration[];
|
|
427
|
+
/** Environment drivers this plugin contributes. Requires `environment.drivers.register` capability. */
|
|
428
|
+
environmentDrivers?: PluginEnvironmentDriverDeclaration[];
|
|
429
|
+
/** Suggested company-scoped agents this plugin can provision and resolve by stable key. */
|
|
430
|
+
agents?: PluginManagedAgentDeclaration[];
|
|
431
|
+
/** Suggested company-scoped projects this plugin can provision and resolve by stable key. */
|
|
432
|
+
projects?: PluginManagedProjectDeclaration[];
|
|
433
|
+
/** Suggested company-scoped routines this plugin can provision and resolve by stable key. */
|
|
434
|
+
routines?: PluginManagedRoutineDeclaration[];
|
|
435
|
+
/** Trusted local folders this plugin can configure and access by stable key. */
|
|
436
|
+
localFolders?: PluginLocalFolderDeclaration[];
|
|
437
|
+
/**
|
|
438
|
+
* Legacy top-level launcher declarations.
|
|
439
|
+
* Prefer `ui.launchers` for new manifests.
|
|
440
|
+
*/
|
|
441
|
+
launchers?: PluginLauncherDeclaration[];
|
|
442
|
+
/** UI bundle declarations. Requires `entrypoints.ui` when populated. */
|
|
443
|
+
ui?: PluginUiDeclaration;
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Domain type for an installed plugin as persisted in the `plugins` table.
|
|
447
|
+
* See PLUGIN_SPEC.md §21.3 for the schema definition.
|
|
448
|
+
*/
|
|
449
|
+
export interface PluginRecord {
|
|
450
|
+
/** UUID primary key. */
|
|
451
|
+
id: string;
|
|
452
|
+
/** Unique key derived from `manifest.id`. Used for lookups. */
|
|
453
|
+
pluginKey: string;
|
|
454
|
+
/** npm package name (e.g. `"@acme/plugin-linear"`). */
|
|
455
|
+
packageName: string;
|
|
456
|
+
/** Installed semver version. */
|
|
457
|
+
version: string;
|
|
458
|
+
/** Plugin API version from the manifest. */
|
|
459
|
+
apiVersion: number;
|
|
460
|
+
/** Plugin categories from the manifest. */
|
|
461
|
+
categories: PluginCategory[];
|
|
462
|
+
/** Full manifest snapshot persisted at install/upgrade time. */
|
|
463
|
+
manifestJson: EvermorePluginManifestV1;
|
|
464
|
+
/** Current lifecycle status. */
|
|
465
|
+
status: PluginStatus;
|
|
466
|
+
/** Deterministic load order (null if not yet assigned). */
|
|
467
|
+
installOrder: number | null;
|
|
468
|
+
/** Resolved package path for local-path installs; used to find worker entrypoint. */
|
|
469
|
+
packagePath: string | null;
|
|
470
|
+
/** Most recent error message, or operator-provided disable reason. */
|
|
471
|
+
lastError: string | null;
|
|
472
|
+
/** Timestamp when the plugin was first installed. */
|
|
473
|
+
installedAt: Date;
|
|
474
|
+
/** Timestamp of the most recent status or metadata change. */
|
|
475
|
+
updatedAt: Date;
|
|
476
|
+
}
|
|
477
|
+
export interface PluginDatabaseNamespaceRecord {
|
|
478
|
+
id: string;
|
|
479
|
+
pluginId: string;
|
|
480
|
+
pluginKey: string;
|
|
481
|
+
namespaceName: string;
|
|
482
|
+
namespaceMode: PluginDatabaseNamespaceMode;
|
|
483
|
+
status: PluginDatabaseNamespaceStatus;
|
|
484
|
+
createdAt: Date;
|
|
485
|
+
updatedAt: Date;
|
|
486
|
+
}
|
|
487
|
+
export interface PluginMigrationRecord {
|
|
488
|
+
id: string;
|
|
489
|
+
pluginId: string;
|
|
490
|
+
pluginKey: string;
|
|
491
|
+
namespaceName: string;
|
|
492
|
+
migrationKey: string;
|
|
493
|
+
checksum: string;
|
|
494
|
+
pluginVersion: string;
|
|
495
|
+
status: PluginDatabaseMigrationStatus;
|
|
496
|
+
startedAt: Date;
|
|
497
|
+
appliedAt: Date | null;
|
|
498
|
+
errorMessage: string | null;
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Domain type for a single scoped key-value entry in the `plugin_state` table.
|
|
502
|
+
* Plugins read and write these entries through `ctx.state` in the SDK.
|
|
503
|
+
*
|
|
504
|
+
* The five-part composite key `(pluginId, scopeKind, scopeId, namespace, stateKey)`
|
|
505
|
+
* uniquely identifies a state entry.
|
|
506
|
+
*
|
|
507
|
+
* @see PLUGIN_SPEC.md §21.3 — `plugin_state`
|
|
508
|
+
*/
|
|
509
|
+
export interface PluginStateRecord {
|
|
510
|
+
/** UUID primary key. */
|
|
511
|
+
id: string;
|
|
512
|
+
/** FK to `plugins.id`. */
|
|
513
|
+
pluginId: string;
|
|
514
|
+
/** Granularity of the scope. */
|
|
515
|
+
scopeKind: PluginStateScopeKind;
|
|
516
|
+
/**
|
|
517
|
+
* UUID or text identifier for the scoped object.
|
|
518
|
+
* `null` for `instance` scope (no associated entity).
|
|
519
|
+
*/
|
|
520
|
+
scopeId: string | null;
|
|
521
|
+
/**
|
|
522
|
+
* Sub-namespace within the scope to avoid key collisions.
|
|
523
|
+
* Defaults to `"default"` if not explicitly set by the plugin.
|
|
524
|
+
*/
|
|
525
|
+
namespace: string;
|
|
526
|
+
/** The key for this state entry within the namespace. */
|
|
527
|
+
stateKey: string;
|
|
528
|
+
/** Stored JSON value. May be any JSON-serializable type. */
|
|
529
|
+
valueJson: unknown;
|
|
530
|
+
/** Timestamp of the most recent write. */
|
|
531
|
+
updatedAt: Date;
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* Domain type for a plugin's instance configuration as persisted in the
|
|
535
|
+
* `plugin_config` table.
|
|
536
|
+
* See PLUGIN_SPEC.md §21.3 for the schema definition.
|
|
537
|
+
*/
|
|
538
|
+
export interface PluginConfig {
|
|
539
|
+
/** UUID primary key. */
|
|
540
|
+
id: string;
|
|
541
|
+
/** FK to `plugins.id`. Unique — each plugin has at most one config row. */
|
|
542
|
+
pluginId: string;
|
|
543
|
+
/** Operator-provided configuration values (validated against `instanceConfigSchema`). */
|
|
544
|
+
configJson: Record<string, unknown>;
|
|
545
|
+
/** Most recent config validation error, if any. */
|
|
546
|
+
lastError: string | null;
|
|
547
|
+
/** Timestamp when the config row was created. */
|
|
548
|
+
createdAt: Date;
|
|
549
|
+
/** Timestamp of the most recent config update. */
|
|
550
|
+
updatedAt: Date;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Company-scoped plugin settings row. This is intentionally generic; plugin
|
|
554
|
+
* features such as local folders live inside `settingsJson` under namespaced
|
|
555
|
+
* keys instead of requiring feature-specific database columns.
|
|
556
|
+
*/
|
|
557
|
+
export interface PluginCompanySettings {
|
|
558
|
+
id: string;
|
|
559
|
+
companyId: string;
|
|
560
|
+
pluginId: string;
|
|
561
|
+
enabled: boolean;
|
|
562
|
+
settingsJson: Record<string, unknown>;
|
|
563
|
+
lastError: string | null;
|
|
564
|
+
createdAt: Date;
|
|
565
|
+
updatedAt: Date;
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Query filter for `ctx.entities.list`.
|
|
569
|
+
*/
|
|
570
|
+
export interface PluginEntityQuery {
|
|
571
|
+
/** Optional filter by entity type (e.g. 'project', 'issue'). */
|
|
572
|
+
entityType?: string;
|
|
573
|
+
/** Optional filter by external system identifier. */
|
|
574
|
+
externalId?: string;
|
|
575
|
+
/** Maximum number of records to return. Defaults to 100. */
|
|
576
|
+
limit?: number;
|
|
577
|
+
/** Number of records to skip. Defaults to 0. */
|
|
578
|
+
offset?: number;
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Domain type for an external entity mapping as persisted in the `plugin_entities` table.
|
|
582
|
+
*/
|
|
583
|
+
export interface PluginEntityRecord {
|
|
584
|
+
/** UUID primary key. */
|
|
585
|
+
id: string;
|
|
586
|
+
/** FK to `plugins.id`. */
|
|
587
|
+
pluginId: string;
|
|
588
|
+
/** Plugin-defined entity type. */
|
|
589
|
+
entityType: string;
|
|
590
|
+
/** Scope where this entity lives. */
|
|
591
|
+
scopeKind: PluginStateScopeKind;
|
|
592
|
+
/** UUID or text identifier for the scoped object. */
|
|
593
|
+
scopeId: string | null;
|
|
594
|
+
/** External identifier in the remote system. */
|
|
595
|
+
externalId: string | null;
|
|
596
|
+
/** Human-readable title. */
|
|
597
|
+
title: string | null;
|
|
598
|
+
/** Optional status string. */
|
|
599
|
+
status: string | null;
|
|
600
|
+
/** Full entity data blob. */
|
|
601
|
+
data: Record<string, unknown>;
|
|
602
|
+
/** ISO 8601 creation timestamp. */
|
|
603
|
+
createdAt: Date;
|
|
604
|
+
/** ISO 8601 last-updated timestamp. */
|
|
605
|
+
updatedAt: Date;
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* Domain type for a registered plugin job as persisted in the `plugin_jobs` table.
|
|
609
|
+
*/
|
|
610
|
+
export interface PluginJobRecord {
|
|
611
|
+
/** UUID primary key. */
|
|
612
|
+
id: string;
|
|
613
|
+
/** FK to `plugins.id`. */
|
|
614
|
+
pluginId: string;
|
|
615
|
+
/** Job key matching the manifest declaration. */
|
|
616
|
+
jobKey: string;
|
|
617
|
+
/** Cron expression for the schedule. */
|
|
618
|
+
schedule: string;
|
|
619
|
+
/** Current job status. */
|
|
620
|
+
status: "active" | "paused" | "failed";
|
|
621
|
+
/** Last time the job was executed. */
|
|
622
|
+
lastRunAt: Date | null;
|
|
623
|
+
/** Next scheduled execution time. */
|
|
624
|
+
nextRunAt: Date | null;
|
|
625
|
+
/** ISO 8601 creation timestamp. */
|
|
626
|
+
createdAt: Date;
|
|
627
|
+
/** ISO 8601 last-updated timestamp. */
|
|
628
|
+
updatedAt: Date;
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* Domain type for a job execution history record.
|
|
632
|
+
*/
|
|
633
|
+
export interface PluginJobRunRecord {
|
|
634
|
+
/** UUID primary key. */
|
|
635
|
+
id: string;
|
|
636
|
+
/** FK to `plugin_jobs.id`. */
|
|
637
|
+
jobId: string;
|
|
638
|
+
/** FK to `plugins.id`. */
|
|
639
|
+
pluginId: string;
|
|
640
|
+
/** What triggered this run. */
|
|
641
|
+
trigger: "schedule" | "manual" | "retry";
|
|
642
|
+
/** Current run status. */
|
|
643
|
+
status: "pending" | "queued" | "running" | "succeeded" | "failed" | "cancelled";
|
|
644
|
+
/** Run duration in milliseconds. */
|
|
645
|
+
durationMs: number | null;
|
|
646
|
+
/** Error message if the run failed. */
|
|
647
|
+
error: string | null;
|
|
648
|
+
/** Run logs. */
|
|
649
|
+
logs: string[];
|
|
650
|
+
/** ISO 8601 start timestamp. */
|
|
651
|
+
startedAt: Date | null;
|
|
652
|
+
/** ISO 8601 finish timestamp. */
|
|
653
|
+
finishedAt: Date | null;
|
|
654
|
+
/** ISO 8601 creation timestamp. */
|
|
655
|
+
createdAt: Date;
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* Domain type for an inbound webhook delivery record.
|
|
659
|
+
*/
|
|
660
|
+
export interface PluginWebhookDeliveryRecord {
|
|
661
|
+
/** UUID primary key. */
|
|
662
|
+
id: string;
|
|
663
|
+
/** FK to `plugins.id`. */
|
|
664
|
+
pluginId: string;
|
|
665
|
+
/** Webhook endpoint key matching the manifest. */
|
|
666
|
+
webhookKey: string;
|
|
667
|
+
/** External identifier from the remote system. */
|
|
668
|
+
externalId: string | null;
|
|
669
|
+
/** Delivery status. */
|
|
670
|
+
status: "pending" | "success" | "failed";
|
|
671
|
+
/** Processing duration in milliseconds. */
|
|
672
|
+
durationMs: number | null;
|
|
673
|
+
/** Error message if processing failed. */
|
|
674
|
+
error: string | null;
|
|
675
|
+
/** Webhook payload. */
|
|
676
|
+
payload: Record<string, unknown>;
|
|
677
|
+
/** Webhook headers. */
|
|
678
|
+
headers: Record<string, string>;
|
|
679
|
+
/** ISO 8601 start timestamp. */
|
|
680
|
+
startedAt: Date | null;
|
|
681
|
+
/** ISO 8601 finish timestamp. */
|
|
682
|
+
finishedAt: Date | null;
|
|
683
|
+
/** ISO 8601 creation timestamp. */
|
|
684
|
+
createdAt: Date;
|
|
685
|
+
}
|
|
686
|
+
//# sourceMappingURL=plugin.d.ts.map
|