@werft-ai/sdk 0.1.1 → 0.1.2
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 +3 -3
- package/index.d.ts +2 -2
- package/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,9 +34,9 @@ console.log(turn.status);
|
|
|
34
34
|
|
|
35
35
|
`bun scripts/sdk-pack-smoke.ts`는 배포본을 `npm pack`한 tarball을 빈 디렉터리에 `npm install`하고, `skipLibCheck` 없이 타입 검사한 뒤, [examples/sdk-approver](https://github.com/JeongJaeSoon/werft/blob/main/examples/sdk-approver/src/session-close.ts) 샘플을 Node로 가짜 API에 대고 돌린다.
|
|
36
36
|
|
|
37
|
-
배포는 [.github/workflows/sdk-release.yml](https://github.com/JeongJaeSoon/werft/blob/main/.github/workflows/sdk-release.yml)이 한다. pull request와 수동 실행은 빌드·검사·pack까지만 하는 dry run이다. main에 있는 커밋에 `sdk-v<버전>` 태그를 push하면, `release` environment 승인 뒤 `npm publish --provenance --access public`으로 그 tarball을 올린다. 실패한 배포는 그 태그의 실행을 다시 돌린다.
|
|
37
|
+
배포는 [.github/workflows/sdk-release.yml](https://github.com/JeongJaeSoon/werft/blob/main/.github/workflows/sdk-release.yml)이 한다. pull request와 수동 실행은 빌드·검사·pack까지만 하는 dry run이다. main에 있는 커밋에 `sdk-v<버전>` 태그를 push하면, `release` environment 승인 뒤 `npm publish --provenance --access public`으로 그 tarball을 올린다. 토큰 없이 [npm trusted publishing](https://docs.npmjs.com/trusted-publishers/)의 OIDC로 인증한다. 실패한 배포는 그 태그의 실행을 다시 돌린다. 버전은 `package.json`의 `version`과 `src/version.ts`의 `SDK_VERSION`을 함께 올린다. `tests/sdk-release.test.ts`가 이 게이트를 검사한다.
|
|
38
38
|
|
|
39
|
-
게시 전에 사람이 다음을 준비해 둔다. 둘 중 하나라도 없으면 태그의 `publish`가 environment에서 거부되거나
|
|
39
|
+
게시 전에 사람이 다음을 준비해 둔다. 둘 중 하나라도 없으면 태그의 `publish`가 environment에서 거부되거나 npm 인증 오류로 실패한다.
|
|
40
40
|
|
|
41
41
|
1. `release` environment의 배포 정책에 태그 패턴 `sdk-v*`를 둔다. `v*`는 `sdk-v<버전>`에 맞지 않는다.
|
|
42
|
-
2.
|
|
42
|
+
2. npmjs.com의 패키지 설정에 trusted publisher를 등록한다. 값은 GitHub Actions, 저장소 `JeongJaeSoon/werft`, workflow `sdk-release.yml`, environment `release`이고 `Allow npm publish`를 켠다. 값은 대소문자까지 정확히 맞아야 하고, `package.json`의 `repository.url`도 이 저장소와 일치해야 한다. 새 등록은 2일 안에 첫 게시가 성공해야 한다. 그 안에 게시하지 못하면 만료되므로 지우고 다시 만든다. 등록은 고칠 수 없어서 workflow 파일이나 environment, 저장소 이름이 바뀌어도 다시 만든다.
|
package/index.d.ts
CHANGED
|
@@ -2757,7 +2757,7 @@ interface paths {
|
|
|
2757
2757
|
put?: never;
|
|
2758
2758
|
/**
|
|
2759
2759
|
* Slack's Events API request URL for one agent's app
|
|
2760
|
-
* @description Called by Slack, not by people: each agent app's event subscription points here (Finalize registers it when SLACK_EVENTS_PUBLIC_URL is set). The body is read up to 256 KiB (413 above that), then checked in this order: the `v0` signature (`X-Slack-Signature`) over the raw bytes with the app's signing secret, the `X-Slack-Request-Timestamp` within 300 seconds, then the JSON. An unknown agent, an agent without a created app, an app without a signing secret, a wrong, missing or stale signature all answer the same 401. A signed `url_verification` answers its `challenge`. An `event_callback` is stored once per `(team_id, event_id)`, so Slack's retries (`X-Slack-Retry-Num`) answer 200 without a second row; one for another app or team than the agent's install, from a bot, or of a message subtype other than `thread_broadcast`, is stored as dropped with its reason. `app_uninstalled` and `tokens_revoked` mark the install revoked. Any other envelope type answers 200 and is ignored. A failed write answers 5xx so Slack sends the event again. Rate limited per agent and overall before any database read (429).
|
|
2760
|
+
* @description Called by Slack, not by people: each agent app's event subscription points here (Finalize registers it when SLACK_EVENTS_PUBLIC_URL is set). The body is read up to 256 KiB (413 above that), then checked in this order: the `v0` signature (`X-Slack-Signature`) over the raw bytes with the app's signing secret, the `X-Slack-Request-Timestamp` within 300 seconds, then the JSON. An unknown agent, an agent without a created app, an app without a signing secret, a wrong, missing or stale signature all answer the same 401. A signed `url_verification` answers its `challenge`. An `event_callback` is stored once per `(team_id, event_id)`, so Slack's retries (`X-Slack-Retry-Num`) answer 200 without a second row; one for another app or team than the agent's install, from a bot, or of a message subtype other than `thread_broadcast`, is stored as dropped with its reason. `app_uninstalled` and `tokens_revoked` mark the install revoked and revoke the agent's identity on it, so the console shows the app as needing a reinstall; a repeat or an event sent before a reinstall changes nothing. Any other envelope type answers 200 and is ignored. A failed write answers 5xx so Slack sends the event again. Rate limited per agent and overall before any database read (429).
|
|
2761
2761
|
*
|
|
2762
2762
|
* **Auth:** public; no credential. **Idempotency-Key:** ignored.
|
|
2763
2763
|
*/
|
|
@@ -37818,7 +37818,7 @@ export declare function waitForPushRequest(client: Werft, sessionId: SessionId,
|
|
|
37818
37818
|
signal?: AbortSignal;
|
|
37819
37819
|
pollIntervalMs?: number;
|
|
37820
37820
|
}): Promise<PushRequest>;
|
|
37821
|
-
export declare const SDK_VERSION = "0.1.
|
|
37821
|
+
export declare const SDK_VERSION = "0.1.2";
|
|
37822
37822
|
/** info.version of the spec the types were generated from. Not checked at runtime: the API does not report one. */
|
|
37823
37823
|
export declare const API_SPEC_VERSION = "0.1.0-alpha";
|
|
37824
37824
|
export declare const SUPPORTED_SSE_SCHEMA_VERSIONS: readonly [1];
|
package/index.js
CHANGED
|
@@ -1234,7 +1234,7 @@ async function waitForPushRequest(client, sessionId, pushRequestId, options = {}
|
|
|
1234
1234
|
}
|
|
1235
1235
|
}
|
|
1236
1236
|
// src/version.ts
|
|
1237
|
-
const SDK_VERSION = "0.1.
|
|
1237
|
+
const SDK_VERSION = "0.1.2";
|
|
1238
1238
|
/** info.version of the spec the types were generated from. Not checked at runtime: the API does not report one. */
|
|
1239
1239
|
const API_SPEC_VERSION = "0.1.0-alpha";
|
|
1240
1240
|
const SUPPORTED_SSE_SCHEMA_VERSIONS = [1];
|
package/package.json
CHANGED