KosmoKrator

productivity

Pushbullet Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the Pushbullet KosmoKrator integration.

Lua Namespace

Agents call this integration through app.integrations.pushbullet.*. Use lua_read_doc("integrations.pushbullet") inside KosmoKrator to discover the same reference at runtime.

Call Lua from the Headless CLI

Use kosmo integrations:lua when a shell script, CI job, cron job, or another coding CLI should run a deterministic Pushbullet workflow without starting an interactive agent session.

Inline Lua call
kosmo integrations:lua --eval 'dump(app.integrations.pushbullet.get_current_user({}))' --json
Read Lua docs headlessly
kosmo integrations:lua --eval 'print(docs.read("pushbullet"))' --json
kosmo integrations:lua --eval 'print(docs.read("pushbullet.get_current_user"))' --json

Workflow file

Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.

workflow.lua
local pushbullet = app.integrations.pushbullet
local result = pushbullet.get_current_user({})

dump(result)
Run the workflow
kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json
Namespace note. integrations:lua exposes app.integrations.pushbullet, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.pushbullet.default.* or app.integrations.pushbullet.work.* when you configured named credential accounts.

MCP-only Lua

If the script only needs configured MCP servers and does not need Pushbullet, use the narrower mcp:lua command.

MCP Lua command
# Use mcp:lua for MCP-only scripts; use integrations:lua for this integration namespace.
kosmo mcp:lua --eval 'dump(mcp.servers())' --json

Agent-Facing Lua Docs

This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.

Pushbullet

Lua API reference for the pushbullet integration package. The integration uses Pushbullet access tokens and the official Access-Token header.

Most list tools accept limit, cursor, active, and modified_after, matching Pushbullet’s list-object pagination and sync model.

User

pushbullet_get_current_user

local user = pushbullet_get_current_user()
print(user.name, user.email)

Pushes

pushbullet_list_pushes

local result = pushbullet_list_pushes({ limit = 25, active = true })
for _, push in ipairs(result.pushes) do
  print(push.iden, push.type, push.title)
end

pushbullet_create_push

Create a note, link, or file push.

local note = pushbullet_create_push({
  type = "note",
  title = "Build complete",
  body = "The deployment finished.",
})

local link = pushbullet_create_push({
  type = "link",
  title = "Report",
  body = "Monthly report is ready.",
  url = "https://example.test/reports/monthly",
})

For file pushes, first call pushbullet_request_upload, upload the file to the returned upload_url, then send a file push using the returned file_name, file_type, and file_url.

local upload = pushbullet_request_upload({
  file_name = "report.pdf",
  file_type = "application/pdf",
})

local file_push = pushbullet_create_push({
  type = "file",
  title = "Report",
  body = "PDF attached.",
  file_name = upload.file_name,
  file_type = upload.file_type,
  file_url = upload.file_url,
})

pushbullet_update_push

local push = pushbullet_update_push({
  push_iden = "push-test",
  dismissed = true,
})

pushbullet_delete_push

local result = pushbullet_delete_push({ push_iden = "push-test" })
print(result.deleted)

pushbullet_delete_all_pushes

Deletes all pushes asynchronously.

local result = pushbullet_delete_all_pushes()

Devices

pushbullet_list_devices

local result = pushbullet_list_devices({ active = true })
for _, device in ipairs(result.devices) do
  print(device.iden, device.nickname, device.icon)
end

pushbullet_create_device

local device = pushbullet_create_device({
  nickname = "Ops Console",
  icon = "desktop",
  model = "Example Terminal",
})

pushbullet_update_device

local device = pushbullet_update_device({
  device_iden = "device-test",
  nickname = "Ops Console 2",
})

pushbullet_delete_device

local result = pushbullet_delete_device({ device_iden = "device-test" })

Chats

pushbullet_list_chats

local chats = pushbullet_list_chats({ limit = 10 })

pushbullet_create_chat

local chat = pushbullet_create_chat({ email = "person@example.test" })

pushbullet_update_chat

local chat = pushbullet_update_chat({
  chat_iden = "chat-test",
  muted = true,
})

pushbullet_delete_chat

local result = pushbullet_delete_chat({ chat_iden = "chat-test" })

Subscriptions and Channels

pushbullet_list_subscriptions

local subscriptions = pushbullet_list_subscriptions({ active = true })

pushbullet_create_subscription

local subscription = pushbullet_create_subscription({
  channel_tag = "example-channel",
})

pushbullet_update_subscription

local subscription = pushbullet_update_subscription({
  subscription_iden = "subscription-test",
  muted = true,
})

pushbullet_delete_subscription

local result = pushbullet_delete_subscription({
  subscription_iden = "subscription-test",
})

pushbullet_get_channel_info

local channel = pushbullet_get_channel_info({
  tag = "example-channel",
  no_recent_pushes = true,
})

