Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b0e3be3
feat: add resource-scoped jobs plugin for Databricks Lakeflow Jobs
keugenek Apr 2, 2026
e4187f7
chore: sync jobs plugin into template manifest
atilafassina Apr 9, 2026
81774a7
feat(jobs): add interceptor defaults, param mapping, and task type co…
atilafassina Apr 9, 2026
c259906
feat(appkit): wrap jobs plugin in interceptors, add validation and st…
atilafassina Apr 9, 2026
1c19cf2
feat(appkit): add HTTP routes for jobs plugin
atilafassina Apr 9, 2026
26bdb16
fix(jobs): address multi-model review findings
atilafassina Apr 9, 2026
4dbb3a2
fix(appkit): eagerly capture user context in jobs createJobAPI
atilafassina Apr 9, 2026
4a25b49
fix(jobs): align plugin with SDK patterns and grill findings
atilafassina Apr 10, 2026
bf4061a
chore: add DELETE, body validation, and tests
atilafassina Apr 10, 2026
de55c64
fix(jobs): clamp listRuns limit, reject negative runId, validate para…
atilafassina Apr 10, 2026
5606464
feat: add resource-scoped jobs plugin for Databricks Lakeflow Jobs
keugenek Apr 2, 2026
abbfc21
chore: sync jobs plugin into template manifest
atilafassina Apr 9, 2026
b11362c
feat(jobs): add interceptor defaults, param mapping, and task type co…
atilafassina Apr 9, 2026
fa09cc5
feat(appkit): wrap jobs plugin in interceptors, add validation and st…
atilafassina Apr 9, 2026
aa36511
feat(appkit): add HTTP routes for jobs plugin
atilafassina Apr 9, 2026
4e5b6ab
fix(jobs): address multi-model review findings
atilafassina Apr 9, 2026
8a7cf72
fix(appkit): eagerly capture user context in jobs createJobAPI
atilafassina Apr 9, 2026
cee18a1
fix(jobs): align plugin with SDK patterns and grill findings
atilafassina Apr 10, 2026
e344559
chore: add DELETE, body validation, and tests
atilafassina Apr 10, 2026
fbe0dac
fix(jobs): clamp listRuns limit, reject negative runId, validate para…
atilafassina Apr 10, 2026
c122102
chore: regen docs
atilafassina Apr 10, 2026
24b9074
Merge remote-tracking branch 'origin/main' into keugenek/ekniazev/job…
atilafassina Apr 10, 2026
1b40c9a
fix: narrow ExecutionResult in jobs plugin to handle error branch
atilafassina Apr 10, 2026
bc095e5
fix: narrow ExecutionResult in jobs plugin to handle error branch
atilafassina Apr 10, 2026
0f3defb
chore: stop swallowing errors
atilafassina Apr 10, 2026
b2404b2
fix: abort stream generator when last client disconnects
atilafassina Apr 10, 2026
c5dad3e
chore: fix timeout usage
atilafassina Apr 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/docs/api/appkit/Interface.BasePluginConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Base configuration interface for AppKit plugins

## Extended by

- [`IJobsConfig`](Interface.IJobsConfig.md)

## Indexable

