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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
test:
timeout-minutes: 10
name: test
runs-on: ${{ github.repository == 'stainless-sdks/dedalus-sql' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 32
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-918ae3967dc06a6b31d32b88cf02e77784d8234c1a9baf78763de249b7f8928a.yml
openapi_spec_hash: ccb02923079d91569a17162c88da590b
config_hash: 9cc9389d5c9a7e611f3544ede6b6263a
configured_endpoints: 17
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs/dedalus-c0e28b234478af75f61bcf42f5f32818d96ec93b1d8239fa0ff1c801c0e4b64f.yml
openapi_spec_hash: a70c391bb0957fc90c5dbf251de8afe4
config_hash: fa45a5bf161b7291cb5ea20c2da83cc0
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Changelog

## 0.1.0 (2026-09-01)

Full Changelog: [v0.0.1...v0.1.0](https://github.com/dedalus-labs/dedalus-sql/compare/v0.0.1...v0.1.0)

### ⚠ BREAKING CHANGES

* **api:** regenerate SDKs from the current public DCS contract

### Features

* **api:** regenerate SDKs from the current public DCS contract ([e6532f1](https://github.com/dedalus-labs/dedalus-sql/commit/e6532f17edd9e984354dfea0ca0f215220ae84f7))
* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([f6bf4e4](https://github.com/dedalus-labs/dedalus-sql/commit/f6bf4e4302d20285e31d79aaf21d8bcc91ca4e44))


### Chores

* configure new SDK language ([0d0feb6](https://github.com/dedalus-labs/dedalus-sql/commit/0d0feb6b239467a8be26294d448366b02b1b97d0))
* **internal:** allow the mock server port to be set with STAINLESS_MOCK_PORT ([0c6beb7](https://github.com/dedalus-labs/dedalus-sql/commit/0c6beb709e8d78aeb6bd4743e32714d9049a4ce1))
* update SDK settings ([f3f3d85](https://github.com/dedalus-labs/dedalus-sql/commit/f3f3d855ecda74429a2273f3c79f98306afb141c))
6 changes: 3 additions & 3 deletions META.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
"resources": {
"homepage": "https://docs.dedaluslabs.ai",
"bugtracker": {
"web": "https://www.github.com/stainless-sdks/dedalus-sql/issues",
"web": "https://www.github.com/dedalus-labs/dedalus-sql/issues",
"mailto": "oss@dedaluslabs.ai"
},
"repository": {
"url": "git://github.com/stainless-sdks/dedalus-sql.git",
"web": "https://www.github.com/stainless-sdks/dedalus-sql",
"url": "git://github.com/dedalus-labs/dedalus-sql.git",
"web": "https://www.github.com/dedalus-labs/dedalus-sql",
"type": "git"
}
},
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
>
> This extension has not yet been exhaustively tested in production environments and may be missing some features you'd expect in a stable release. As we continue development, there may be breaking changes that require updates to your code.
>
> **We'd love your feedback!** Please share any suggestions, bug reports, feature requests, or general thoughts by [filing an issue](https://www.github.com/stainless-sdks/dedalus-sql/issues/new).
> **We'd love your feedback!** Please share any suggestions, bug reports, feature requests, or general thoughts by [filing an issue](https://www.github.com/dedalus-labs/dedalus-sql/issues/new).

The Dedalus API PostgreSQL Extension provides convenient access to the [Dedalus REST API](https://docs.dedaluslabs.ai) from PostgreSQL.

Expand All @@ -19,7 +19,7 @@ The REST API documentation can be found on [docs.dedaluslabs.ai](https://docs.de
Clone the repository:

```sh
git clone git@github.com:stainless-sdks/dedalus-sql.git
git clone git@github.com:dedalus-labs/dedalus-sql.git
cd dedalus-sql
```

Expand Down Expand Up @@ -60,7 +60,9 @@ This extension requires:

```sql
SELECT *
FROM dedalus_usage.retrieve();
FROM dedalus_machines.retrieve(
machine_id := 'dm-ecc2efdd-ddfa-31a9-c6f1-b833d337aa7c'
);
```

## Client configuration
Expand Down Expand Up @@ -184,4 +186,4 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/dedalus-sql/issues) with questions, bugs, or suggestions.
We are keen for your feedback; please open an [issue](https://www.github.com/dedalus-labs/dedalus-sql/issues) with questions, bugs, or suggestions.
71 changes: 71 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"packages": {
".": {}
},
"$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json",
"include-v-in-tag": true,
"include-component-in-tag": false,
"versioning": "prerelease",
"prerelease": true,
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false,
"pull-request-header": "Automated Release PR",
"pull-request-title-pattern": "release: ${version}",
"changelog-sections": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
},
{
"type": "revert",
"section": "Reverts"
},
{
"type": "chore",
"section": "Chores"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "style",
"section": "Styles"
},
{
"type": "refactor",
"section": "Refactors"
},
{
"type": "test",
"section": "Tests",
"hidden": true
},
{
"type": "build",
"section": "Build System"
},
{
"type": "ci",
"section": "Continuous Integration",
"hidden": true
}
],
"reviewers": [
"@windsornguyen"
],
"release-type": "simple",
"extra-files": [
"dedalus.control",
"META.json",
"Makefile"
]
}
13 changes: 10 additions & 3 deletions scripts/mock
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ set -e

cd "$(dirname "$0")/.."

if [ "$1" == "--install" ]; then
npm exec --package=@stdy/cli@0.22.1 -- steady --version
exit 0
fi

if [[ -n "$1" && "$1" != '--'* ]]; then
URL="$1"
shift
Expand All @@ -20,16 +25,18 @@ fi
echo "==> Starting mock server with URL ${URL}"

# Run steady mock on the given spec
MOCK_PORT="${STAINLESS_MOCK_PORT:-4010}"

if [ "$1" == "--daemon" ]; then
# Pre-install the package so the download doesn't eat into the startup timeout
npm exec --package=@stdy/cli@0.22.1 -- steady --version

npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=repeat --validator-form-array-format=repeat --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log &
npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p "$MOCK_PORT" --validator-query-array-format=repeat --validator-form-array-format=repeat --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log &

# Wait for server to come online via health endpoint (max 30s)
echo -n "Waiting for server"
attempts=0
while ! curl --silent --fail "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1; do
while ! curl --silent --fail "http://127.0.0.1:$MOCK_PORT/_x-steady/health" >/dev/null 2>&1; do
if ! kill -0 $! 2>/dev/null; then
echo
cat .stdy.log
Expand All @@ -48,5 +55,5 @@ if [ "$1" == "--daemon" ]; then

echo
else
npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=repeat --validator-form-array-format=repeat --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL"
npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p "$MOCK_PORT" --validator-query-array-format=repeat --validator-form-array-format=repeat --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL"
fi
12 changes: 9 additions & 3 deletions scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color

MOCK_PORT="${STAINLESS_MOCK_PORT:-4010}"

function steady_is_running() {
curl --silent "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1
curl --silent "http://127.0.0.1:$MOCK_PORT/_x-steady/health" >/dev/null 2>&1
}

kill_server_on_port() {
Expand All @@ -27,7 +29,7 @@ function is_overriding_api_base_url() {

if ! is_overriding_api_base_url && ! steady_is_running ; then
# When we exit this script, make sure to kill the background mock server process
trap 'kill_server_on_port 4010' EXIT
trap 'kill_server_on_port "$MOCK_PORT"' EXIT

# Start the dev server
./scripts/mock --daemon
Expand All @@ -43,7 +45,7 @@ elif ! steady_is_running ; then
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the steady command:"
echo
echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.22.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=repeat --validator-form-array-format=repeat --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}"
echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.22.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p $MOCK_PORT --validator-query-array-format=repeat --validator-form-array-format=repeat --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}"
echo

exit 1
Expand All @@ -52,6 +54,10 @@ else
echo
fi

if [ -n "${STAINLESS_MOCK_PORT:-}" ] && ! is_overriding_api_base_url ; then
export TEST_API_BASE_URL="http://127.0.0.1:$MOCK_PORT"
fi

echo "==> Detecting PostgreSQL Python executable"
PYTHON_EXECUTABLE_PATH=$(pg_config --configure | grep -o "PYTHON=[^ ]*" | cut -d= -f2 | tr -d "'")
echo "PostgreSQL uses Python $PYTHON_EXECUTABLE_PATH"
Expand Down
35 changes: 2 additions & 33 deletions sql/_dedalus.sql
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,6 @@ CREATE TYPE dedalus_internal.page AS (
next_request_options JSONB
);

CREATE SCHEMA IF NOT EXISTS dedalus_usage;

CREATE TYPE dedalus_usage.machine_compute_usage AS ();
CREATE TYPE dedalus_usage.machine_compute_usage_row AS ();
CREATE TYPE dedalus_usage.machine_storage_usage AS ();
CREATE TYPE dedalus_usage.machine_storage_usage_row AS ();
CREATE TYPE dedalus_usage.org_usage AS ();

CREATE SCHEMA IF NOT EXISTS dedalus_machines;

CREATE TYPE dedalus_machines.create_params AS ();
Expand All @@ -129,17 +121,7 @@ CREATE TYPE dedalus_machines.machine AS ();
CREATE TYPE dedalus_machines.machine_list AS ();
CREATE TYPE dedalus_machines.machine_list_item AS ();
CREATE TYPE dedalus_machines.update_params AS ();

CREATE SCHEMA IF NOT EXISTS dedalus_machines_artifacts;

CREATE TYPE dedalus_machines_artifacts.artifact AS ();
CREATE TYPE dedalus_machines_artifacts.artifact_list AS ();

CREATE SCHEMA IF NOT EXISTS dedalus_machines_previews;

CREATE TYPE dedalus_machines_previews.preview AS ();
CREATE TYPE dedalus_machines_previews.preview_create_params AS ();
CREATE TYPE dedalus_machines_previews.preview_list AS ();
CREATE TYPE dedalus_machines.machine_retrieve_response AS ();

CREATE SCHEMA IF NOT EXISTS dedalus_machines_ssh;

Expand All @@ -157,17 +139,4 @@ CREATE TYPE dedalus_machines_executions.execution_create_params AS ();
CREATE TYPE dedalus_machines_executions.execution_event AS ();
CREATE TYPE dedalus_machines_executions.execution_events AS ();
CREATE TYPE dedalus_machines_executions.execution_list AS ();
CREATE TYPE dedalus_machines_executions.execution_output AS ();

CREATE SCHEMA IF NOT EXISTS dedalus_machines_terminals;

CREATE TYPE dedalus_machines_terminals.terminal AS ();
CREATE TYPE dedalus_machines_terminals.terminal_client_event AS ();
CREATE TYPE dedalus_machines_terminals.terminal_closed_event AS ();
CREATE TYPE dedalus_machines_terminals.terminal_create_params AS ();
CREATE TYPE dedalus_machines_terminals.terminal_error_event AS ();
CREATE TYPE dedalus_machines_terminals.terminal_input_event AS ();
CREATE TYPE dedalus_machines_terminals.terminal_list AS ();
CREATE TYPE dedalus_machines_terminals.terminal_output_event AS ();
CREATE TYPE dedalus_machines_terminals.terminal_resize_event AS ();
CREATE TYPE dedalus_machines_terminals.terminal_server_event AS ();
CREATE TYPE dedalus_machines_executions.execution_output AS ();
Loading
Loading