pushbullet_create_channel

local channel = pushbullet_create_channel({
  tag = "example-channel",
  name = "Example Channel",
  description = "Example alerts.",
  website_url = "https://example.test",
})

Ephemerals

pushbullet_push_ephemeral

Use ephemerals for realtime events such as clipboard updates or notification dismissals.

local result = pushbullet_push_ephemeral({
  type = "push",
  push = {
    type = "clip",
    body = "https://example.test",
    source_user_iden = "user-test",
  },
})

Uploads

pushbullet_request_upload

local upload = pushbullet_request_upload({
  file_name = "report.pdf",
  file_type = "application/pdf",
})
print(upload.upload_url, upload.file_url)

Return Shapes

Pushbullet returns top-level collections such as pushes, devices, chats, and subscriptions. Delete tools return compact confirmation objects:

{ deleted = true, push_iden = "push-test" }

Multi-Account Usage

Use the namespace prefix assigned by the host:

local pushes = ns_pushbullet_ops.pushbullet_list_pushes({ limit = 5 })
Raw agent markdown
# Pushbullet

Lua API reference for the `pushbullet` integration package. The integration uses Pushbullet access tokens and the official `Access-Token` header.

Most list tools accept `limit`, `cursor`, `active`, and `modified_after`, matching Pushbullet's list-object pagination and sync model.

## User

### `pushbullet_get_current_user`

```lua
local user = pushbullet_get_current_user()
print(user.name, user.email)
```

## Pushes

### `pushbullet_list_pushes`

```lua
local result = pushbullet_list_pushes({ limit = 25, active = true })
for _, push in ipairs(result.pushes) do
  print(push.iden, push.type, push.title)
end
```

### `pushbullet_create_push`

Create a note, link, or file push.

```lua
local note = pushbullet_create_push({
  type = "note",
  title = "Build complete",
  body = "The deployment finished.",
})

local link = pushbullet_create_push({
  type = "link",
  title = "Report",
  body = "Monthly report is ready.",
  url = "https://example.test/reports/monthly",
})
```

For file pushes, first call `pushbullet_request_upload`, upload the file to the returned `upload_url`, then send a file push using the returned `file_name`, `file_type`, and `file_url`.

```lua
local upload = pushbullet_request_upload({
  file_name = "report.pdf",
  file_type = "application/pdf",
})

local file_push = pushbullet_create_push({
  type = "file",
  title = "Report",
  body = "PDF attached.",
  file_name = upload.file_name,
  file_type = upload.file_type,
  file_url = upload.file_url,
})
```

### `pushbullet_update_push`

```lua
local push = pushbullet_update_push({
  push_iden = "push-test",
  dismissed = true,
})
```

### `pushbullet_delete_push`

```lua
local result = pushbullet_delete_push({ push_iden = "push-test" })
print(result.deleted)
```

### `pushbullet_delete_all_pushes`

Deletes all pushes asynchronously.

```lua
local result = pushbullet_delete_all_pushes()
```

## Devices

### `pushbullet_list_devices`

```lua
local result = pushbullet_list_devices({ active = true })
for _, device in ipairs(result.devices) do
  print(device.iden, device.nickname, device.icon)
end
```

### `pushbullet_create_device`

```lua
local device = pushbullet_create_device({
  nickname = "Ops Console",
  icon = "desktop",
  model = "Example Terminal",
})
```

### `pushbullet_update_device`

```lua
local device = pushbullet_update_device({
  device_iden = "device-test",
  nickname = "Ops Console 2",
})
```

### `pushbullet_delete_device`

```lua
local result = pushbullet_delete_device({ device_iden = "device-test" })
```

## Chats

### `pushbullet_list_chats`

```lua
local chats = pushbullet_list_chats({ limit = 10 })
```

### `pushbullet_create_chat`

```lua
local chat = pushbullet_create_chat({ email = "person@example.test" })
```

### `pushbullet_update_chat`

```lua
local chat = pushbullet_update_chat({
  chat_iden = "chat-test",
  muted = true,
})
```

### `pushbullet_delete_chat`

```lua
local result = pushbullet_delete_chat({ chat_iden = "chat-test" })
```

## Subscriptions and Channels

### `pushbullet_list_subscriptions`

```lua
local subscriptions = pushbullet_list_subscriptions({ active = true })
```

### `pushbullet_create_subscription`

```lua
local subscription = pushbullet_create_subscription({
  channel_tag = "example-channel",
})
```

### `pushbullet_update_subscription`

```lua
local subscription = pushbullet_update_subscription({
  subscription_iden = "subscription-test",
  muted = true,
})
```

### `pushbullet_delete_subscription`

```lua
local result = pushbullet_delete_subscription({
  subscription_iden = "subscription-test",
})
```

