Commit graph

62 commits

Author SHA1 Message Date
eeb1dcb3dc feat: add --show-freeze-page and --no-show-freeze-page CLI flags
Add CLI support for toggling the show_freeze_page service setting,
which controls whether frozen services display an HTML payment page
or return a JSON error response.

Updated 18 SDK implementations + CLI_SPEC.md documentation.
2026-01-25 04:28:24 -05:00
919890bbbd chore: bump version to 4.2.28 2026-01-24 18:17:07 -05:00
14c50efff6 chore: bump version to 4.2.27 2026-01-24 18:16:56 -05:00
2648d4ccf9 chore: bump version to 4.2.26 2026-01-24 15:56:49 -05:00
affa90abef chore: bump version to 4.2.25 2026-01-24 15:56:38 -05:00
cdd7cf714b chore: bump version to 4.2.24 2026-01-24 13:47:09 -05:00
05fd8ba415 chore: bump version to 4.2.23 2026-01-24 13:46:54 -05:00
bc3af266bc chore: bump version to 4.2.22
Consolidate dotnet SDK with sync/async implementations and add CI testing.
Move API and portal off pool to prevent failover when cammy is loaded.
2026-01-24 11:54:56 -05:00
b0c9fd51ad ci: add separate CI jobs for C# (Mono) and .NET 10
- Add csharp job: builds with Mono, tests sync version
- Add dotnet job: builds both sync and async with .NET 10
- Update clients/dotnet/Makefile to support sync and async builds
- Update clients/csharp/Makefile to remove reference to deleted dotnet folder
- Add both to summary job dependencies
2026-01-23 17:42:03 -05:00
fe980a5dad refactor: consolidate dotnet implementations and add full CLI spec
- Remove misplaced clients/csharp/dotnet/ (was duplicate in wrong location)
- Add clients/dotnet/async/ with async/await implementation (1111 lines)
- Update clients/dotnet/sync/ with blocking HttpClient.Send (1096 lines)
- Both versions now implement complete CLI spec:
  - execute, session, service, service env, key (existing)
  - snapshot command (list, info, delete, lock, unlock, clone)
  - image command (list, info, delete, lock, unlock, publish, visibility, spawn, clone)
  - languages command with 1-hour cache
  - Added session options: freeze, unfreeze, boost, unboost, snapshot
  - Added service options: lock, unlock, resize, redeploy, snapshot, bootstrap-file
2026-01-23 17:39:53 -05:00
ad9394fd27 fix: use correct -o flag for aggregate script in CI 2026-01-23 16:04:28 -05:00
3f73bf6203 fix: skip null rows when parsing pool metrics CSV 2026-01-23 15:28:20 -05:00
6d4b0aab2e fix: stop pool metrics collector when tests finish to avoid skewed averages 2026-01-23 15:05:07 -05:00
08dbc8ff75 chore: bump version to 4.2.18 2026-01-23 10:42:50 -05:00
3acc781016 fix: exec_sdk_inception now properly executes SDK file instead of path as code 2026-01-23 10:04:57 -05:00
b3c3957346 fix: add go compiler error patterns (expected/package/found) 2026-01-23 10:03:56 -05:00
84d012dcfe Remove localStorage fallback - vault only for credentials 2026-01-23 09:52:56 -05:00
638f6c01f4 fix: add JVM exception patterns for groovy flakiness 2026-01-23 09:52:19 -05:00
0b618bd94e Add UnsandboxVault to sync SDK with external vault support
- Add UnsandboxVault for encrypted credential storage (browser only)
- Update loadCredentialsFromStorage() with 3-tier priority:
  1. UnsandboxVault (own encrypted vault)
  2. External vaults (window.UncloseVault for uncloseai.com)
  3. Plain localStorage (legacy fallback)
