@itphx/synth-sdk 0.10.0 → 0.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.d.ts CHANGED
@@ -11,7 +11,7 @@ export interface SynthClientOptions {
11
11
  token?: string;
12
12
  /** API-ключ инстанса (`SYNTH_API_KEY`). */
13
13
  apiKey?: string;
14
- /** Scoped service-key `synth_svc_…` (AD-052). */
14
+ /** Scoped service-key `synth_svc_…` (ADR-052). */
15
15
  serviceKey?: string;
16
16
  /** Инъекция fetch (тесты/нестандартные рантаймы); по умолчанию — глобальный `fetch`. */
17
17
  fetch?: typeof fetch;
@@ -30,7 +30,7 @@ export interface EventJournalParams {
30
30
  export interface ScheduleJobsParams {
31
31
  limit?: number;
32
32
  }
33
- /** Namespace `events` (AD-089). */
33
+ /** Namespace `events` (ADR-089). */
34
34
  export interface EventsNamespace {
35
35
  /** Приём внешнего события (`POST /events`). */
36
36
  ingest(body: EventIngestRequest): Promise<EventIngestResponse>;
@@ -66,7 +66,7 @@ export interface SessionsNamespace {
66
66
  messages(id: string): Promise<SessionMessagesResponse>;
67
67
  status(id: string): Promise<SessionStatusResponse>;
68
68
  }
69
- /** Namespace `schedules` (AD-051). */
69
+ /** Namespace `schedules` (ADR-051). */
70
70
  export interface SchedulesNamespace {
71
71
  list(): Promise<Schedule[]>;
72
72
  create(body: ScheduleInput): Promise<Schedule>;
@@ -75,7 +75,7 @@ export interface SchedulesNamespace {
75
75
  run(id: string): Promise<Schedule>;
76
76
  jobs(id: string, params?: ScheduleJobsParams): Promise<ScheduleJob[]>;
77
77
  }
78
- /** Namespace `llm` (OpenAI-совместимый прокси, AD-036). */
78
+ /** Namespace `llm` (OpenAI-совместимый прокси, ADR-036). */
79
79
  export interface LlmNamespace {
80
80
  chatCompletions(body: ChatCompletionsRequest): Promise<ChatCompletionsResponse>;
81
81
  }
package/dist/client.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @itphx/synth-sdk — типизированный клиент публичного API Synth (AD-052).
2
+ * @itphx/synth-sdk — типизированный клиент публичного API Synth (ADR-052).
3
3
  *
4
4
  * Runtime-agnostic: использует глобальный `fetch` (инъекция — для тестов и
5
5
  * кастомных рантаймов), ESM-only, без Node-only импортов на верхнем уровне.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @itphx/synth-sdk — типизированный клиент публичного API Synth (AD-052).
2
+ * @itphx/synth-sdk — типизированный клиент публичного API Synth (ADR-052).
3
3
  *
4
4
  * @example
5
5
  * ```ts
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @itphx/synth-sdk — типизированный клиент публичного API Synth (AD-052).
2
+ * @itphx/synth-sdk — типизированный клиент публичного API Synth (ADR-052).
3
3
  *
4
4
  * @example
5
5
  * ```ts
package/dist/types.d.ts CHANGED
@@ -10,10 +10,8 @@
10
10
  import type { EventBinding, EventBindingApiKey, EventBindingApiKeyCreated, EventRouteRule, RouteDecision, Schedule, ScheduleJob, SynthEvent } from '@itphx/synth-shared/types';
11
11
  import type { EventBindingApiKeyCreateRequest, EventBindingApiKeyUpdateRequest, EventBindingInputRequest, EventIngestRequest, EventRouteRuleUpsertRequest, PromptRequest, ScheduleInputRequest, SessionCreateRequest, SessionUpdateRequest } from '@itphx/synth-shared/schemas';
12
12
  export type { EventBinding, EventBindingApiKey, EventBindingApiKeyCreateRequest, EventBindingApiKeyCreated, EventBindingApiKeyUpdateRequest, EventBindingInputRequest, EventIngestRequest, EventRouteRule, EventRouteRuleUpsertRequest, PromptRequest, RouteDecision, Schedule, ScheduleInputRequest, ScheduleJob, SessionCreateRequest, SessionUpdateRequest, SynthEvent, };
13
- /** Тело `POST /sessions` — `engine` имеет серверный default, необязателен. */
14
- export type SessionCreateInput = Omit<SessionCreateRequest, 'engine'> & {
15
- engine?: SessionCreateRequest['engine'];
16
- };
13
+ /** Тело `POST /sessions` — публичный контракт `SessionCreateRequest` из shared. */
14
+ export type SessionCreateInput = SessionCreateRequest;
17
15
  /**
18
16
  * Тело `PATCH /sessions/:id` — публичный контракт `SessionPatch` из
19
17
  * `public-openapi.ts`: shared-`SessionUpdateRequest` + `title`/`mode`/`project_id`.
@@ -31,7 +29,7 @@ export type SessionPromptInput = Omit<PromptRequest, 'stream'> & {
31
29
  export type ScheduleInput = Omit<ScheduleInputRequest, 'enabled'> & {
32
30
  enabled?: boolean;
33
31
  };
34
- /** Одноразовый claim-код неизвестного отправителя (AD-089 claim-flow). */
32
+ /** Одноразовый claim-код неизвестного отправителя (ADR-089 claim-flow). */
35
33
  export interface EventIdentityHint {
36
34
  code: string;
37
35
  expiresAt: string;
@@ -71,7 +69,6 @@ export interface SerializedSession {
71
69
  user_id?: string | null;
72
70
  owner_id?: string | null;
73
71
  project_id?: string | null;
74
- engine: 'synth' | 'opencode' | 'cline' | string;
75
72
  messages?: unknown[];
76
73
  pending_messages?: unknown[];
77
74
  pending_count?: number;
@@ -91,7 +88,6 @@ export interface SerializedSession {
91
88
  export interface SessionMessagesResponse {
92
89
  messages: unknown[];
93
90
  session_id: string;
94
- engine: string;
95
91
  }
96
92
  /** Ответ `GET /sessions/:id/status`. */
97
93
  export interface SessionStatusResponse {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@itphx/synth-sdk",
3
- "version": "0.10.0",
4
- "description": "Типизированный клиент публичного API Synth (AD-052)",
3
+ "version": "0.11.3",
4
+ "description": "Типизированный клиент публичного API Synth (ADR-052)",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",
@@ -16,7 +16,7 @@
16
16
  }
17
17
  },
18
18
  "dependencies": {
19
- "@itphx/synth-shared": "0.10.0"
19
+ "@itphx/synth-shared": "0.11.3"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/node": "^22.0.0",
@@ -37,7 +37,7 @@
37
37
  "build": "rm -rf dist && tsc -p tsconfig.build.json",
38
38
  "typecheck": "tsc --noEmit",
39
39
  "lint": "eslint src/",
40
- "test": "vitest run --passWithNoTests",
40
+ "test": "vitest run",
41
41
  "test:watch": "vitest",
42
42
  "clean": "rm -rf dist"
43
43
  }