### `pushbullet_get_channel_info`

```lua
local channel = pushbullet_get_channel_info({
  tag = "example-channel",
  no_recent_pushes = true,
})
```

### `pushbullet_create_channel`

```lua
local channel = pushbullet_create_channel({
  tag = "example-channel",
  name = "Example Channel",
  description = "Example alerts.",
  website_url = "https://example.test",
})
```

## Ephemerals

### `pushbullet_push_ephemeral`

Use ephemerals for realtime events such as clipboard updates or notification dismissals.

```lua
local result = pushbullet_push_ephemeral({
  type = "push",
  push = {
    type = "clip",
    body = "https://example.test",
    source_user_iden = "user-test",
  },
})
```

## Uploads

### `pushbullet_request_upload`

```lua
local upload = pushbullet_request_upload({
  file_name = "report.pdf",
  file_type = "application/pdf",
})
print(upload.upload_url, upload.file_url)
```

## Return Shapes

Pushbullet returns top-level collections such as `pushes`, `devices`, `chats`, and `subscriptions`. Delete tools return compact confirmation objects:

```lua
{ deleted = true, push_iden = "push-test" }
```

## Multi-Account Usage

Use the namespace prefix assigned by the host:

```lua
local pushes = ns_pushbullet_ops.pushbullet_list_pushes({ limit = 5 })
```
Metadata-derived Lua example
local result = app.integrations.pushbullet.get_current_user({})
print(result)

Functions

get_current_user Read

Get the authenticated Pushbullet user's profile information, including name, email, and account details.

Lua path
app.integrations.pushbullet.get_current_user
Full name
pushbullet.pushbullet_get_current_user
ParameterTypeRequiredDescription
No parameters.
list_pushes Read

List recent pushes (notifications) from Pushbullet. Returns push items including notes, links, and files.

Lua path
app.integrations.pushbullet.list_pushes
Full name
pushbullet.pushbullet_list_pushes
ParameterTypeRequiredDescription
limit integer no Maximum number of pushes to return (default: 10, max: 500).
cursor string no Pagination cursor from a previous response to get the next page of results.
active boolean no Set true to exclude deleted pushes.
modified_after number no Return pushes modified after this Unix timestamp.
create Write

Send a Pushbullet push. Supports note, link, and file pushes.

Lua path
app.integrations.pushbullet.create
Full name
pushbullet.pushbullet_create_push
ParameterTypeRequiredDescription
type string yes Push type: "note", "link", or "file".
title string yes The title of the push notification.
body string yes The body text of the push notification.
url string no Required for "link" type — the URL to include in the push.
file_name string no Required for "file" type — name returned by upload-request.
file_type string no Required for "file" type — MIME type returned by upload-request.
file_url string no Required for "file" type — URL returned by upload-request after upload.
device_iden string no Target a specific device by its iden. Omit to send to all devices.
email string no Send to this email address.
channel_tag string no Send to subscribers of this channel tag.
client_iden string no Optional client identifier for idempotency.
update Write

Update an existing Pushbullet push, such as marking it dismissed.

Lua path
app.integrations.pushbullet.update
Full name
pushbullet.pushbullet_update_push
ParameterTypeRequiredDescription
push_iden string yes Push iden to update.
dismissed boolean no Whether the push is dismissed.
delete Write

Delete a push notification from Pushbullet by its unique identifier (iden).

Lua path
app.integrations.pushbullet.delete
Full name
pushbullet.pushbullet_delete_push
ParameterTypeRequiredDescription
push_iden string yes The unique identifier (iden) of the push to delete.
delete_all_pushes Write

Delete all Pushbullet pushes for the authenticated user. This operation is asynchronous.

Lua path
app.integrations.pushbullet.delete_all_pushes
Full name
pushbullet.pushbullet_delete_all_pushes
ParameterTypeRequiredDescription
No parameters.
list_devices Read

List all devices registered with the current user's Pushbullet account. Returns device names, types, and identifiers.

Lua path
app.integrations.pushbullet.list_devices
Full name
pushbullet.pushbullet_list_devices
ParameterTypeRequiredDescription
limit integer no Maximum number of devices to return.
cursor string no Pagination cursor from a previous response.
active boolean no Set true to exclude deleted devices.
modified_after number no Return devices modified after this Unix timestamp.
create_device Write

Create a new Pushbullet device for the authenticated user.

Lua path
app.integrations.pushbullet.create_device
Full name
pushbullet.pushbullet_create_device
ParameterTypeRequiredDescription
nickname string yes Name to display for the device.
icon string no Device icon such as desktop, browser, laptop, tablet, phone, watch, or system.
model string no Device model.
manufacturer string no Device manufacturer.
push_token string no Platform-specific push token.
app_version integer no Pushbullet app version.
has_sms boolean no Whether the device has SMS capability.
update_device Write