- Export UnsandboxVault in both named and default exports
- Makes window.UnsandboxVault available globally in browser
2026-01-23 09:46:20 -05:00
e0bb0cb6bb chore: bump version to 4.2.14 2026-01-23 09:26:25 -05:00
f7ad5d4d25 chore: bump version to 4.2.13 2026-01-23 08:57:51 -05:00
2e44723e8e Make async JS SDK isomorphic (Node.js + Browser)
- Add environment detection (IS_BROWSER, IS_NODE)
- Use top-level await for conditional Node.js imports
- Make signRequest async/isomorphic (Node crypto vs Web Crypto API)
- Add loadCredentialsFromStorage() for browser localStorage support
- Update resolveCredentials() with 5-tier priority including localStorage
- Add IS_NODE guards to file-system dependent functions
- Guard CLI entry point to prevent browser errors
- Update header docs with browser usage instructions

All 71 existing tests pass.
2026-01-23 08:53:00 -05:00
66d5cd0818 chore: bump version to 4.2.12 2026-01-23 08:20:47 -05:00
3b843c5099 chore: bump version to 4.2.10 2026-01-23 06:35:46 -05:00
0251e66249 chore: bump version to 4.2.9 2026-01-23 04:52:39 -05:00
bc80b16e82 chore: bump version to 4.2.8 2026-01-23 04:51:56 -05:00
3360422575 chore: bump version to 4.2.7 2026-01-23 04:27:31 -05:00
7e56327056 feat: add unfreeze_on_demand to remaining 35 SDKs
Updated awk, bash, clojure, cobol, cpp, crystal, csharp, dart, dotnet,
d, elixir, erlang, fortran, fsharp, groovy, haskell, julia, kotlin,
lisp, lua, nim, objective-c, ocaml, perl, php (sync+async), powershell,
prolog, raku, r, scheme, swift, tcl, v, and zig SDKs:

- Add set_unfreeze_on_demand function (PATCH /services/:id)
- Add --unfreeze-on-demand flag for service creation
- Add --set-unfreeze-on-demand command for existing services
2026-01-22 17:01:19 -05:00
e58adcd5fe feat: add unfreeze_on_demand support to all SDKs
Updated Python, JavaScript, Go, Rust, Ruby, Java, and TypeScript SDKs:
- Add unfreeze_on_demand field to Service struct/class
- Add setUnfreezeOnDemand function to toggle setting via PATCH /services/:id
- Add unfreeze_on_demand parameter to createService function
2026-01-22 16:40:36 -05:00
04060aa4da feat: add .NET 10 CLI implementation
- Single-file Un.cs using modern C# features
- Top-level statements, HttpClient, System.Text.Json
- Full feature parity with Mono version (648 lines vs 1260)
- Supports execute, session, service, service env, key commands
2026-01-22 16:36:38 -05:00
a6aad7ec7b feat: add unfreeze_on_demand support to un CLI
- Add --auto-unfreeze / --no-auto-unfreeze commands to toggle setting
- Add --unfreeze-on-demand flag for service create
- Display Auto-Unfreeze status in service --info output
- Add field to unsandbox_service_t struct and API function in un.h
2026-01-22 16:27:14 -05:00
63b41b571e feat: add modern .NET 10 implementation alongside Mono
- Add dotnet/ directory with modern .NET 10 implementation
- Use HttpClient, async/await, and System.Text.Json
- Update Makefile to build both Mono and .NET versions
- Add comprehensive README documenting differences
- Both versions now supported in unsandbox-ubuntu container
2026-01-20 14:05:58 -05:00
fbd9273c3d feat: update all clients to use api.unsandbox.com/keys/validate
Change key validation endpoint from portal to API across all clients:
- C: Update PORTAL_BASE to API_BASE in validate_api_key()
- Python (sync/async): Change PORTAL_BASE to API_BASE
- Perl: Change $PORTAL_BASE to $API_BASE
- Rust (sync/async): Change hardcoded URL to api.unsandbox.com