```ts
Expand Down
79 changes: 79 additions & 0 deletions docs/docs/api/appkit/Interface.IJobsConfig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Interface: IJobsConfig

Configuration for the Jobs plugin.

## Extends

- [`BasePluginConfig`](Interface.BasePluginConfig.md)

## Indexable

```ts
[key: string]: unknown
```

## Properties

### host?

```ts
optional host: string;
```

#### Inherited from

[`BasePluginConfig`](Interface.BasePluginConfig.md).[`host`](Interface.BasePluginConfig.md#host)

***

### jobs?

```ts
optional jobs: Record<string, JobConfig>;
```

Named jobs to expose. Each key becomes a job accessor.

***

### name?

```ts
optional name: string;
```

#### Inherited from

[`BasePluginConfig`](Interface.BasePluginConfig.md).[`name`](Interface.BasePluginConfig.md#name)

***

### pollIntervalMs?

```ts
optional pollIntervalMs: number;
```

Poll interval for waitForRun in milliseconds. Defaults to 5000.

***

### telemetry?

```ts
optional telemetry: TelemetryOptions;
```

#### Inherited from

[`BasePluginConfig`](Interface.BasePluginConfig.md).[`telemetry`](Interface.BasePluginConfig.md#telemetry)

***

### timeout?

```ts
optional timeout: number;
```

Operation timeout in milliseconds. Defaults to 60000.
155 changes: 155 additions & 0 deletions docs/docs/api/appkit/Interface.JobAPI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# Interface: JobAPI

User-facing API for a single configured job.

## Methods

### cancelRun()

```ts
cancelRun(runId: number): Promise<ExecutionResult<void>>;
```

Cancel a specific run.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `runId` | `number` |

#### Returns

`Promise`\<[`ExecutionResult`](TypeAlias.ExecutionResult.md)\<`void`\>\>

***

### getJob()

```ts
getJob(): Promise<ExecutionResult<Job>>;
```

Get the job definition.

#### Returns

`Promise`\<[`ExecutionResult`](TypeAlias.ExecutionResult.md)\<`Job`\>\>

***

### getRun()

```ts
getRun(runId: number): Promise<ExecutionResult<Run>>;
```

Get a specific run by ID.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `runId` | `number` |

#### Returns

`Promise`\<[`ExecutionResult`](TypeAlias.ExecutionResult.md)\<`Run`\>\>

***

### getRunOutput()

```ts
getRunOutput(runId: number): Promise<ExecutionResult<RunOutput>>;
```

Get output of a specific run.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `runId` | `number` |

#### Returns

`Promise`\<[`ExecutionResult`](TypeAlias.ExecutionResult.md)\<`RunOutput`\>\>

***

### lastRun()

```ts
lastRun(): Promise<ExecutionResult<BaseRun | undefined>>;
```

Get the most recent run for this job.

#### Returns

`Promise`\<[`ExecutionResult`](TypeAlias.ExecutionResult.md)\<`BaseRun` \| `undefined`\>\>

***

### listRuns()

```ts
listRuns(options?: {
limit?: number;
}): Promise<ExecutionResult<BaseRun[]>>;
```

List runs for this job.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `options?` | \{ `limit?`: `number`; \} |
| `options.limit?` | `number` |

#### Returns

`Promise`\<[`ExecutionResult`](TypeAlias.ExecutionResult.md)\<`BaseRun`[]\>\>

***

### runAndWait()

```ts
runAndWait(params?: Record<string, unknown>, signal?: AbortSignal): AsyncGenerator<JobRunStatus, void, unknown>;
```

Trigger and poll until completion, yielding status updates.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `params?` | `Record`\<`string`, `unknown`\> |
| `signal?` | `AbortSignal` |

#### Returns

`AsyncGenerator`\<`JobRunStatus`, `void`, `unknown`\>

***

### runNow()

```ts
runNow(params?: Record<string, unknown>): Promise<ExecutionResult<RunNowResponse>>;
```

Trigger the configured job with validated params. Returns the run response.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `params?` | `Record`\<`string`, `unknown`\> |

#### Returns

`Promise`\<[`ExecutionResult`](TypeAlias.ExecutionResult.md)\<`RunNowResponse`\>\>
33 changes: 33 additions & 0 deletions docs/docs/api/appkit/Interface.JobConfig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Interface: JobConfig

Per-job configuration options.

## Properties

### params?

```ts
optional params: ZodType<Record<string, unknown>, unknown, $ZodTypeInternals<Record<string, unknown>, unknown>>;
```

Optional Zod schema for validating job parameters at runtime.

***

### taskType?

```ts
optional taskType: TaskType;
```

The type of task this job runs. Determines how params are mapped to the SDK request.

***

### waitTimeout?

```ts
optional waitTimeout: number;
```

Maximum time (ms) to poll in runAndWait before giving up. Defaults to 600 000 (10 min).
9 changes: 9 additions & 0 deletions docs/docs/api/appkit/Interface.JobsConnectorConfig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Interface: JobsConnectorConfig

## Properties

### telemetry?

```ts
optional telemetry: TelemetryOptions;
```
28 changes: 28 additions & 0 deletions docs/docs/api/appkit/TypeAlias.JobHandle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Type Alias: JobHandle

```ts
type JobHandle = JobAPI & {
asUser: (req: IAppRequest) => JobAPI;
};
```

Job handle returned by `appkit.jobs("etl")`.
Supports OBO access via `.asUser(req)`.

## Type Declaration

### asUser()

```ts
asUser: (req: IAppRequest) => JobAPI;
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `req` | `IAppRequest` |

