@kokuin/oauth 0.1.1 → 0.7.1

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/README.md CHANGED
@@ -8,3 +8,11 @@ A true leaf package — depends only on `@sozai/runtime`, `@noble/hashes`, and
8
8
  `@sozai/codec`. It owns no application-specific concern (no DID/credential
9
9
  wrapping, no connector registry, no MCP resource discovery, no provider-specific
10
10
  authorization policy).
11
+
12
+ ## Named params migration
13
+
14
+ | Export | Named params type | Fields |
15
+ | --- | --- | --- |
16
+ | `new OAuthTokenError` | `OAuthTokenErrorParams` | `status, code?, description?` |
17
+
18
+ These signature and typing changes preserve cryptographic results, error causes, ordering and storage behaviour.
@@ -0,0 +1,6 @@
1
+ import type { OAuthBrokerTransport } from './types.js';
2
+ export type CreateHTTPBrokerTransportParams = {
3
+ baseURL: string;
4
+ fetch: typeof globalThis.fetch;
5
+ };
6
+ export declare function createHTTPBrokerTransport(params: CreateHTTPBrokerTransportParams): OAuthBrokerTransport;
package/lib/broker.js ADDED
@@ -0,0 +1,49 @@
1
+ import { fetchOAuthJSON } from './http.js';
2
+ export function createHTTPBrokerTransport(params) {
3
+ const baseURL = params.baseURL.replace(/\/+$/, '');
4
+ const runtime = {
5
+ fetch: params.fetch
6
+ };
7
+ return {
8
+ async authorize ({ provider, appRedirect, codeChallenge, scopes, authorizationParams, ...options }) {
9
+ const raw = await fetchOAuthJSON({
10
+ runtime,
11
+ url: `${baseURL}/oauth/${encodeURIComponent(provider)}/authorize`,
12
+ body: JSON.stringify({
13
+ appRedirect,
14
+ codeChallenge,
15
+ scopes,
16
+ authorizationParams
17
+ }),
18
+ contentType: 'application/json',
19
+ ...options
20
+ });
21
+ return validateBrokerAuthorizeResult(raw);
22
+ },
23
+ token ({ provider, body, ...options }) {
24
+ return fetchOAuthJSON({
25
+ runtime,
26
+ url: `${baseURL}/oauth/${encodeURIComponent(provider)}/token`,
27
+ body: JSON.stringify(body),
28
+ contentType: 'application/json',
29
+ ...options
30
+ });
31
+ }
32
+ };
33
+ }
34
+ function validateBrokerAuthorizeResult(value) {
35
+ if (typeof value !== 'object' || value === null) {
36
+ throw new Error('OAuth broker authorization response was not an object');
37
+ }
38
+ const record = value;
39
+ for (const key of [
40
+ 'url',
41
+ 'state',
42
+ 'transactionToken'
43
+ ]){
44
+ if (typeof record[key] !== 'string' || record[key].length === 0) {
45
+ throw new Error(`OAuth broker authorization response has an invalid ${key}`);
46
+ }
47
+ }
48
+ return value;
49
+ }
@@ -0,0 +1,21 @@
1
+ import type { Runtime } from '@sozai/runtime';
2
+ import { type OAuthProviderDefinition, type RequestOptions, type TokenResponse } from './types.js';
3
+ export type DeviceAuthorization = {
4
+ deviceCode: string;
5
+ userCode: string;
6
+ verificationURI: string;
7
+ verificationURIComplete?: string;
8
+ expiresAt: number;
9
+ intervalMS: number;
10
+ };
11
+ export declare function startDeviceAuthorization(params: {
12
+ definition: OAuthProviderDefinition;
13
+ runtime: Runtime;
14
+ scopes: Array<string>;
15
+ } & RequestOptions): Promise<DeviceAuthorization>;
16
+ export declare function pollDeviceToken(params: {
17
+ definition: OAuthProviderDefinition;
18
+ runtime: Runtime;
19
+ authorization: DeviceAuthorization;
20
+ sleep?: (ms: number) => Promise<void>;
21
+ } & RequestOptions): Promise<TokenResponse>;
package/lib/device.js ADDED
@@ -0,0 +1,140 @@
1
+ import { validateTokenResponse } from './exchange.js';
2
+ import { fetchOAuthJSON } from './http.js';
3
+ import { OAuthTokenError } from './types.js';
4
+ export async function startDeviceAuthorization(params) {
5
+ const { definition, runtime, scopes, signal, timeoutMs, maxBytes } = params;
6
+ if (!definition.deviceAuthorizationEndpoint) {
7
+ throw new Error('OAuth definition requires a deviceAuthorizationEndpoint');
8
+ }
9
+ const form = new URLSearchParams({
10
+ client_id: definition.clientID,
11
+ scope: scopes.join(' ')
12
+ });
13
+ const raw = await fetchDeviceJSON({
14
+ runtime,
15
+ url: definition.deviceAuthorizationEndpoint,
16
+ body: form.toString(),
17
+ contentType: 'application/x-www-form-urlencoded',
18
+ signal,
19
+ timeoutMs,
20
+ maxBytes
21
+ });
22
+ if (typeof raw !== 'object' || raw === null) {
23
+ throw new Error('OAuth device authorization response was not an object');
24
+ }
25
+ const record = raw;
26
+ const deviceCode = requiredString(record, 'device_code');
27
+ const userCode = requiredString(record, 'user_code');
28
+ const verificationURI = requiredString(record, 'verification_uri');
29
+ const expiresIn = positiveNumber(record.expires_in, 'expires_in');
30
+ const interval = positiveNumber(record.interval === undefined ? 5 : record.interval, 'interval');
31
+ const verificationURIComplete = record.verification_uri_complete === undefined ? undefined : requiredString(record, 'verification_uri_complete');
32
+ return {
33
+ deviceCode,
34
+ userCode,
35
+ verificationURI,
36
+ ...verificationURIComplete === undefined ? {} : {
37
+ verificationURIComplete
38
+ },
39
+ expiresAt: Date.now() + expiresIn * 1000,
40
+ intervalMS: interval * 1000
41
+ };
42
+ }
43
+ export async function pollDeviceToken(params) {
44
+ const { definition, runtime, authorization, signal, sleep, timeoutMs, maxBytes } = params;
45
+ const form = new URLSearchParams({
46
+ grant_type: 'urn:ietf:params:oauth:grant-type:device_code',
47
+ device_code: authorization.deviceCode,
48
+ client_id: definition.clientID
49
+ });
50
+ let intervalMS = authorization.intervalMS;
51
+ for(;;){
52
+ signal?.throwIfAborted();
53
+ if (Date.now() >= authorization.expiresAt) {
54
+ throw new OAuthTokenError({
55
+ status: 400,
56
+ code: 'expired_token'
57
+ });
58
+ }
59
+ try {
60
+ const raw = await fetchDeviceJSON({
61
+ runtime,
62
+ url: definition.tokenEndpoint,
63
+ body: form.toString(),
64
+ contentType: 'application/x-www-form-urlencoded',
65
+ signal,
66
+ timeoutMs,
67
+ maxBytes
68
+ });
69
+ signal?.throwIfAborted();
70
+ return validateTokenResponse(raw);
71
+ } catch (error) {
72
+ if (!(error instanceof OAuthTokenError)) throw error;
73
+ if (error.code === 'slow_down') {
74
+ intervalMS += 5000;
75
+ } else if (error.code !== 'authorization_pending') {
76
+ throw error;
77
+ }
78
+ }
79
+ await wait(Math.min(intervalMS, Math.max(0, authorization.expiresAt - Date.now())), sleep, signal);
80
+ }
81
+ }
82
+ async function fetchDeviceJSON(params) {
83
+ const raw = await fetchOAuthJSON(params);
84
+ // Some providers return OAuth errors with HTTP 200.
85
+ if (typeof raw === 'object' && raw !== null) {
86
+ const record = raw;
87
+ if (typeof record.error === 'string') {
88
+ throw new OAuthTokenError({
89
+ status: 200,
90
+ code: record.error,
91
+ description: typeof record.error_description === 'string' ? record.error_description : undefined
92
+ });
93
+ }
94
+ }
95
+ return raw;
96
+ }
97
+ function requiredString(record, key) {
98
+ const value = record[key];
99
+ if (typeof value !== 'string' || value.length === 0) {
100
+ throw new Error(`OAuth device authorization response has an invalid ${key}`);
101
+ }
102
+ return value;
103
+ }
104
+ function positiveNumber(value, key) {
105
+ if (typeof value !== 'number' || !Number.isFinite(value) || value <= 0) {
106
+ throw new Error(`OAuth device authorization response has an invalid ${key}`);
107
+ }
108
+ return value;
109
+ }
110
+ function wait(ms, sleep, signal) {
111
+ signal?.throwIfAborted();
112
+ return new Promise((resolve, reject)=>{
113
+ let timer;
114
+ const cleanup = ()=>{
115
+ clearTimeout(timer);
116
+ signal?.removeEventListener('abort', abort);
117
+ };
118
+ const abort = ()=>{
119
+ cleanup();
120
+ reject(signal?.reason);
121
+ };
122
+ signal?.addEventListener('abort', abort, {
123
+ once: true
124
+ });
125
+ if (sleep) {
126
+ Promise.resolve().then(()=>sleep(ms)).then(()=>{
127
+ cleanup();
128
+ resolve();
129
+ }, (error)=>{
130
+ cleanup();
131
+ reject(error);
132
+ });
133
+ } else {
134
+ timer = setTimeout(()=>{
135
+ cleanup();
136
+ resolve();
137
+ }, ms);
138
+ }
139
+ });
140
+ }
package/lib/exchange.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Runtime } from '@sozai/runtime';
2
- import type { OAuthProviderDefinition, RequestOptions, TokenResponse } from './types.js';
2
+ import type { OAuthBrokerTransport, OAuthProviderDefinition, RequestOptions, TokenResponse } from './types.js';
3
3
  export declare function exchangeCode(params: {
4
4
  definition: OAuthProviderDefinition;
5
5
  runtime: Runtime;
@@ -7,8 +7,11 @@ export declare function exchangeCode(params: {
7
7
  redirectURL: string;
8
8
  codeVerifier: string;
9
9
  } & RequestOptions): Promise<TokenResponse>;
10
- export declare function refreshToken(params: {
10
+ export type RefreshTokenParams = {
11
11
  definition: OAuthProviderDefinition;
12
12
  runtime: Runtime;
13
13
  refreshToken: string;
14
- } & RequestOptions): Promise<TokenResponse>;
14
+ broker?: OAuthBrokerTransport;
15
+ } & RequestOptions;
16
+ export declare function refreshToken(params: RefreshTokenParams): Promise<TokenResponse>;
17
+ export declare function validateTokenResponse(value: unknown): TokenResponse;
package/lib/exchange.js CHANGED
@@ -26,9 +26,22 @@ export async function exchangeCode(params) {
26
26
  return validateTokenResponse(raw);
27
27
  }
28
28
  export async function refreshToken(params) {
29
- const { definition, runtime, refreshToken, signal, timeoutMs, maxBytes } = params;
29
+ const { definition, runtime, refreshToken, signal, timeoutMs, maxBytes, broker } = params;
30
30
  if (definition.mode === 'broker') {
31
- throw new Error('broker token refresh is not implemented');
31
+ if (!broker) {
32
+ throw new Error('broker mode requires a broker transport');
33
+ }
34
+ const raw = await broker.token({
35
+ provider: definition.name,
36
+ body: {
37
+ grant_type: 'refresh_token',
38
+ refresh_token: refreshToken
39
+ },
40
+ signal,
41
+ timeoutMs,
42
+ maxBytes
43
+ });
44
+ return validateTokenResponse(raw);
32
45
  }
33
46
  assertExchangeableConfig(definition);
34
47
  const form = new URLSearchParams();
@@ -62,7 +75,7 @@ function assertExchangeableConfig(definition) {
62
75
  }
63
76
  }
64
77
  }
65
- function validateTokenResponse(value) {
78
+ export function validateTokenResponse(value) {
66
79
  if (typeof value !== 'object' || value === null) {
67
80
  throw new Error('OAuth token response was not an object');
68
81
  }
package/lib/http.js CHANGED
@@ -48,7 +48,11 @@ function parseOAuthError(status, text) {
48
48
  } catch {
49
49
  // non-JSON / empty error body → code undefined (treated as transient by callers)
50
50
  }
51
- return new OAuthTokenError(status, code, description);
51
+ return new OAuthTokenError({
52
+ status,
53
+ code,
54
+ description
55
+ });
52
56
  }
53
57
  async function readCappedText(response, maxBytes) {
54
58
  const reader = response.body?.getReader();
package/lib/index.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  export { buildAuthorizationURL } from './authorization.js';
2
- export { exchangeCode, refreshToken } from './exchange.js';
2
+ export { type CreateHTTPBrokerTransportParams, createHTTPBrokerTransport } from './broker.js';
3
+ export { type DeviceAuthorization, pollDeviceToken, startDeviceAuthorization } from './device.js';
4
+ export { exchangeCode, type RefreshTokenParams, refreshToken } from './exchange.js';
3
5
  export { type FetchOAuthJSONParams, fetchOAuthJSON } from './http.js';
4
- export { completeAuthorization, createMemoryPendingAuthStore, DEFAULT_TTL_MS, type PendingAuthRecord, type PendingAuthStore, startAuthorization, } from './pending-auth.js';
6
+ export { type CompleteAuthorizationParams, completeAuthorization, createMemoryPendingAuthStore, DEFAULT_TTL_MS, type PendingAuthRecord, type PendingAuthStore, type StartAuthorizationParams, startAuthorization, } from './pending-auth.js';
5
7
  export { deriveCodeChallenge, generateCodeVerifier, generateState } from './pkce.js';
6
- export { type OAuthClientMode, type OAuthErrorCode, type OAuthProviderDefinition, OAuthTokenError, type RequestOptions, type TokenResponse, } from './types.js';
8
+ export type { OAuthTokenErrorParams } from './types.js';
9
+ export { type BrokerAuthorizeParams, type BrokerAuthorizeResult, type BrokerTokenParams, type OAuthBrokerTransport, type OAuthClientMode, type OAuthErrorCode, type OAuthProviderDefinition, OAuthTokenError, type RequestOptions, type TokenResponse, } from './types.js';
package/lib/index.js CHANGED
@@ -1,4 +1,6 @@
1
1
  export { buildAuthorizationURL } from './authorization.js';
2
+ export { createHTTPBrokerTransport } from './broker.js';
3
+ export { pollDeviceToken, startDeviceAuthorization } from './device.js';
2
4
  export { exchangeCode, refreshToken } from './exchange.js';
3
5
  export { fetchOAuthJSON } from './http.js';
4
6
  export { completeAuthorization, createMemoryPendingAuthStore, DEFAULT_TTL_MS, startAuthorization } from './pending-auth.js';
@@ -1,8 +1,9 @@
1
1
  import type { Runtime } from '@sozai/runtime';
2
- import type { OAuthProviderDefinition, RequestOptions, TokenResponse } from './types.js';
2
+ import type { OAuthBrokerTransport, OAuthProviderDefinition, RequestOptions, TokenResponse } from './types.js';
3
3
  export type PendingAuthRecord<TExtra> = {
4
4
  state: string;
5
5
  codeVerifier: string;
6
+ transactionToken?: string;
6
7
  provider: string;
7
8
  redirectURL: string;
8
9
  scopes: Array<string>;
@@ -18,7 +19,7 @@ export type PendingAuthStore<TExtra> = {
18
19
  };
19
20
  export declare const DEFAULT_TTL_MS: number;
20
21
  export declare function createMemoryPendingAuthStore<TExtra>(): PendingAuthStore<TExtra>;
21
- export declare function startAuthorization<TExtra>(params: {
22
+ export type StartAuthorizationParams<TExtra> = {
22
23
  runtime: Runtime;
23
24
  definition: OAuthProviderDefinition;
24
25
  store: PendingAuthStore<TExtra>;
@@ -27,18 +28,22 @@ export declare function startAuthorization<TExtra>(params: {
27
28
  extra: TExtra;
28
29
  ttlMs?: number;
29
30
  authorizationParams?: Record<string, string>;
30
- }): Promise<{
31
+ broker?: OAuthBrokerTransport;
32
+ } & RequestOptions;
33
+ export declare function startAuthorization<TExtra>(params: StartAuthorizationParams<TExtra>): Promise<{
31
34
  url: string;
32
35
  state: string;
33
36
  }>;
34
- export declare function completeAuthorization<TExtra>(params: {
37
+ export type CompleteAuthorizationParams<TExtra> = {
35
38
  runtime: Runtime;
36
39
  definition: OAuthProviderDefinition;
37
40
  store: PendingAuthStore<TExtra>;
38
41
  state: string;
39
42
  code: string;
40
43
  redirectURL: string;
41
- } & RequestOptions): Promise<{
44
+ broker?: OAuthBrokerTransport;
45
+ } & RequestOptions;
46
+ export declare function completeAuthorization<TExtra>(params: CompleteAuthorizationParams<TExtra>): Promise<{
42
47
  tokens: TokenResponse;
43
48
  record: PendingAuthRecord<TExtra>;
44
49
  }>;
@@ -1,5 +1,5 @@
1
1
  import { buildAuthorizationURL } from './authorization.js';
2
- import { exchangeCode } from './exchange.js';
2
+ import { exchangeCode, validateTokenResponse } from './exchange.js';
3
3
  import { deriveCodeChallenge, generateCodeVerifier, generateState } from './pkce.js';
4
4
  export const DEFAULT_TTL_MS = 10 * 60 * 1000;
5
5
  export function createMemoryPendingAuthStore() {
@@ -29,7 +29,10 @@ export function createMemoryPendingAuthStore() {
29
29
  };
30
30
  }
31
31
  export async function startAuthorization(params) {
32
- const { runtime, definition, store, redirectURL, scopes, extra, authorizationParams } = params;
32
+ const { runtime, definition, store, redirectURL, scopes, extra, authorizationParams, broker } = params;
33
+ if (definition.mode === 'broker' && !broker) {
34
+ throw new Error('broker mode requires a broker transport');
35
+ }
33
36
  const ttlMs = params.ttlMs ?? DEFAULT_TTL_MS;
34
37
  const now = Date.now();
35
38
  const expiresAt = now + ttlMs;
@@ -38,22 +41,43 @@ export async function startAuthorization(params) {
38
41
  } catch {
39
42
  // best-effort cleanup: a sweep failure must not block starting a new flow
40
43
  }
41
- const state = generateState(runtime);
42
44
  const codeVerifier = generateCodeVerifier(runtime);
43
45
  const codeChallenge = deriveCodeChallenge(codeVerifier);
44
- // build (and thereby validate the authorization endpoint, fix #4) BEFORE create,
45
- // so a bad endpoint does not leave a stale pending record
46
- const url = buildAuthorizationURL({
47
- definition,
48
- redirectURL,
49
- scopes,
50
- state,
51
- codeChallenge,
52
- authorizationParams
53
- });
46
+ let state;
47
+ let url;
48
+ let transactionToken;
49
+ if (definition.mode === 'broker' && broker) {
50
+ const authorization = await broker.authorize({
51
+ provider: definition.name,
52
+ appRedirect: redirectURL,
53
+ codeChallenge,
54
+ scopes,
55
+ authorizationParams,
56
+ signal: params.signal,
57
+ timeoutMs: params.timeoutMs,
58
+ maxBytes: params.maxBytes
59
+ });
60
+ state = authorization.state;
61
+ url = authorization.url;
62
+ transactionToken = authorization.transactionToken;
63
+ } else {
64
+ state = generateState(runtime);
65
+ // Validate the endpoint before persisting a pending flow.
66
+ url = buildAuthorizationURL({
67
+ definition,
68
+ redirectURL,
69
+ scopes,
70
+ state,
71
+ codeChallenge,
72
+ authorizationParams
73
+ });
74
+ }
54
75
  await store.create({
55
76
  state,
56
77
  codeVerifier,
78
+ ...transactionToken === undefined ? {} : {
79
+ transactionToken
80
+ },
57
81
  provider: definition.name,
58
82
  redirectURL,
59
83
  scopes,
@@ -67,7 +91,10 @@ export async function startAuthorization(params) {
67
91
  };
68
92
  }
69
93
  export async function completeAuthorization(params) {
70
- const { runtime, definition, store, state, code, redirectURL, signal, timeoutMs, maxBytes } = params;
94
+ const { runtime, definition, store, state, code, redirectURL, signal, timeoutMs, maxBytes, broker } = params;
95
+ if (definition.mode === 'broker' && !broker) {
96
+ throw new Error('broker mode requires a broker transport');
97
+ }
71
98
  const record = await store.consume(state);
72
99
  if (record == null) {
73
100
  throw new Error('unknown or already-used authorization state');
@@ -81,6 +108,28 @@ export async function completeAuthorization(params) {
81
108
  if (record.redirectURL !== redirectURL) {
82
109
  throw new Error('redirect URI mismatch');
83
110
  }
111
+ if (definition.mode === 'broker' && broker) {
112
+ if (!record.transactionToken) {
113
+ throw new Error('broker authorization requires a transactionToken');
114
+ }
115
+ const raw = await broker.token({
116
+ provider: definition.name,
117
+ body: {
118
+ grant_type: 'authorization_code',
119
+ code,
120
+ code_verifier: record.codeVerifier,
121
+ transactionToken: record.transactionToken,
122
+ state
123
+ },
124
+ signal,
125
+ timeoutMs,
126
+ maxBytes
127
+ });
128
+ return {
129
+ tokens: validateTokenResponse(raw),
130
+ record
131
+ };
132
+ }
84
133
  const tokens = await exchangeCode({
85
134
  definition,
86
135
  runtime,
package/lib/types.d.ts CHANGED
@@ -1,3 +1,8 @@
1
+ export type OAuthTokenErrorParams = {
2
+ status: number;
3
+ code?: OAuthErrorCode;
4
+ description?: string;
5
+ };
1
6
  export type OAuthClientMode = {
2
7
  mode: 'confidential';
3
8
  clientID: string;
@@ -14,6 +19,7 @@ export type OAuthProviderDefinition = {
14
19
  name: string;
15
20
  authorizationEndpoint: string;
16
21
  tokenEndpoint: string;
22
+ deviceAuthorizationEndpoint?: string;
17
23
  baseScopes?: Array<string>;
18
24
  } & OAuthClientMode;
19
25
  export type TokenResponse = {
@@ -35,10 +41,30 @@ export declare class OAuthTokenError extends Error {
35
41
  status: number;
36
42
  code?: OAuthErrorCode;
37
43
  description?: string;
38
- constructor(status: number, code?: OAuthErrorCode, description?: string);
44
+ constructor({ status, code, description }: OAuthTokenErrorParams);
39
45
  }
40
46
  export type RequestOptions = {
41
47
  signal?: AbortSignal;
42
48
  timeoutMs?: number;
43
49
  maxBytes?: number;
44
50
  };
51
+ export type BrokerAuthorizeParams = {
52
+ provider: string;
53
+ appRedirect: string;
54
+ codeChallenge?: string;
55
+ scopes?: Array<string>;
56
+ authorizationParams?: Record<string, string>;
57
+ } & RequestOptions;
58
+ export type BrokerAuthorizeResult = {
59
+ url: string;
60
+ state: string;
61
+ transactionToken: string;
62
+ };
63
+ export type BrokerTokenParams = {
64
+ provider: string;
65
+ body: Record<string, string>;
66
+ } & RequestOptions;
67
+ export type OAuthBrokerTransport = {
68
+ authorize(params: BrokerAuthorizeParams): Promise<BrokerAuthorizeResult>;
69
+ token(params: BrokerTokenParams): Promise<unknown>;
70
+ };
package/lib/types.js CHANGED
@@ -2,7 +2,7 @@ export class OAuthTokenError extends Error {
2
2
  status;
3
3
  code;
4
4
  description;
5
- constructor(status, code, description){
5
+ constructor({ status, code, description }){
6
6
  super(description ?? code ?? `OAuth token request failed with status ${status}`);
7
7
  this.name = 'OAuthTokenError';
8
8
  this.status = status;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kokuin/oauth",
3
- "version": "0.1.1",
3
+ "version": "0.7.1",
4
4
  "description": "Generic OAuth 2.0 client primitives for kokuin",
5
5
  "keywords": [
6
6
  "oauth",
@@ -25,7 +25,7 @@
25
25
  ],
26
26
  "dependencies": {
27
27
  "@noble/hashes": "^2.4.0",
28
- "@sozai/codec": "^0.4.0",
28
+ "@sozai/codec": "^0.4.4",
29
29
  "@sozai/runtime": "^0.1.0"
30
30
  },
31
31
  "publishConfig": {