Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.6"
".": "0.1.0-alpha.7"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 4
configured_endpoints: 3
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-d168b58fcf39dbd0458d132091793d3e2d0930070b7dda2d5f7f1baff20dd31b.yml
openapi_spec_hash: b7e0fd7ee1656d7dbad57209d1584d92
config_hash: 2d282609080a6011e3f6222451f72237
config_hash: 9139d1eb064baf60fd2265aac382f097
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.1.0-alpha.7 (2025-05-11)

Full Changelog: [v0.1.0-alpha.6...v0.1.0-alpha.7](https://github.com/onkernel/kernel-node-sdk/compare/v0.1.0-alpha.6...v0.1.0-alpha.7)

### Features

* **api:** update via SDK Studio ([aef2da7](https://github.com/onkernel/kernel-node-sdk/commit/aef2da7440950671557470da84955d0293fbbace))

## 0.1.0-alpha.6 (2025-05-10)

Full Changelog: [v0.1.0-alpha.5...v0.1.0-alpha.6](https://github.com/onkernel/kernel-node-sdk/compare/v0.1.0-alpha.5...v0.1.0-alpha.6)
Expand Down
2 changes: 0 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ Types:

- <code><a href="./src/resources/apps.ts">AppDeployResponse</a></code>
- <code><a href="./src/resources/apps.ts">AppInvokeResponse</a></code>
- <code><a href="./src/resources/apps.ts">AppRetrieveInvocationResponse</a></code>

Methods:

- <code title="post /apps/deploy">client.apps.<a href="./src/resources/apps.ts">deploy</a>({ ...params }) -> AppDeployResponse</code>
- <code title="post /apps/invoke">client.apps.<a href="./src/resources/apps.ts">invoke</a>({ ...params }) -> AppInvokeResponse</code>
- <code title="get /apps/invocations/{id}">client.apps.<a href="./src/resources/apps.ts">retrieveInvocation</a>(id) -> AppRetrieveInvocationResponse</code>

# Browser

Expand Down
1,370 changes: 0 additions & 1,370 deletions bun.lock

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onkernel/sdk",
"version": "0.1.0-alpha.6",
"version": "0.1.0-alpha.7",
"description": "The official TypeScript library for the Kernel API",
"author": "Kernel <>",
"types": "dist/index.d.ts",
Expand Down
15 changes: 7 additions & 8 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ import {
AppDeployResponse,
AppInvokeParams,
AppInvokeResponse,
AppRetrieveInvocationResponse,
Apps,
} from './resources/apps';
import { Browser, BrowserCreateSessionResponse } from './resources/browser';
import { readEnv } from './internal/utils/env';
import { formatRequestDetails, loggerFor } from './internal/utils/log';
import { isEmptyObj } from './internal/utils/values';
import { KernelApp, appRegistry } from './core/app-framework';
import { KernelApp } from './core/app-framework';

const environments = {
production: 'https://api.onkernel.com/',
Expand Down Expand Up @@ -705,14 +704,16 @@ export class Kernel {
}
}

/**
* Create a new KernelApp instance.
*
* @param name - The name of the app to create.
* @returns A new KernelApp instance you can attach actions to.
*/
public app(name: string): KernelApp {
return new KernelApp(name);
}

public static exportRegistry(): string {
return appRegistry.exportJSON();
}

static Kernel = this;
static DEFAULT_TIMEOUT = 60000; // 1 minute

Expand All @@ -737,15 +738,13 @@ export class Kernel {
}
Kernel.Apps = Apps;
Kernel.Browser = Browser;
Kernel.exportRegistry = () => appRegistry.exportJSON();
export declare namespace Kernel {
export type RequestOptions = Opts.RequestOptions;

export {
Apps as Apps,
type AppDeployResponse as AppDeployResponse,
type AppInvokeResponse as AppInvokeResponse,
type AppRetrieveInvocationResponse as AppRetrieveInvocationResponse,
type AppDeployParams as AppDeployParams,
type AppInvokeParams as AppInvokeParams,
};
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ export {
UnprocessableEntityError,
} from './core/error';

export { KernelAction, KernelContext, KernelJson } from './core/app-framework';
export { KernelAction, KernelContext, KernelJson, appRegistry } from './core/app-framework';
32 changes: 0 additions & 32 deletions src/resources/apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { APIPromise } from '../core/api-promise';
import { type Uploadable } from '../core/uploads';
import { RequestOptions } from '../internal/request-options';
import { multipartFormRequestOptions } from '../internal/uploads';
import { path } from '../internal/utils/path';

export class Apps extends APIResource {
/**
Expand Down Expand Up @@ -40,20 +39,6 @@ export class Apps extends APIResource {
invoke(body: AppInvokeParams, options?: RequestOptions): APIPromise<AppInvokeResponse> {
return this._client.post('/apps/invoke', { body, ...options });
}

/**
* Get an app invocation by id
*
* @example
* ```ts
* const response = await client.apps.retrieveInvocation(
* 'ckqwer3o20000jb9s7abcdef',
* );
* ```
*/
retrieveInvocation(id: string, options?: RequestOptions): APIPromise<AppRetrieveInvocationResponse> {
return this._client.get(path`/apps/invocations/${id}`, options);
}
}

export interface AppDeployResponse {
Expand Down Expand Up @@ -90,22 +75,6 @@ export interface AppInvokeResponse {
output?: string;
}

export interface AppRetrieveInvocationResponse {
id: string;

appName: string;

finishedAt: string | null;

input: string;

output: string;

startedAt: string;

status: string;
}

export interface AppDeployParams {
/**
* Name of the application
Expand Down Expand Up @@ -154,7 +123,6 @@ export declare namespace Apps {
export {
type AppDeployResponse as AppDeployResponse,
type AppInvokeResponse as AppInvokeResponse,
type AppRetrieveInvocationResponse as AppRetrieveInvocationResponse,
type AppDeployParams as AppDeployParams,
type AppInvokeParams as AppInvokeParams,
};
Expand Down
1 change: 0 additions & 1 deletion src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export {
Apps,
type AppDeployResponse,
type AppInvokeResponse,
type AppRetrieveInvocationResponse,
type AppDeployParams,
type AppInvokeParams,
} from './apps';
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.1.0-alpha.6'; // x-release-please-version
export const VERSION = '0.1.0-alpha.7'; // x-release-please-version
12 changes: 0 additions & 12 deletions tests/api-resources/apps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,4 @@ describe('resource apps', () => {
version: '1.0.0',
});
});

// skipped: tests are disabled for the time being
test.skip('retrieveInvocation', async () => {
const responsePromise = client.apps.retrieveInvocation('ckqwer3o20000jb9s7abcdef');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
expect(response).not.toBeInstanceOf(Response);
const dataAndResponse = await responsePromise.withResponse();
expect(dataAndResponse.data).toBe(response);
expect(dataAndResponse.response).toBe(rawResponse);
});
});