#### Returns

[`JobAPI`](Interface.JobAPI.md)
33 changes: 33 additions & 0 deletions docs/docs/api/appkit/TypeAlias.JobsExport.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Type Alias: JobsExport()

```ts
type JobsExport = (jobKey: string) => JobHandle;
```

Public API shape of the jobs plugin.
Callable to select a job by key.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `jobKey` | `string` |

## Returns

[`JobHandle`](TypeAlias.JobHandle.md)

## Example

```ts
// Trigger a configured job
const { run_id } = await appkit.jobs("etl").runNow();

// Trigger and poll until completion
for await (const status of appkit.jobs("etl").runAndWait()) {
console.log(status.status, status.run);
}

// OBO access
await appkit.jobs("etl").asUser(req).runNow();
```
6 changes: 6 additions & 0 deletions docs/docs/api/appkit/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ plugin architecture, and React integration.
| [DatabaseCredential](Interface.DatabaseCredential.md) | Database credentials with OAuth token for Postgres connection |
| [EndpointConfig](Interface.EndpointConfig.md) | - |
| [GenerateDatabaseCredentialRequest](Interface.GenerateDatabaseCredentialRequest.md) | Request parameters for generating database OAuth credentials |
| [IJobsConfig](Interface.IJobsConfig.md) | Configuration for the Jobs plugin. |
| [ITelemetry](Interface.ITelemetry.md) | Plugin-facing interface for OpenTelemetry instrumentation. Provides a thin abstraction over OpenTelemetry APIs for plugins. |
| [JobAPI](Interface.JobAPI.md) | User-facing API for a single configured job. |
| [JobConfig](Interface.JobConfig.md) | Per-job configuration options. |
| [JobsConnectorConfig](Interface.JobsConnectorConfig.md) | - |
| [LakebasePoolConfig](Interface.LakebasePoolConfig.md) | Configuration for creating a Lakebase connection pool |
| [PluginManifest](Interface.PluginManifest.md) | Plugin manifest that declares metadata and resource requirements. Attached to plugin classes as a static property. Extends the shared PluginManifest with strict resource types. |
| [RequestedClaims](Interface.RequestedClaims.md) | Optional claims for fine-grained Unity Catalog table permissions When specified, the returned token will be scoped to only the requested tables |
Expand All @@ -56,6 +60,8 @@ plugin architecture, and React integration.
| [ConfigSchema](TypeAlias.ConfigSchema.md) | Configuration schema definition for plugin config. Re-exported from the standard JSON Schema Draft 7 types. |
| [ExecutionResult](TypeAlias.ExecutionResult.md) | Discriminated union for plugin execution results. |
| [IAppRouter](TypeAlias.IAppRouter.md) | Express router type for plugin route registration |
| [JobHandle](TypeAlias.JobHandle.md) | Job handle returned by `appkit.jobs("etl")`. Supports OBO access via `.asUser(req)`. |
| [JobsExport](TypeAlias.JobsExport.md) | Public API shape of the jobs plugin. Callable to select a job by key. |
| [PluginData](TypeAlias.PluginData.md) | Tuple of plugin class, config, and name. Created by `toPlugin()` and passed to `createApp()`. |
| [ResourcePermission](TypeAlias.ResourcePermission.md) | Union of all possible permission levels across all resource types. |
| [ServingFactory](TypeAlias.ServingFactory.md) | Factory function returned by `AppKit.serving`. |
Expand Down
Loading
Loading