Skip to content
Open
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
25 changes: 25 additions & 0 deletions .github/prompts/update-mcp-coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,31 @@ things the SDK has.
4. Change only text whose meaning the spec change affects, or existing text the
spec now shows to be wrong. Do not restyle unrelated descriptions.

## Where text goes

- A tool description says what the tool is for and gives one short clause per action:
enough to choose the right action. Do not put per-action detail there.
- Rules for one action's inputs (formats, limits, defaults, which fields apply) go in
that parameter's `.describe()`.
- What happens after a call (next steps, retry rules, what a result means, recovery)
goes in the response: an existing response `note`, response guidance, or error note,
following nearby patterns.
- Keep each piece of text in one place, where the model reads it when it needs it; do
not repeat it across the tool description, parameters, and response guidance.
- `src/lib/mcp/tool-contract.test.ts` caps each tool description and the total
`tools/list` size. If an addition exceeds a cap, move detail out as above. Never raise
a cap, add an exception, or loosen that test.
- In the report, list every tool description you changed with its size in characters
before and after.

## Annotations

- `destructiveHint` is `false` only when every action is read-only or additive (create,
create-or-retrieve, list, get). A delete, remove, overwrite, revoke, or replace action
requires `true`.
- Change an existing tool's annotations only when this run changes its actions, and
explain the change in the report.

## Validate and report

Use Bun 1.3.3 for all MCP dependency and test commands. Run:
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/actions.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# This file is machine-generated by `gh actions-lock`.
# Do not edit by hand; run `gh actions-lock` to update.
# Docs: https://gh.io/actions-lockfile
version: 'v0.0.3'
workflows:
'.github/workflows/ci.yml':
- 'actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5'
- 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd'
- 'actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd'
- 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020'
'.github/workflows/publish-npm.yml':
- 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd'
- 'actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610'
'.github/workflows/release-doctor.yml':
- 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd'
'.github/workflows/release-please.yml':
- 'actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547'
- 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020'
- 'pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1'
'.github/workflows/semgrep.yml': []
'.github/workflows/stlc-promote.yml':
- 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd'
- 'actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547'
'.github/workflows/stlc-sync.yml':
- 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd'
'.github/workflows/update-docs.yml':
- 'actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5'
- 'actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547'
- 'actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093'
- 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020'
- 'actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02'
- 'kernel/security-workflows@4144994f1d6977e07ef5a5832599ee4faaae9550'
'.github/workflows/update-mcp-coverage.yml':
- 'actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5'
- 'actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547'
- 'actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093'
- 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020'
- 'actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02'
- 'kernel/security-workflows@4144994f1d6977e07ef5a5832599ee4faaae9550'
- 'oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6'
'.github/workflows/vuln-remediation.yml': []
dependencies:
'actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5':
ref: 'v4.3.1'
commit: 'sha1-34e114876b0b11c390a56381ad16ebd13914f8d5'
owner_id: 44036562
repo_id: 197814629
'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd':
ref: 'v6.0.2'
commit: 'sha1-de0fac2e4500dabe0009e67214ff5f5447ce83dd'
owner_id: 44036562
repo_id: 197814629
'actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547':
ref: 'v1.12.0'
commit: 'sha1-d72941d797fd3113feb6b93fd0dec494b13a2547'
owner_id: 44036562
repo_id: 642580244
'actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093':
ref: 'v4.3.0'
commit: 'sha1-d3f86a106a0bac45b974a628896c90dbdf5c8093'
owner_id: 44036562
repo_id: 192626254
'actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd':
ref: 'v8.0.0'
commit: 'sha1-ed597411d8f924073f98dfc5c65a23a2325f34cd'
owner_id: 44036562
repo_id: 205262760
'actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610':
ref: 'v3.9.1'
commit: 'sha1-3235b876344d2a9aa001b8d1453c930bba69e610'
owner_id: 44036562
repo_id: 189476904
'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020':
ref: 'v4.4.0'
commit: 'sha1-49933ea5288caeca8642d1e84afbd3f7d6820020'
owner_id: 44036562
repo_id: 189476904
'actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02':
ref: 'v4.6.2'
commit: 'sha1-ea165f8d65b6e75b540449e92b4886f43607fa02'
owner_id: 44036562
repo_id: 192625955
'kernel/security-workflows@4144994f1d6977e07ef5a5832599ee4faaae9550':
ref: 'main'
commit: 'sha1-4144994f1d6977e07ef5a5832599ee4faaae9550'
owner_id: 194616459
repo_id: 1207196574
'oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6':
ref: 'v2.2.0'
commit: 'sha1-0c5077e51419868618aeaa5fe8019c62421857d6'
owner_id: 108928776
repo_id: 512644635
'pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1':
ref: 'v4.3.0'
commit: 'sha1-b906affcce14559ad1aafd4ab0e942779e9f58b1'
owner_id: 21320719
repo_id: 262289747
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
node-version: '22'

