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.50.0"
".": "0.51.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: 213
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/casemark/router-d877f8733c59535fe64ede3e403087094b7b62563cabd9f13b3cba08fc08a492.yml
openapi_spec_hash: 2f86e023964eb545ae8516a453e516e2
config_hash: a31ba9c8a6ed0f2b6739f6522213040e
configured_endpoints: 211
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/casemark/router-866cc91e422dbe530e40757e8548c78340d886c61bd6ab5cef81a742a141db2d.yml
openapi_spec_hash: 3ba7c949a852fc2787cc75fcf81bc16e
config_hash: 2726ecf6661ab60be4ece0848a240344
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.51.0 (2026-05-19)

Full Changelog: [v0.50.0...v0.51.0](https://github.com/CaseMark/casedev-php/compare/v0.50.0...v0.51.0)

### Features

* **api:** api update ([668ac21](https://github.com/CaseMark/casedev-php/commit/668ac219a78a17023c759f0f41325f3bbe8e9a23))

## 0.50.0 (2026-05-15)

Full Changelog: [v0.49.2...v0.50.0](https://github.com/CaseMark/casedev-php/compare/v0.49.2...v0.50.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The REST API documentation can be found on [docs.case.dev](https://docs.case.dev
<!-- x-release-please-start-version -->

```
composer require "casemark/casedev 0.50.0"
composer require "casemark/casedev 0.51.0"
```

<!-- x-release-please-end -->
Expand Down
121 changes: 121 additions & 0 deletions src/Agent/Skills/Namespaces/NamespaceCreateParams.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
<?php

declare(strict_types=1);

namespace CaseDev\Agent\Skills\Namespaces;

use CaseDev\Core\Attributes\Optional;
use CaseDev\Core\Attributes\Required;
use CaseDev\Core\Concerns\SdkModel;
use CaseDev\Core\Concerns\SdkParams;
use CaseDev\Core\Contracts\BaseModel;

/**
* Create a private skill namespace owned by the authenticated org and receive a one-time bearer token used by the case-skills publisher.
*
* @see CaseDev\Services\Agent\Skills\NamespacesService::create()
*
* @phpstan-type NamespaceCreateParamsShape = array{
* namespaceID: string,
* description?: string|null,
* label?: string|null,
* metadata?: mixed,
* }
*/
final class NamespaceCreateParams implements BaseModel
{
/** @use SdkModel<NamespaceCreateParamsShape> */
use SdkModel;
use SdkParams;

/**
* URL-safe slug, e.g. "curi" or "client-firm-abc". Lowercase alphanumeric with single hyphens, 2-64 chars.
*/
#[Required('namespaceId')]
public string $namespaceID;

#[Optional(nullable: true)]
public ?string $description;

#[Optional(nullable: true)]
public ?string $label;

#[Optional(nullable: true)]
public mixed $metadata;

/**
* `new NamespaceCreateParams()` is missing required properties by the API.
*
* To enforce required parameters use
* ```
* NamespaceCreateParams::with(namespaceID: ...)
* ```
*
* Otherwise ensure the following setters are called
*
* ```
* (new NamespaceCreateParams)->withNamespaceID(...)
* ```
*/
public function __construct()
{
$this->initialize();
}

/**
* Construct an instance from the required parameters.
*
* You must use named parameters to construct any parameters with a default value.
*/
public static function with(
string $namespaceID,
?string $description = null,
?string $label = null,
mixed $metadata = null,
): self {
$self = new self;

$self['namespaceID'] = $namespaceID;

null !== $description && $self['description'] = $description;
null !== $label && $self['label'] = $label;
null !== $metadata && $self['metadata'] = $metadata;

return $self;
}

/**
* URL-safe slug, e.g. "curi" or "client-firm-abc". Lowercase alphanumeric with single hyphens, 2-64 chars.
*/
public function withNamespaceID(string $namespaceID): self
{
$self = clone $this;
$self['namespaceID'] = $namespaceID;

return $self;
}

public function withDescription(?string $description): self
{
$self = clone $this;
$self['description'] = $description;

return $self;
}

public function withLabel(?string $label): self
{
$self = clone $this;
$self['label'] = $label;

return $self;
}

public function withMetadata(mixed $metadata): self
{
$self = clone $this;
$self['metadata'] = $metadata;

return $self;
}
}
77 changes: 77 additions & 0 deletions src/Agent/Skills/Namespaces/NamespacePublishParams.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?php

declare(strict_types=1);

namespace CaseDev\Agent\Skills\Namespaces;

use CaseDev\Agent\Skills\Namespaces\NamespacePublishParams\File;
use CaseDev\Core\Attributes\Required;
use CaseDev\Core\Concerns\SdkModel;
use CaseDev\Core\Concerns\SdkParams;
use CaseDev\Core\Contracts\BaseModel;

/**
* Upload a tree of skill files for the namespace. Authenticated by the namespace bearer token. Atomic at the version-bump level: a partial upload leaves the namespace pinned to the previous version.
*
* @see CaseDev\Services\Agent\Skills\NamespacesService::publish()
*
* @phpstan-import-type FileShape from \CaseDev\Agent\Skills\Namespaces\NamespacePublishParams\File
*
* @phpstan-type NamespacePublishParamsShape = array{files: list<File|FileShape>}
*/
final class NamespacePublishParams implements BaseModel
{
/** @use SdkModel<NamespacePublishParamsShape> */
use SdkModel;
use SdkParams;

/** @var list<File> $files */
#[Required(list: File::class)]
public array $files;

/**
* `new NamespacePublishParams()` is missing required properties by the API.
*
* To enforce required parameters use
* ```
* NamespacePublishParams::with(files: ...)
* ```
*
* Otherwise ensure the following setters are called
*
* ```
* (new NamespacePublishParams)->withFiles(...)
* ```
*/
public function __construct()
{
$this->initialize();
}

/**
* Construct an instance from the required parameters.
*
* You must use named parameters to construct any parameters with a default value.
*
* @param list<File|FileShape> $files
*/
public static function with(array $files): self
{
$self = new self;

$self['files'] = $files;

return $self;
}

/**
* @param list<File|FileShape> $files
*/
public function withFiles(array $files): self
{
$self = clone $this;
$self['files'] = $files;

return $self;
}
}
116 changes: 116 additions & 0 deletions src/Agent/Skills/Namespaces/NamespacePublishParams/File.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<?php

declare(strict_types=1);

namespace CaseDev\Agent\Skills\Namespaces\NamespacePublishParams;

use CaseDev\Agent\Skills\Namespaces\NamespacePublishParams\File\Encoding;
use CaseDev\Core\Attributes\Optional;
use CaseDev\Core\Attributes\Required;
use CaseDev\Core\Concerns\SdkModel;
use CaseDev\Core\Contracts\BaseModel;

/**
* @phpstan-type FileShape = array{
* content: string,
* encoding: Encoding|value-of<Encoding>,
* path: string,
* contentType?: string|null,
* }
*/
final class File implements BaseModel
{
/** @use SdkModel<FileShape> */
use SdkModel;

#[Required]
public string $content;

/** @var value-of<Encoding> $encoding */
#[Required(enum: Encoding::class)]
public string $encoding;

#[Required]
public string $path;

#[Optional(nullable: true)]
public ?string $contentType;

/**
* `new File()` is missing required properties by the API.
*
* To enforce required parameters use
* ```
* File::with(content: ..., encoding: ..., path: ...)
* ```
*
* Otherwise ensure the following setters are called
*
* ```
* (new File)->withContent(...)->withEncoding(...)->withPath(...)
* ```
*/
public function __construct()
{
$this->initialize();
}

/**
* Construct an instance from the required parameters.
*
* You must use named parameters to construct any parameters with a default value.
*
* @param Encoding|value-of<Encoding> $encoding
*/
public static function with(
string $content,
Encoding|string $encoding,
string $path,
?string $contentType = null,
): self {
$self = new self;

$self['content'] = $content;
$self['encoding'] = $encoding;
$self['path'] = $path;

null !== $contentType && $self['contentType'] = $contentType;

return $self;
}

public function withContent(string $content): self
{
$self = clone $this;
$self['content'] = $content;

return $self;
}

/**
* @param Encoding|value-of<Encoding> $encoding
*/
public function withEncoding(Encoding|string $encoding): self
{
$self = clone $this;
$self['encoding'] = $encoding;

return $self;
}

public function withPath(string $path): self
{
$self = clone $this;
$self['path'] = $path;

return $self;
}

public function withContentType(?string $contentType): self
{
$self = clone $this;
$self['contentType'] = $contentType;

return $self;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

declare(strict_types=1);

namespace CaseDev\Agent\Skills\Namespaces\NamespacePublishParams\File;

enum Encoding: string
{
case UTF8 = 'utf8';

case BASE64 = 'base64';
}
7 changes: 0 additions & 7 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
use CaseDev\Services\VaultService;
use CaseDev\Services\VoiceService;
use CaseDev\Services\WebhooksService;
use CaseDev\Services\WorkerService;
use Http\Discovery\Psr17FactoryDiscovery;
use Http\Discovery\Psr18ClientDiscovery;

Expand All @@ -49,11 +48,6 @@ class Client extends BaseClient
*/
public SystemService $system;

/**
* @api
*/
public WorkerService $worker;

/**
* @api
*/
Expand Down Expand Up @@ -202,7 +196,6 @@ public function __construct(

$this->agent = new AgentService($this);
$this->system = new SystemService($this);
$this->worker = new WorkerService($this);
$this->compute = new ComputeService($this);
$this->database = new DatabaseService($this);
$this->format = new FormatService($this);
Expand Down
Loading