Update a Pushbullet device such as nickname, icon, or SMS capability.

Lua path
app.integrations.pushbullet.update_device
Full name
pushbullet.pushbullet_update_device
ParameterTypeRequiredDescription
device_iden string yes Device iden to update.
nickname string no Updated device nickname.
icon string no Updated device icon.
model string no Updated model.
manufacturer string no Updated manufacturer.
push_token string no Updated push token.
app_version integer no Updated app version.
has_sms boolean no Updated SMS capability.
delete_device Write

Delete a Pushbullet device by device iden.

Lua path
app.integrations.pushbullet.delete_device
Full name
pushbullet.pushbullet_delete_device
ParameterTypeRequiredDescription
device_iden string yes Device iden to delete.
list_chats Read

List chats belonging to the authenticated Pushbullet user.

Lua path
app.integrations.pushbullet.list_chats
Full name
pushbullet.pushbullet_list_chats
ParameterTypeRequiredDescription
limit integer no Maximum number of chats to return.
cursor string no Pagination cursor.
active boolean no Set true to exclude deleted chats.
modified_after number no Return chats modified after this Unix timestamp.
create_chat Write

Create a Pushbullet chat with another user or email address.

Lua path
app.integrations.pushbullet.create_chat
Full name
pushbullet.pushbullet_create_chat
ParameterTypeRequiredDescription
email string yes Email address to create a chat with.
update_chat Write

Update a Pushbullet chat, usually to mute or unmute it.

Lua path
app.integrations.pushbullet.update_chat
Full name
pushbullet.pushbullet_update_chat
ParameterTypeRequiredDescription
chat_iden string yes Chat iden to update.
muted boolean yes Whether to mute the chat.
delete_chat Write

Delete a Pushbullet chat by chat iden.

Lua path
app.integrations.pushbullet.delete_chat
Full name
pushbullet.pushbullet_delete_chat
ParameterTypeRequiredDescription
chat_iden string yes Chat iden to delete.
list_subscriptions Read

List channel subscriptions belonging to the authenticated Pushbullet user.

Lua path
app.integrations.pushbullet.list_subscriptions
Full name
pushbullet.pushbullet_list_subscriptions
ParameterTypeRequiredDescription
limit integer no Maximum number of subscriptions to return.
cursor string no Pagination cursor.
active boolean no Set true to exclude deleted subscriptions.
modified_after number no Return subscriptions modified after this Unix timestamp.
create_subscription Write

Subscribe the authenticated Pushbullet user to a channel by tag.

Lua path
app.integrations.pushbullet.create_subscription
Full name
pushbullet.pushbullet_create_subscription
ParameterTypeRequiredDescription
channel_tag string yes Channel tag to subscribe to.
update_subscription Write

Update a Pushbullet channel subscription, usually to mute or unmute it.

Lua path
app.integrations.pushbullet.update_subscription
Full name
pushbullet.pushbullet_update_subscription
ParameterTypeRequiredDescription
subscription_iden string yes Subscription iden to update.
muted boolean yes Whether to mute the subscription.
delete_subscription Write

Delete a Pushbullet channel subscription by subscription iden.

Lua path
app.integrations.pushbullet.delete_subscription
Full name
pushbullet.pushbullet_delete_subscription
ParameterTypeRequiredDescription
subscription_iden string yes Subscription iden to delete.
get_channel_info Read

Get public information for a Pushbullet channel by tag.

Lua path
app.integrations.pushbullet.get_channel_info
Full name
pushbullet.pushbullet_get_channel_info
ParameterTypeRequiredDescription
tag string yes Channel tag.
no_recent_pushes boolean no Set true to omit recent pushes from the response.
create_channel Write

Create a Pushbullet channel with a globally unique tag.

Lua path
app.integrations.pushbullet.create_channel
Full name
pushbullet.pushbullet_create_channel
ParameterTypeRequiredDescription
tag string yes Globally unique channel tag.
name string yes Channel display name.
description string yes Channel description.
image_url string no Image URL for the channel.
website_url string no Website URL for the channel.
feed_url string no RSS feed URL to post automatically.
feed_filters array no Optional RSS feed filters.
ephemeral Write

Send a Pushbullet ephemeral event such as a clip or notification dismissal.

Lua path
app.integrations.pushbullet.ephemeral
Full name
pushbullet.pushbullet_push_ephemeral
ParameterTypeRequiredDescription
type string yes Outer ephemeral type, usually "push".
push object yes Ephemeral push payload.
request_upload Write

Request a Pushbullet upload URL for a file push.

Lua path
app.integrations.pushbullet.request_upload
Full name
pushbullet.pushbullet_request_upload
ParameterTypeRequiredDescription
file_name string yes Name of the file to upload.
file_type string yes MIME type of the file.