- name: Set up pnpm
uses: pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa # v4
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
version: '9.11.0'
run_install: false
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/update-mcp-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,27 @@ jobs:
git config user.name 'kernel-internal[bot]'
git config user.email '260533166+kernel-internal[bot]@users.noreply.github.com'
echo "main_sha=$(git rev-parse origin/main)" >> "$GITHUB_OUTPUT"
baseline_ref=origin/main
if git show-ref --verify --quiet "refs/remotes/origin/$UPDATE_BRANCH"; then
echo "update_sha=$(git rev-parse "origin/$UPDATE_BRANCH")" >> "$GITHUB_OUTPUT"
git switch --track "origin/$UPDATE_BRANCH"
if ! git rebase origin/main; then
stopped_at=$(git log -1 --format='%h %s' REBASE_HEAD 2>/dev/null || true)
conflicts=$(git diff --name-only --diff-filter=U | paste -sd ' ' -)
git rebase --abort
# The agent covers everything since main's SDK version, so a bot-only
# branch can be regenerated from main. Human commits must be kept.
# A bot-only branch can be regenerated from main. Human commits must be kept.
if git log --no-merges --format=%ae "origin/main..origin/$UPDATE_BRANCH" \
| grep -qvxF '260533166+kernel-internal[bot]@users.noreply.github.com'; then
echo "::error::$UPDATE_BRANCH has human commits that conflict with main. Resolve the conflicts on that branch, then rerun this workflow."
echo "::error::$UPDATE_BRANCH conflicts with main at $stopped_at ($conflicts) and has human commits, so it cannot be regenerated. Rebase it onto main by hand, keeping these commits, then rerun this workflow:"
git log --no-merges --format='%h %ae %s' "origin/main..origin/$UPDATE_BRANCH" \
| grep -vF ' 260533166+kernel-internal[bot]@users.noreply.github.com '
exit 1
fi
echo "::warning::$UPDATE_BRANCH conflicts with main; regenerating it from main."
echo "::warning::$UPDATE_BRANCH conflicts with main at $stopped_at ($conflicts); regenerating it from main."
git switch -C "$UPDATE_BRANCH" origin/main
# The dropped commits may cover SDK releases that main skipped when its
# SDK was bumped directly, so audit from where the branch started.
baseline_ref=$(git merge-base origin/main "origin/$UPDATE_BRANCH")
else
echo "rebased=true" >> "$GITHUB_OUTPUT"
fi
Expand All @@ -134,8 +141,8 @@ jobs:
fi

# The report replaces the PR description, so audit every release since
# main's SDK version, not only the ones since the last run.
old_version=$(git show origin/main:package.json | jq -er '.dependencies["@onkernel/sdk"]')
# the baseline's SDK version, not only the ones since the last run.
old_version=$(git show "$baseline_ref:package.json" | jq -er '.dependencies["@onkernel/sdk"]')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prompt ignores regenerated SDK baseline

Medium Severity