All other languages (Go, Java, Kotlin, C#, Ruby, PHP, JavaScript) already
use their makeRequest() function with API_BASE, so no changes needed.

The key subcommand already exists and continues to work with the new endpoint.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 03:51:38 -05:00
27e3ee5ffa chore: Bump version to 4.2.5 2026-01-19 14:02:38 -05:00
252bdffca2 fix(tests): Fix GitHub Actions test failures
- bash: Add file existence check before reading
- bash: Improve exit code handling for invalid JSON results
- bash: Expand detect_language to support all 42 languages
- python: Use detect_language() instead of non-existent EXT_MAP
- python: Remove exit_on_error param that doesn't exist
- python: Replace read_file test with validate_keys existence check
2026-01-19 06:40:49 -05:00
4b602b8174 chore: Add set-version script and update all clients to 4.2.0
- Add scripts/set-version.sh to update version in all source files
- Add make set-version VERSION=X.Y.Z target
- Updated 11 files: VERSION, C, Python, Lua, Perl, Groovy, JS, Rust
2026-01-18 13:09:10 -05:00
04f6cf6eaf docs: Update test counts to 638 tests, add badges to README 2026-01-18 08:11:24 -05:00
1077543b7c modified: clients/awk/sync/src/un.awk
modified:   clients/c/src/un.c
	modified:   clients/clojure/sync/src/un.clj
	modified:   clients/cobol/sync/src/un.cob
	modified:   clients/cpp/sync/src/un.cpp
	modified:   clients/crystal/sync/src/un.cr
	modified:   clients/d/sync/src/un.d
	modified:   clients/dart/sync/src/un.dart
	modified:   clients/elixir/sync/src/un.ex
	modified:   clients/erlang/sync/src/un.erl
	modified:   clients/forth/sync/src/un.forth
	modified:   clients/fortran/sync/src/un.f90
	modified:   clients/fsharp/sync/src/un.fs
	modified:   clients/haskell/sync/src/un.hs
	modified:   clients/julia/sync/src/un.jl
	modified:   clients/kotlin/sync/src/un.kt
	modified:   clients/lisp/sync/src/un.lisp
	modified:   clients/nim/sync/src/un.nim
	modified:   clients/ocaml/sync/src/un.ml
	modified:   clients/powershell/sync/src/un.ps1
	modified:   clients/prolog/sync/src/un.pro
	modified:   clients/r/sync/src/un.r
	modified:   clients/scheme/sync/src/un.scm
	modified:   clients/tcl/sync/src/un.tcl
	modified:   clients/typescript/sync/src/un.ts
	modified:   clients/v/sync/src/un.v
	modified:   clients/zig/sync/src/un.zig
2026-01-17 12:01:42 -05:00
cc7674f7d7 fix(c): Use static CLI functions instead of library API
The CLI was using library-only types and functions (unsandbox_languages_t,
unsandbox_image_list_t, etc.) that are only available when UNSANDBOX_LIBRARY
is defined. This caused build failures when building as CLI.

Changes:
- Add static list_languages_cli() for CLI language listing
- Fix image list to parse JSON directly instead of using library types
- Fix spawn_from_image() call with missing bootstrap/network_mode args
- Fix image_publish/clone_image calls to use static functions

Also update CLAUDE.md with release/versioning documentation.
2026-01-17 10:54:07 -05:00
af995cdc1a feat(cli): Add languages and image commands to all 42 SDKs
- Add `un languages [--json]` command to list available execution languages
- Add `un image` command with full image management:
  - --list, --info, --delete, --lock, --unlock
  - --publish, --visibility, --spawn, --clone
- Update CLI_SPEC.md with new command documentation
- All implementations follow consistent patterns
2026-01-17 10:25:20 -05:00
b6d6f162d0 fix(c): Wrap library API functions in ifdef UNSANDBOX_LIBRARY
Library API functions now only compile when building as library.
CLI builds without library API, just the main() function.
2026-01-17 09:12:25 -05:00
f72b6b4704 fix(c): Build CLI with library flag to include type definitions 2026-01-17 09:06:41 -05:00
83f2691d03 feat(ci): Implement inception testing pattern
- Build C CLI binary for testing all SDKs through unsandbox
- test-sdk.sh runs: build/un → unsandbox → SDK → unsandbox → test code
- Each SDK is tested for --help and code execution
- No local language interpreters needed on build server
2026-01-17 07:09:42 -05:00
b9860a93a1 feat: Complete C library API and migrate all languages to clients/
C SDK Library API:
- Implement all 43+ library functions with JSON parsing
- Add Image API (15 functions): list, get, publish, delete, lock/unlock,
  visibility, grant/revoke access, transfer, spawn, clone
- Add infrastructure helpers: count_json_array_objects, skip_json_object,
  set_last_error with thread-local storage
- Functional tests: 30/30 passing

Migration:
- Create 6 new language directories: awk, cpp, forth, lisp, objective-c, v
- Migrate all 42 un.* files to clients/*/sync/src/
- Convert root un.* files to symlinks pointing to clients/
- Add Makefiles for new languages

Files:
- clients/c/src/un.c: Full library API implementation
- clients/c/src/un.h: Image types and function declarations
- clients/c/tests/test_functional.c: API functional tests
- CLAUDE.md: Updated migration status
2026-01-17 00:11:53 -05:00
bf4417c914 modified: .gitignore
modified:   CLAUDE.md
	deleted:    __pycache__/un.cpython-312.pyc
	deleted:    __pycache__/un.cpython-313.pyc
	modified:   clients/c/src/un.c
	modified:   clients/java/sync/src/Un.java
	modified:   clients/javascript/sync/src/un.js
	modified:   clients/php/sync/src/un.php
	modified:   clients/ruby/async/src/un_async.rb
	modified:   clients/ruby/sync/src/un.rb
	modified:   clients/rust/async/Cargo.toml
	modified:   clients/rust/async/src/lib.rs
	new file:   clients/rust/async/src/main.rs
	modified:   clients/rust/sync/Cargo.toml
	modified:   clients/rust/sync/src/lib.rs
	new file:   clients/rust/sync/src/main.rs
	new file:   clients/swift/sync/src/un.swift
2026-01-15 19:05:53 -05:00
6d91e987ce feat: Full SDK implementations for 8 languages (sync + async)
Complete SDK implementations with full API surface:
- Python: sync/async with all 43 functions
- Go: sync/async with full API
- Java: sync/async with full API
- JavaScript: sync/async with full API
- PHP: sync/async with full API
- Ruby: sync/async with full API
- Rust: sync/async with full API

Added:
- clients/README.md - SDK overview
- clients/CLI_SPEC.md - CLI specification

Removed:
- un_deno.ts (moved to clients/typescript/)
2026-01-15 18:35:43 -05:00
1fda4110b1 feat(c): Full API surface with 43 functions (27 implemented, 16 stubbed)
C SDK now declares the complete API matching Python/Go/Java/etc:
- 8 Execution functions (stubbed - need JSON parsing)
- 9 Session functions (5 working: destroy/freeze/unfreeze/boost/unboost)
- 17 Service functions (11 working: all operations except list/get/execute)
- 8 Snapshot functions (6 working: all operations except list/get)
- 1 Key validation function (working)

Working functions call actual internal CLI code via wrappers.
Stubbed functions return NULL - they need JSON response parsing
which the CLI doesn't have (it prints to stdout).

Header includes complete struct definitions for all return types.
33 unit tests pass.
2026-01-15 18:26:53 -05:00
1880dba054 fix(c): Export library API, document SDK testing philosophy
C SDK changes:
- Add #include un.h when building as library
- Export library functions: version, detect_language, hmac_sign, health_check
- Add NULL safety checks to wrapper functions
- Rewrite tests to call ACTUAL exported functions (no more local re-implementations)
- Tests now verify real HMAC-SHA256 against known test vectors

Documentation:
- Add SDK Testing Philosophy to CLAUDE.md
- Create docs/TESTING.md with unit/integration/functional test definitions
- Document the THREE testing levels required for all SDKs
- Explicitly forbid mocking and local re-implementation in tests

33 unit tests pass, testing real exported functions.
2026-01-15 18:21:05 -05:00
ebdc590636 fix(c): Add library guard and fix Makefile for un.c
- Add #ifndef UNSANDBOX_LIBRARY around main() to allow library use
- Add CFLAGS_LIB with -DUNSANDBOX_LIBRARY for library compilation
- Add -lwebsockets to LDFLAGS for WebSocket support
- Build now compiles cleanly, tests pass (22/0)
2026-01-15 17:41:42 -05:00
9ab564da60 ci: Disable GitHub Actions workflow temporarily 2026-01-15 17:38:19 -05:00