@kosuke-ai/kosuke 1.0.102 → 1.0.103
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/CHANGELOG.md +4 -0
- package/dist/agent/summary.js +13 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.103
|
|
4
|
+
|
|
5
|
+
- kosuke agent summary get times out each slow read on an ordinary timer; what it prints and when it gives up are unchanged.
|
|
6
|
+
|
|
3
7
|
## 1.0.102
|
|
4
8
|
|
|
5
9
|
- Sensei can change a project's setup commands, services and environment variables for a workspace admin once the admin approves a Sensei card about the project: `projects settings update`, `projects services create|update|delete` and `projects env-vars create|delete` take `--card <id>`, and `projects settings get --card <id>` answers canEdit for that change. Without an approved card from that Turn Sensei gets 403; API keys, connected apps, sessions and Crons are still refused.
|
package/dist/agent/summary.js
CHANGED
|
@@ -22,6 +22,16 @@ const PROVIDERS_TIMEOUT_MS = 4000;
|
|
|
22
22
|
* platform must cost the digest this section, never the digest.
|
|
23
23
|
*/
|
|
24
24
|
const INTEGRATIONS_TIMEOUT_MS = 3000;
|
|
25
|
+
/**
|
|
26
|
+
* `AbortSignal.timeout(ms)` on an ordinary timer: the same TimeoutError reason, and unref'd, so it
|
|
27
|
+
* never holds the process open. The timer, not a weak reference, keeps the signal alive until it
|
|
28
|
+
* fires, and the clock it runs on is the one a test can fake.
|
|
29
|
+
*/
|
|
30
|
+
function deadline(ms) {
|
|
31
|
+
const controller = new AbortController();
|
|
32
|
+
setTimeout(() => controller.abort(new DOMException('The operation timed out.', 'TimeoutError')), ms).unref();
|
|
33
|
+
return controller.signal;
|
|
34
|
+
}
|
|
25
35
|
/** Connections listed before "and N more"; a member's own seven fit. */
|
|
26
36
|
const INTEGRATIONS_SHOWN = 8;
|
|
27
37
|
/** However much room is left: past this, the digest stops being a glance. */
|
|
@@ -368,7 +378,7 @@ export async function fetchSummary(options) {
|
|
|
368
378
|
apiKey: options.apiKey,
|
|
369
379
|
fetch: options.fetch,
|
|
370
380
|
});
|
|
371
|
-
const signal =
|
|
381
|
+
const signal = deadline(options.timeoutMs ?? SUMMARY_TIMEOUT_MS);
|
|
372
382
|
try {
|
|
373
383
|
const workspace = options.workspace ? { workspace: options.workspace } : {};
|
|
374
384
|
const [coverage, providers, integrations, timeZone] = await Promise.all([
|
|
@@ -376,8 +386,8 @@ export async function fetchSummary(options) {
|
|
|
376
386
|
params: { query: { ...COVERAGE_QUERY, ...workspace } },
|
|
377
387
|
signal,
|
|
378
388
|
}),
|
|
379
|
-
fetchProviders(client, options.workspace, AbortSignal.any([signal,
|
|
380
|
-
fetchIntegrations(client, options.workspace, options.apiKey, AbortSignal.any([signal,
|
|
389
|
+
fetchProviders(client, options.workspace, AbortSignal.any([signal, deadline(PROVIDERS_TIMEOUT_MS)])),
|
|
390
|
+
fetchIntegrations(client, options.workspace, options.apiKey, AbortSignal.any([signal, deadline(INTEGRATIONS_TIMEOUT_MS)])),
|
|
381
391
|
readMemberTimeZone(client, signal),
|
|
382
392
|
]);
|
|
383
393
|
const plan = planSummary({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kosuke-ai/kosuke",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.103",
|
|
4
4
|
"description": "Sensei platform CLI. The client customers install to drive app.kosuke.ai from their own machine.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"minimatch": "^11.0.1"
|
|
44
44
|
},
|
|
45
45
|
"kosukeRelease": {
|
|
46
|
-
"sourceCommit": "
|
|
47
|
-
"sourceIdentity": "
|
|
46
|
+
"sourceCommit": "7e4eb9b94b8a888f89a11386ab5bc8ca5363b9a4",
|
|
47
|
+
"sourceIdentity": "f2d5d168da571571feaa93fa1853865482c139b51864fb7b8e548472c410f496",
|
|
48
48
|
"fragments": [
|
|
49
|
-
"
|
|
49
|
+
"agent-summary-deadline-timers-g7s1.json"
|
|
50
50
|
]
|
|
51
51
|
}
|
|
52
52
|
}
|