After a bot-only regenerate, SDK and OpenAPI diffs are built from the merge-base SDK version, but the agent prompt still says those diffs start at $MAIN_SHA and that earlier runs may already have covered them on this branch. That branch was reset to main, so the extra hunks are the dropped coverage this change is meant to restore, and the agent can skip them.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 368e6eb. Configure here.

if git -C ../sdk rev-parse --verify "refs/tags/v$old_version" >/dev/null 2>&1; then
git -C ../sdk diff "refs/tags/v$old_version" "$SDK_SHA" \
-- api.md src/client.ts src/lib src/resources > "$RUNNER_TEMP/sdk-diff.patch"
Expand Down
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.148.0"
".": "0.149.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 179
configured_endpoints: 189
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## [0.149.0](https://github.com/kernel/kernel-node-sdk/compare/v0.148.0...v0.149.0) (2026-11-16)


### Features

* Add reports API and report type discovery ([73a9a6b](https://github.com/kernel/kernel-node-sdk/commit/73a9a6be92f7ea9692a25541ce767354760184d1))
* Add tasks API: create, list, get, and link browsers ([67da753](https://github.com/kernel/kernel-node-sdk/commit/67da753f985726dd2600c8cd11275dc6820292cb))
* Let vault item events be read after the item or vault is deleted ([908bc54](https://github.com/kernel/kernel-node-sdk/commit/908bc54b4c8559847abd9fee93ae7eade374bca7))

## [0.148.0](https://github.com/kernel/kernel-node-sdk/compare/v0.147.0...v0.148.0) (2026-11-12)


Expand Down
49 changes: 49 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,55 @@ Methods:
- <code title="delete /profiles/{id_or_name}">client.profiles.<a href="./src/resources/profiles.ts">delete</a>(idOrName) -> void</code>
- <code title="get /profiles/{id_or_name}/download">client.profiles.<a href="./src/resources/profiles.ts">download</a>(idOrName, { ...params }) -> Response</code>

# Tasks

Types:

- <code><a href="./src/resources/tasks.ts">Task</a></code>
- <code><a href="./src/resources/tasks.ts">TaskMetadata</a></code>

Methods:

- <code title="post /tasks">client.tasks.<a href="./src/resources/tasks.ts">create</a>({ ...params }) -> Task</code>
- <code title="get /tasks/{id}">client.tasks.<a href="./src/resources/tasks.ts">retrieve</a>(id) -> Task</code>
- <code title="get /tasks">client.tasks.<a href="./src/resources/tasks.ts">list</a>({ ...params }) -> TasksOffsetPagination</code>
- <code title="post /tasks/{id}/browsers">client.tasks.<a href="./src/resources/tasks.ts">linkBrowsers</a>(id, { ...params }) -> Task</code>

# Reports

Types:

- <code><a href="./src/resources/reports.ts">Report</a></code>

Methods:

- <code title="post /reports">client.reports.<a href="./src/resources/reports.ts">create</a>({ ...params }) -> Report</code>
- <code title="get /reports/{id}">client.reports.<a href="./src/resources/reports.ts">retrieve</a>(id) -> Report</code>
- <code title="get /reports">client.reports.<a href="./src/resources/reports.ts">list</a>({ ...params }) -> ReportsOffsetPagination</code>

# ReportTypes

Types:

- <code><a href="./src/resources/report-types/report-types.ts">ReportType</a></code>
- <code><a href="./src/resources/report-types/report-types.ts">ReportTypeSummary</a></code>
- <code><a href="./src/resources/report-types/report-types.ts">ReportTypeVersionSummary</a></code>

Methods:

- <code title="get /report_types/{type}">client.reportTypes.<a href="./src/resources/report-types/report-types.ts">retrieve</a>(type) -> ReportType</code>
- <code title="get /report_types">client.reportTypes.<a href="./src/resources/report-types/report-types.ts">list</a>({ ...params }) -> ReportTypeSummariesOffsetPagination</code>

## Versions

Types:

- <code><a href="./src/resources/report-types/versions.ts">ReportTypeVersion</a></code>

Methods:

- <code title="get /report_types/{type}/versions/{version}">client.reportTypes.versions.<a href="./src/resources/report-types/versions.ts">retrieve</a>(version, { ...params }) -> ReportTypeVersion</code>

# Auth

## Context
Expand Down
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.148.0",
"version": "0.149.0",
"description": "The official TypeScript library for the Kernel API",
"author": "Kernel <>",
"types": "dist/index.d.ts",
Expand Down
66 changes: 66 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,22 @@ import {
ProxyIPs,
ProxyIPsOffsetPagination,
} from './resources/proxy-ips';
import {
Report,
ReportCreateParams,
ReportListParams,
Reports,
ReportsOffsetPagination,
} from './resources/reports';
import {
Task,
TaskCreateParams,
TaskLinkBrowsersParams,
TaskListParams,
TaskMetadata,
Tasks,
TasksOffsetPagination,
} from './resources/tasks';
import {
VaultProviderConfig,
VaultProviderConfigCreateParams,
Expand Down Expand Up @@ -233,6 +249,14 @@ import {
ProjectsOffsetPagination,
UpdateProjectRequest,
} from './resources/projects/projects';
import {
ReportType,
ReportTypeListParams,
ReportTypeSummariesOffsetPagination,
ReportTypeSummary,
ReportTypeVersionSummary,
ReportTypes,
} from './resources/report-types/report-types';
import {
Attempt,
ProviderTarget,
Expand Down Expand Up @@ -1095,6 +1119,18 @@ export class Kernel {
* Create, list, retrieve, and delete browser profiles.
*/
profiles: API.Profiles = new API.Profiles(this);
/**
* Define tasks that agents work toward and link the browsers they use.
*/
tasks: API.Tasks = new API.Tasks(this);
/**
* Discover report types and submit typed reports against tasks.
*/
reports: API.Reports = new API.Reports(this);
/**
* Discover report types and submit typed reports against tasks.
*/
reportTypes: API.ReportTypes = new API.ReportTypes(this);
auth: API.Auth = new API.Auth(this);
telemetry: API.Telemetry = new API.Telemetry(this);
/**
Expand Down Expand Up @@ -1148,6 +1184,9 @@ Kernel.Invocations = Invocations;
Kernel.ConfigRegistry = ConfigRegistry;
Kernel.Browsers = Browsers;
Kernel.Profiles = Profiles;
Kernel.Tasks = Tasks;
Kernel.Reports = Reports;
Kernel.ReportTypes = ReportTypes;
Kernel.Auth = Auth;
Kernel.Telemetry = Telemetry;
Kernel.Proxies = Proxies;
Expand Down Expand Up @@ -1288,6 +1327,33 @@ export declare namespace Kernel {
type ProfileDownloadParams as ProfileDownloadParams,
};

export {
Tasks as Tasks,
type Task as Task,
type TaskMetadata as TaskMetadata,
type TasksOffsetPagination as TasksOffsetPagination,
type TaskCreateParams as TaskCreateParams,
type TaskListParams as TaskListParams,
type TaskLinkBrowsersParams as TaskLinkBrowsersParams,
};

export {
Reports as Reports,
type Report as Report,
type ReportsOffsetPagination as ReportsOffsetPagination,
type ReportCreateParams as ReportCreateParams,
type ReportListParams as ReportListParams,
};

export {
ReportTypes as ReportTypes,
type ReportType as ReportType,
type ReportTypeSummary as ReportTypeSummary,
type ReportTypeVersionSummary as ReportTypeVersionSummary,
type ReportTypeSummariesOffsetPagination as ReportTypeSummariesOffsetPagination,
type ReportTypeListParams as ReportTypeListParams,
};

export { Auth as Auth };

export { Telemetry as Telemetry };
Expand Down
Loading
Loading