@kosuke-ai/kosuke 1.0.73 → 1.0.75
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 +8 -0
- package/dist/agent/summary.js +16 -4
- package/dist/generated/commands/sensei/cards-set.js +11 -3
- package/dist/generated/commands/user/usage-get.js +2 -2
- package/dist/generated/commands/workspaces/usage-breakdown-get.js +2 -2
- package/dist/program.js +1 -0
- package/dist/runtime/attach.js +2 -0
- package/dist/runtime/member-time-zone.js +82 -0
- package/dist/runtime/runtime.js +3 -0
- package/openapi.json +93 -9
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.75
|
|
4
|
+
|
|
5
|
+
- `kosuke sensei cards set` takes `--quoted`, the earlier words a card answers (a teammate's ask, quoted exactly).
|
|
6
|
+
|
|
7
|
+
## 1.0.74
|
|
8
|
+
|
|
9
|
+
- Show your own time in `kosuke agent summary get` and count `user usage get` and `workspaces usage breakdown get` days in your own timezone unless `--tz` is passed. Other JSON stays ISO UTC.
|
|
10
|
+
|
|
3
11
|
## 1.0.73
|
|
4
12
|
|
|
5
13
|
- A Mac that cannot read its Screen Recording permission now reports it as unknown, not off, and a permission granted in System Settings takes effect within 20 seconds without quitting the app. The app never starts a screen helper from an update installed while it runs.
|
package/dist/agent/summary.js
CHANGED
|
@@ -2,6 +2,7 @@ import { providers } from '../generated/providers.js';
|
|
|
2
2
|
import { readOverview } from '../integrations/api.js';
|
|
3
3
|
import { createApiClient } from '../runtime/client.js';
|
|
4
4
|
import { isTurnToken } from '../runtime/credentials.js';
|
|
5
|
+
import { localStamp, readMemberTimeZone, } from '../runtime/member-time-zone.js';
|
|
5
6
|
import { HttpError, paginationTotal } from './http.js';
|
|
6
7
|
/**
|
|
7
8
|
* `kosuke agent summary`: which providers and integrations are connected and what is
|
|
@@ -281,6 +282,16 @@ function integrationLine(toolkit, connection) {
|
|
|
281
282
|
const identity = clip(connection.accountIdentity ?? 'account unknown', NAME_MAX);
|
|
282
283
|
return `- ${clip(toolkit, NAME_MAX)}: ${connection.alias}, ${connection.scope}, "${label}", ${identity}`;
|
|
283
284
|
}
|
|
285
|
+
/**
|
|
286
|
+
* `2026-11-05 09:12 Europe/Rome`, the member's own wall clock: Sensei repeats it to them. UTC,
|
|
287
|
+
* saying why, when their zone could not be read or Kosuke knows none for them.
|
|
288
|
+
*/
|
|
289
|
+
function headerStamp(now, zone) {
|
|
290
|
+
if (!zone)
|
|
291
|
+
return `${localStamp(now, 'UTC')} (your timezone could not be read)`;
|
|
292
|
+
const stamp = localStamp(now, zone.timeZone);
|
|
293
|
+
return zone.guessed ? `${stamp} (no timezone known for you)` : stamp;
|
|
294
|
+
}
|
|
284
295
|
/** Never clipped: a workspace missing here would read as one the digest did not cover. */
|
|
285
296
|
function coverageLine(read) {
|
|
286
297
|
const covered = read?.meta?.workspaces;
|
|
@@ -293,8 +304,7 @@ function coverageLine(read) {
|
|
|
293
304
|
export function planSummary(options) {
|
|
294
305
|
const { covered, apiUrl, now, workspace, peek = false } = options;
|
|
295
306
|
const scope = workspace ? ` --workspace ${workspace}` : '';
|
|
296
|
-
const
|
|
297
|
-
const head = [`Sensei summary, ${stamp}, ${apiUrl}`, ''];
|
|
307
|
+
const head = [`Sensei summary, ${headerStamp(now, options.timeZone ?? null)}, ${apiUrl}`, ''];
|
|
298
308
|
if (options.providers?.length)
|
|
299
309
|
head.push('Providers:', ...options.providers, '');
|
|
300
310
|
if (options.integrations?.length) {
|
|
@@ -346,7 +356,7 @@ export function renderSummary(plan, activity) {
|
|
|
346
356
|
}
|
|
347
357
|
/**
|
|
348
358
|
* The whole digest, or one line saying why not, so the agent reading it
|
|
349
|
-
* knows to query the CLI itself. The coverage, the providers and the
|
|
359
|
+
* knows to query the CLI itself. The coverage, the providers, the integrations and the member's timezone are read first:
|
|
350
360
|
* their lines decide how many events fit, and the Activity read marks events
|
|
351
361
|
* seen, so a digest that failed after it would lose them.
|
|
352
362
|
*/
|
|
@@ -361,18 +371,20 @@ export async function fetchSummary(options) {
|
|
|
361
371
|
const signal = AbortSignal.timeout(options.timeoutMs ?? SUMMARY_TIMEOUT_MS);
|
|
362
372
|
try {
|
|
363
373
|
const workspace = options.workspace ? { workspace: options.workspace } : {};
|
|
364
|
-
const [coverage, providers, integrations] = await Promise.all([
|
|
374
|
+
const [coverage, providers, integrations, timeZone] = await Promise.all([
|
|
365
375
|
client.GET('/api/activity', {
|
|
366
376
|
params: { query: { ...COVERAGE_QUERY, ...workspace } },
|
|
367
377
|
signal,
|
|
368
378
|
}),
|
|
369
379
|
fetchProviders(client, options.workspace, AbortSignal.any([signal, AbortSignal.timeout(PROVIDERS_TIMEOUT_MS)])),
|
|
370
380
|
fetchIntegrations(client, options.workspace, options.apiKey, AbortSignal.any([signal, AbortSignal.timeout(INTEGRATIONS_TIMEOUT_MS)])),
|
|
381
|
+
readMemberTimeZone(client, signal),
|
|
371
382
|
]);
|
|
372
383
|
const plan = planSummary({
|
|
373
384
|
covered: body(coverage),
|
|
374
385
|
providers,
|
|
375
386
|
integrations,
|
|
387
|
+
timeZone,
|
|
376
388
|
apiUrl: options.apiUrl,
|
|
377
389
|
now: (options.now ?? Date.now)(),
|
|
378
390
|
...workspace,
|
|
@@ -61,7 +61,7 @@ export const operation = {
|
|
|
61
61
|
"flag": "open",
|
|
62
62
|
"kind": "json",
|
|
63
63
|
"required": false,
|
|
64
|
-
"description": "The page the primary button opens in place of an instruction, such as the link a teammate's message shares. The verb is the button's label (\"Open\", \"Read\"), and the tap opens the page, closes the card and sends nothing to Sensei. It takes a verb and an outcome, and no instruction, clarification block, Deploy form, action or covers.",
|
|
64
|
+
"description": "The page the primary button opens, in place of an instruction, such as the link a teammate's message shares. The verb is the button's label (\"Open\", \"Read\"), and the tap opens the page, closes the card and sends nothing to Sensei. It takes a verb and an outcome, and no instruction, clarification block, Deploy form, action or covers.",
|
|
65
65
|
"shape": "{href: string}"
|
|
66
66
|
},
|
|
67
67
|
{
|
|
@@ -153,6 +153,14 @@ export const operation = {
|
|
|
153
153
|
"required": false,
|
|
154
154
|
"shape": "{id: string}"
|
|
155
155
|
},
|
|
156
|
+
{
|
|
157
|
+
"name": "quoted",
|
|
158
|
+
"flag": "quoted",
|
|
159
|
+
"kind": "json",
|
|
160
|
+
"required": false,
|
|
161
|
+
"description": "Earlier words the card answers, quoted at its top under a label the app writes (You asked, You replied, You said, Nicola asked). Kosuke fills it for a card a member's message started: their words, their voice note's transcript, or their reply to a card. Set it for a teammate's ask: author {kind: teammate, name, memberId when known}, kind ask, text the teammate's exact words from the message or review event the card answers (never a paraphrase, trimmed only of quoted history), at when they said it, source where (github for a GitHub review, slack, gmail, kosuke for a Kosuke message), ref.eventId the event. A value you set wins over Kosuke's.",
|
|
162
|
+
"shape": "{author: {kind: \"member\"|\"teammate\", memberId?: string, name: string}, kind: \"question\"|\"prompt\"|\"reply\"|\"voice\"|\"ask\", text: string, at: string, source?: \"thread\"|\"card_reply\"|\"kosuke\"|\"github\"|\"slack\"|\"gmail\"|\"whatsapp\"|\"telegram\"|\"linkedin\"|\"x\", cardHeadline?: string, ref?: {turnId?: string, cardId?: string, eventId?: string}}"
|
|
163
|
+
},
|
|
156
164
|
{
|
|
157
165
|
"name": "links",
|
|
158
166
|
"flag": "links",
|
|
@@ -179,7 +187,7 @@ export const operation = {
|
|
|
179
187
|
"flag": "sign-in",
|
|
180
188
|
"kind": "json",
|
|
181
189
|
"required": false,
|
|
182
|
-
"description": "
|
|
190
|
+
"description": "The member's Mac sign-in: the site, the Chrome profile ID, the Mac and, on the Sign in card of a site other than LinkedIn and X, the wall's url. Its Approve allows one tapped `kosuke mac browser login` for exactly these. Key it mac-sign-in:<site>:<profile> (the profile ID lowercase, spaces as hyphens: Profile 6 is profile-6) for Sign in, with :done for I'm signed in and :account for Continue as, both of which run --take. Only a card keyed mac-sign-in: takes it, and such a card needs it. A Sign in card for LinkedIn or X marks that connection signed out.",
|
|
183
191
|
"shape": "{site: string, profile: string, deviceId: string, url?: string}"
|
|
184
192
|
},
|
|
185
193
|
{
|
|
@@ -187,7 +195,7 @@ export const operation = {
|
|
|
187
195
|
"flag": "covers",
|
|
188
196
|
"kind": "json",
|
|
189
197
|
"required": false,
|
|
190
|
-
"description": "
|
|
198
|
+
"description": "Events this card answers, the ids of the incoming_message events of this thread: a reply covers the message it answers, a task or calendar card the message in its evidence, an FYI the event of every row. An FYI update keeps unread commitments and the events in its current evidence, discarding processed history; name at most 50 events per write. The open FYI keeps a reference to every message it has covered, which its Mark read marks, and its card read gives their count and the newest.",
|
|
191
199
|
"shape": "string[] (max 50)"
|
|
192
200
|
},
|
|
193
201
|
{
|
|
@@ -6,7 +6,7 @@ export const operation = {
|
|
|
6
6
|
"usage",
|
|
7
7
|
"get"
|
|
8
8
|
],
|
|
9
|
-
"summary": "Read what used your AI work over range (7d by default, 30d or all) in calendar days of tz (an IANA time zone, UTC by default): totals and per-day counts, then rows grouped by work, repository and model, each with its Providers and busiest Chat Sessions or Sensei Threads (the top five by every count, so sort by the one you show). Counts your personal Subscription attempts and Sensei free Turns since recording began on 22 October 2026; days before it have recorded false and are never 0. turns counts every attempt; the four token counts are sums of reported counts only, never added together, with missing and inProgress counted apart. A repository or session in a workspace you no longer belong to keeps its counts but no name, title or link. Workspace Credentials and platform work are excluded. Your own sign-in or API key only; agent tokens are refused. 400 on another range or an unknown time zone.",
|
|
9
|
+
"summary": "Read what used your AI work over range (7d by default, 30d or all) in calendar days of tz (an IANA time zone, UTC by default; the kosuke CLI sends your own timezone): totals and per-day counts, then rows grouped by work, repository and model, each with its Providers and busiest Chat Sessions or Sensei Threads (the top five by every count, so sort by the one you show). Counts your personal Subscription attempts and Sensei free Turns since recording began on 22 October 2026; days before it have recorded false and are never 0. turns counts every attempt; the four token counts are sums of reported counts only, never added together, with missing and inProgress counted apart. A repository or session in a workspace you no longer belong to keeps its counts but no name, title or link. Workspace Credentials and platform work are excluded. Your own sign-in or API key only; agent tokens are refused. 400 on another range or an unknown time zone.",
|
|
10
10
|
"pathParams": [],
|
|
11
11
|
"query": [
|
|
12
12
|
{
|
|
@@ -26,7 +26,7 @@ export const operation = {
|
|
|
26
26
|
"flag": "tz",
|
|
27
27
|
"kind": "string",
|
|
28
28
|
"required": false,
|
|
29
|
-
"description": "IANA time zone for calendar days. Default: UTC."
|
|
29
|
+
"description": "IANA time zone for calendar days. Default: UTC; the kosuke CLI sends your own timezone."
|
|
30
30
|
}
|
|
31
31
|
],
|
|
32
32
|
"body": null,
|
|
@@ -7,7 +7,7 @@ export const operation = {
|
|
|
7
7
|
"breakdown",
|
|
8
8
|
"get"
|
|
9
9
|
],
|
|
10
|
-
"summary": "Read what used the workspace's Credentials over range (7d by default, 30d or all) in calendar days of tz (an IANA time zone, UTC by default): totals and per-day counts, then rows grouped by work, repository and model, each with its Providers and busiest Chat Sessions (the top five by every count, so sort by the one you show). Counts attempts run on the workspace's Credentials since recording began on 22 October 2026; days before it have recorded false and are never 0. turns counts every attempt; the four token counts are sums of reported counts only, never added together, with missing and inProgress counted apart. Members' own Subscriptions, Sensei, Sensei free and platform work are excluded. Owners and admins only. 400 on another range or an unknown time zone.",
|
|
10
|
+
"summary": "Read what used the workspace's Credentials over range (7d by default, 30d or all) in calendar days of tz (an IANA time zone, UTC by default; the kosuke CLI sends your own timezone): totals and per-day counts, then rows grouped by work, repository and model, each with its Providers and busiest Chat Sessions (the top five by every count, so sort by the one you show). Counts attempts run on the workspace's Credentials since recording began on 22 October 2026; days before it have recorded false and are never 0. turns counts every attempt; the four token counts are sums of reported counts only, never added together, with missing and inProgress counted apart. Members' own Subscriptions, Sensei, Sensei free and platform work are excluded. Owners and admins only. 400 on another range or an unknown time zone.",
|
|
11
11
|
"pathParams": [
|
|
12
12
|
"workspaceId"
|
|
13
13
|
],
|
|
@@ -29,7 +29,7 @@ export const operation = {
|
|
|
29
29
|
"flag": "tz",
|
|
30
30
|
"kind": "string",
|
|
31
31
|
"required": false,
|
|
32
|
-
"description": "IANA time zone for calendar days. Default: UTC."
|
|
32
|
+
"description": "IANA time zone for calendar days. Default: UTC; the kosuke CLI sends your own timezone."
|
|
33
33
|
}
|
|
34
34
|
],
|
|
35
35
|
"body": null,
|
package/dist/program.js
CHANGED
|
@@ -38,6 +38,7 @@ export function createProgram(options = {}) {
|
|
|
38
38
|
credentials: () => runtimeFor().credentials(),
|
|
39
39
|
client: (o) => runtimeFor().client(o),
|
|
40
40
|
output: (outcome) => runtimeFor().output(outcome),
|
|
41
|
+
notice: (line) => runtimeFor().notice?.(line),
|
|
41
42
|
};
|
|
42
43
|
attachAuthCommands(program, lazy, options.auth);
|
|
43
44
|
// An agent's credential reaches what its member's API key does, less the
|
package/dist/runtime/attach.js
CHANGED
|
@@ -3,6 +3,7 @@ import { Argument, Command, InvalidArgumentError, Option } from 'commander';
|
|
|
3
3
|
import { addsSessionIdFlag, CLI_ONLY_FLAGS, omitsProject, SESSION_ID_FLAG, sessionIdField, } from './arguments.js';
|
|
4
4
|
import { setAfterHelp, setOptionShape, shortSummary, usageError } from './help.js';
|
|
5
5
|
import { buildRequest, execute, readWholeBody, UsageError } from './invoke.js';
|
|
6
|
+
import { withMemberTimeZone } from './member-time-zone.js';
|
|
6
7
|
import { PERSONAL_SPACE_PARAM } from './personal-space.js';
|
|
7
8
|
import { personalSpaceId } from './personal-space-id.js';
|
|
8
9
|
import { threadView, TOOLS_FLAG_HELP } from './thread-text.js';
|
|
@@ -320,6 +321,7 @@ async function run(leaf, runtime, operation, input, options = {}) {
|
|
|
320
321
|
leaf.error(error.message);
|
|
321
322
|
throw error;
|
|
322
323
|
}
|
|
324
|
+
request = await withMemberTimeZone(runtime, operation, input, request);
|
|
323
325
|
const client = runtime.client({
|
|
324
326
|
anonymous: operation.anonymous,
|
|
325
327
|
answerTimeoutMs: operation.answerTimeoutMs,
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { buildRequest } from './invoke.js';
|
|
2
|
+
/**
|
|
3
|
+
* The member's own timezone, for the few places the CLI prints time for a person to read:
|
|
4
|
+
* the `agent summary` header and the usage commands' calendar days. Everything else stays
|
|
5
|
+
* ISO UTC, which is what agents and scripts parse.
|
|
6
|
+
*/
|
|
7
|
+
/** A slow settings read must cost the command its local time, never the command. */
|
|
8
|
+
const MEMBER_TIME_ZONE_TIMEOUT_MS = 3000;
|
|
9
|
+
/** The zone as Intl spells it, or null when Intl knows none. */
|
|
10
|
+
function knownZone(zone) {
|
|
11
|
+
if (typeof zone !== 'string' || !zone)
|
|
12
|
+
return null;
|
|
13
|
+
try {
|
|
14
|
+
return new Intl.DateTimeFormat('en-US', { timeZone: zone }).resolvedOptions().timeZone;
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* `GET /api/user/settings`'s resolved zone, or null when it could not be read: refused, failed,
|
|
22
|
+
* too slow, or a zone this machine's Intl does not know. Never throws.
|
|
23
|
+
*/
|
|
24
|
+
export async function readMemberTimeZone(client, signal) {
|
|
25
|
+
try {
|
|
26
|
+
const timeout = AbortSignal.timeout(MEMBER_TIME_ZONE_TIMEOUT_MS);
|
|
27
|
+
const { data, response } = await client.GET('/api/user/settings', {
|
|
28
|
+
signal: signal ? AbortSignal.any([signal, timeout]) : timeout,
|
|
29
|
+
});
|
|
30
|
+
if (!response.ok)
|
|
31
|
+
return null;
|
|
32
|
+
const settings = data
|
|
33
|
+
?.data;
|
|
34
|
+
const timeZone = knownZone(settings?.resolvedTimeZone);
|
|
35
|
+
return timeZone ? { timeZone, guessed: settings?.resolvedFrom === 'default' } : null;
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/** `2026-11-05 09:12 Europe/Rome`: the wall-clock minute in `timeZone`, and the zone named. */
|
|
42
|
+
export function localStamp(now, timeZone) {
|
|
43
|
+
const parts = Object.fromEntries(new Intl.DateTimeFormat('en-US', {
|
|
44
|
+
timeZone,
|
|
45
|
+
year: 'numeric',
|
|
46
|
+
month: '2-digit',
|
|
47
|
+
day: '2-digit',
|
|
48
|
+
hour: '2-digit',
|
|
49
|
+
minute: '2-digit',
|
|
50
|
+
hourCycle: 'h23',
|
|
51
|
+
})
|
|
52
|
+
.formatToParts(now)
|
|
53
|
+
.map((part) => [part.type, part.value]));
|
|
54
|
+
return `${parts.year}-${parts.month}-${parts.day} ${parts.hour}:${parts.minute} ${timeZone}`;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Commands whose `--tz` names the calendar days a person reads: left out, the CLI sends the
|
|
58
|
+
* member's own timezone, where the API itself defaults to UTC. A `--tz` given always wins.
|
|
59
|
+
*/
|
|
60
|
+
const MEMBER_TIME_ZONE_DEFAULTS = new Set([
|
|
61
|
+
'user usage get',
|
|
62
|
+
'workspaces usage breakdown get',
|
|
63
|
+
]);
|
|
64
|
+
/**
|
|
65
|
+
* `request` with the member's zone as the `tz` the call left out; unchanged for any other
|
|
66
|
+
* command, or with a note and the API's UTC when the zone cannot be read. Called once `request`
|
|
67
|
+
* is built, so a call missing a flag fails before this read.
|
|
68
|
+
*/
|
|
69
|
+
export async function withMemberTimeZone(runtime, operation, input, request) {
|
|
70
|
+
if (!MEMBER_TIME_ZONE_DEFAULTS.has(operation.command.join(' ')))
|
|
71
|
+
return request;
|
|
72
|
+
if (!operation.query.some((field) => field.name === 'tz'))
|
|
73
|
+
return request;
|
|
74
|
+
if (input.fields.tz !== undefined)
|
|
75
|
+
return request;
|
|
76
|
+
const zone = await readMemberTimeZone(runtime.client());
|
|
77
|
+
if (!zone) {
|
|
78
|
+
runtime.notice?.('Your timezone could not be read, so days are in UTC. Pass --tz to choose.');
|
|
79
|
+
return request;
|
|
80
|
+
}
|
|
81
|
+
return buildRequest(operation, { ...input, fields: { ...input.fields, tz: zone.timeZone } });
|
|
82
|
+
}
|
package/dist/runtime/runtime.js
CHANGED
|
@@ -29,6 +29,9 @@ export function createRuntime({ flags, env = process.env, fetch, stdout = (line)
|
|
|
29
29
|
answerTimeoutMs,
|
|
30
30
|
});
|
|
31
31
|
},
|
|
32
|
+
notice(line) {
|
|
33
|
+
stderr(line);
|
|
34
|
+
},
|
|
32
35
|
output(outcome) {
|
|
33
36
|
if (outcome.ok) {
|
|
34
37
|
// 204 has nothing to print; anything else is passed through as JSON so
|
package/openapi.json
CHANGED
|
@@ -9511,7 +9511,7 @@
|
|
|
9511
9511
|
"/api/organizations/{workspaceId}/usage/breakdown": {
|
|
9512
9512
|
"get": {
|
|
9513
9513
|
"operationId": "workspacesUsageBreakdownGet",
|
|
9514
|
-
"summary": "Read what used the workspace's Credentials over range (7d by default, 30d or all) in calendar days of tz (an IANA time zone, UTC by default): totals and per-day counts, then rows grouped by work, repository and model, each with its Providers and busiest Chat Sessions (the top five by every count, so sort by the one you show). Counts attempts run on the workspace's Credentials since recording began on 22 October 2026; days before it have recorded false and are never 0. turns counts every attempt; the four token counts are sums of reported counts only, never added together, with missing and inProgress counted apart. Members' own Subscriptions, Sensei, Sensei free and platform work are excluded. Owners and admins only. 400 on another range or an unknown time zone.",
|
|
9514
|
+
"summary": "Read what used the workspace's Credentials over range (7d by default, 30d or all) in calendar days of tz (an IANA time zone, UTC by default; the kosuke CLI sends your own timezone): totals and per-day counts, then rows grouped by work, repository and model, each with its Providers and busiest Chat Sessions (the top five by every count, so sort by the one you show). Counts attempts run on the workspace's Credentials since recording began on 22 October 2026; days before it have recorded false and are never 0. turns counts every attempt; the four token counts are sums of reported counts only, never added together, with missing and inProgress counted apart. Members' own Subscriptions, Sensei, Sensei free and platform work are excluded. Owners and admins only. 400 on another range or an unknown time zone.",
|
|
9515
9515
|
"tags": ["workspaces"],
|
|
9516
9516
|
"x-kosuke-command": ["workspaces", "usage", "breakdown", "get"],
|
|
9517
9517
|
"x-kosuke-sandbox-token": true,
|
|
@@ -9543,10 +9543,10 @@
|
|
|
9543
9543
|
"name": "tz",
|
|
9544
9544
|
"in": "query",
|
|
9545
9545
|
"required": false,
|
|
9546
|
-
"description": "IANA time zone for calendar days. Default: UTC.",
|
|
9546
|
+
"description": "IANA time zone for calendar days. Default: UTC; the kosuke CLI sends your own timezone.",
|
|
9547
9547
|
"schema": {
|
|
9548
9548
|
"default": "UTC",
|
|
9549
|
-
"description": "IANA time zone for calendar days. Default: UTC.",
|
|
9549
|
+
"description": "IANA time zone for calendar days. Default: UTC; the kosuke CLI sends your own timezone.",
|
|
9550
9550
|
"type": "string"
|
|
9551
9551
|
}
|
|
9552
9552
|
}
|
|
@@ -21846,7 +21846,7 @@
|
|
|
21846
21846
|
"maxLength": 60000
|
|
21847
21847
|
},
|
|
21848
21848
|
"open": {
|
|
21849
|
-
"description": "The page the primary button opens in place of an instruction, such as the link a teammate's message shares. The verb is the button's label (\"Open\", \"Read\"), and the tap opens the page, closes the card and sends nothing to Sensei. It takes a verb and an outcome, and no instruction, clarification block, Deploy form, action or covers.",
|
|
21849
|
+
"description": "The page the primary button opens, in place of an instruction, such as the link a teammate's message shares. The verb is the button's label (\"Open\", \"Read\"), and the tap opens the page, closes the card and sends nothing to Sensei. It takes a verb and an outcome, and no instruction, clarification block, Deploy form, action or covers.",
|
|
21850
21850
|
"type": "object",
|
|
21851
21851
|
"properties": {
|
|
21852
21852
|
"href": {
|
|
@@ -21964,6 +21964,90 @@
|
|
|
21964
21964
|
"required": ["id"],
|
|
21965
21965
|
"additionalProperties": false
|
|
21966
21966
|
},
|
|
21967
|
+
"quoted": {
|
|
21968
|
+
"type": "object",
|
|
21969
|
+
"properties": {
|
|
21970
|
+
"author": {
|
|
21971
|
+
"type": "object",
|
|
21972
|
+
"properties": {
|
|
21973
|
+
"kind": {
|
|
21974
|
+
"type": "string",
|
|
21975
|
+
"enum": ["member", "teammate"]
|
|
21976
|
+
},
|
|
21977
|
+
"memberId": {
|
|
21978
|
+
"type": "string",
|
|
21979
|
+
"minLength": 1,
|
|
21980
|
+
"maxLength": 255
|
|
21981
|
+
},
|
|
21982
|
+
"name": {
|
|
21983
|
+
"type": "string",
|
|
21984
|
+
"minLength": 1,
|
|
21985
|
+
"maxLength": 80
|
|
21986
|
+
}
|
|
21987
|
+
},
|
|
21988
|
+
"required": ["kind", "name"],
|
|
21989
|
+
"additionalProperties": false
|
|
21990
|
+
},
|
|
21991
|
+
"kind": {
|
|
21992
|
+
"type": "string",
|
|
21993
|
+
"enum": ["question", "prompt", "reply", "voice", "ask"]
|
|
21994
|
+
},
|
|
21995
|
+
"text": {
|
|
21996
|
+
"type": "string",
|
|
21997
|
+
"minLength": 1,
|
|
21998
|
+
"maxLength": 4000
|
|
21999
|
+
},
|
|
22000
|
+
"at": {
|
|
22001
|
+
"type": "string",
|
|
22002
|
+
"format": "date-time",
|
|
22003
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
|
|
22004
|
+
},
|
|
22005
|
+
"source": {
|
|
22006
|
+
"type": "string",
|
|
22007
|
+
"enum": [
|
|
22008
|
+
"thread",
|
|
22009
|
+
"card_reply",
|
|
22010
|
+
"kosuke",
|
|
22011
|
+
"github",
|
|
22012
|
+
"slack",
|
|
22013
|
+
"gmail",
|
|
22014
|
+
"whatsapp",
|
|
22015
|
+
"telegram",
|
|
22016
|
+
"linkedin",
|
|
22017
|
+
"x"
|
|
22018
|
+
]
|
|
22019
|
+
},
|
|
22020
|
+
"cardHeadline": {
|
|
22021
|
+
"type": "string",
|
|
22022
|
+
"minLength": 1,
|
|
22023
|
+
"maxLength": 140
|
|
22024
|
+
},
|
|
22025
|
+
"ref": {
|
|
22026
|
+
"type": "object",
|
|
22027
|
+
"properties": {
|
|
22028
|
+
"turnId": {
|
|
22029
|
+
"type": "string",
|
|
22030
|
+
"format": "uuid",
|
|
22031
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
22032
|
+
},
|
|
22033
|
+
"cardId": {
|
|
22034
|
+
"type": "string",
|
|
22035
|
+
"format": "uuid",
|
|
22036
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
22037
|
+
},
|
|
22038
|
+
"eventId": {
|
|
22039
|
+
"type": "string",
|
|
22040
|
+
"format": "uuid",
|
|
22041
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
22042
|
+
}
|
|
22043
|
+
},
|
|
22044
|
+
"additionalProperties": false
|
|
22045
|
+
}
|
|
22046
|
+
},
|
|
22047
|
+
"required": ["author", "kind", "text", "at"],
|
|
22048
|
+
"additionalProperties": false,
|
|
22049
|
+
"description": "Earlier words the card answers, quoted at its top under a label the app writes (You asked, You replied, You said, Nicola asked). Kosuke fills it for a card a member's message started: their words, their voice note's transcript, or their reply to a card. Set it for a teammate's ask: author {kind: teammate, name, memberId when known}, kind ask, text the teammate's exact words from the message or review event the card answers (never a paraphrase, trimmed only of quoted history), at when they said it, source where (github for a GitHub review, slack, gmail, kosuke for a Kosuke message), ref.eventId the event. A value you set wins over Kosuke's."
|
|
22050
|
+
},
|
|
21967
22051
|
"links": {
|
|
21968
22052
|
"default": [],
|
|
21969
22053
|
"maxItems": 8,
|
|
@@ -22516,7 +22600,7 @@
|
|
|
22516
22600
|
]
|
|
22517
22601
|
},
|
|
22518
22602
|
"signIn": {
|
|
22519
|
-
"description": "
|
|
22603
|
+
"description": "The member's Mac sign-in: the site, the Chrome profile ID, the Mac and, on the Sign in card of a site other than LinkedIn and X, the wall's url. Its Approve allows one tapped `kosuke mac browser login` for exactly these. Key it mac-sign-in:<site>:<profile> (the profile ID lowercase, spaces as hyphens: Profile 6 is profile-6) for Sign in, with :done for I'm signed in and :account for Continue as, both of which run --take. Only a card keyed mac-sign-in: takes it, and such a card needs it. A Sign in card for LinkedIn or X marks that connection signed out.",
|
|
22520
22604
|
"type": "object",
|
|
22521
22605
|
"properties": {
|
|
22522
22606
|
"site": {
|
|
@@ -22548,7 +22632,7 @@
|
|
|
22548
22632
|
"additionalProperties": false
|
|
22549
22633
|
},
|
|
22550
22634
|
"covers": {
|
|
22551
|
-
"description": "
|
|
22635
|
+
"description": "Events this card answers, the ids of the incoming_message events of this thread: a reply covers the message it answers, a task or calendar card the message in its evidence, an FYI the event of every row. An FYI update keeps unread commitments and the events in its current evidence, discarding processed history; name at most 50 events per write. The open FYI keeps a reference to every message it has covered, which its Mark read marks, and its card read gives their count and the newest.",
|
|
22552
22636
|
"minItems": 1,
|
|
22553
22637
|
"maxItems": 50,
|
|
22554
22638
|
"type": "array",
|
|
@@ -29297,7 +29381,7 @@
|
|
|
29297
29381
|
"/api/user/usage/breakdown": {
|
|
29298
29382
|
"get": {
|
|
29299
29383
|
"operationId": "userUsageGet",
|
|
29300
|
-
"summary": "Read what used your AI work over range (7d by default, 30d or all) in calendar days of tz (an IANA time zone, UTC by default): totals and per-day counts, then rows grouped by work, repository and model, each with its Providers and busiest Chat Sessions or Sensei Threads (the top five by every count, so sort by the one you show). Counts your personal Subscription attempts and Sensei free Turns since recording began on 22 October 2026; days before it have recorded false and are never 0. turns counts every attempt; the four token counts are sums of reported counts only, never added together, with missing and inProgress counted apart. A repository or session in a workspace you no longer belong to keeps its counts but no name, title or link. Workspace Credentials and platform work are excluded. Your own sign-in or API key only; agent tokens are refused. 400 on another range or an unknown time zone.",
|
|
29384
|
+
"summary": "Read what used your AI work over range (7d by default, 30d or all) in calendar days of tz (an IANA time zone, UTC by default; the kosuke CLI sends your own timezone): totals and per-day counts, then rows grouped by work, repository and model, each with its Providers and busiest Chat Sessions or Sensei Threads (the top five by every count, so sort by the one you show). Counts your personal Subscription attempts and Sensei free Turns since recording began on 22 October 2026; days before it have recorded false and are never 0. turns counts every attempt; the four token counts are sums of reported counts only, never added together, with missing and inProgress counted apart. A repository or session in a workspace you no longer belong to keeps its counts but no name, title or link. Workspace Credentials and platform work are excluded. Your own sign-in or API key only; agent tokens are refused. 400 on another range or an unknown time zone.",
|
|
29301
29385
|
"tags": ["user"],
|
|
29302
29386
|
"x-kosuke-command": ["user", "usage", "get"],
|
|
29303
29387
|
"parameters": [
|
|
@@ -29317,10 +29401,10 @@
|
|
|
29317
29401
|
"name": "tz",
|
|
29318
29402
|
"in": "query",
|
|
29319
29403
|
"required": false,
|
|
29320
|
-
"description": "IANA time zone for calendar days. Default: UTC.",
|
|
29404
|
+
"description": "IANA time zone for calendar days. Default: UTC; the kosuke CLI sends your own timezone.",
|
|
29321
29405
|
"schema": {
|
|
29322
29406
|
"default": "UTC",
|
|
29323
|
-
"description": "IANA time zone for calendar days. Default: UTC.",
|
|
29407
|
+
"description": "IANA time zone for calendar days. Default: UTC; the kosuke CLI sends your own timezone.",
|
|
29324
29408
|
"type": "string"
|
|
29325
29409
|
}
|
|
29326
29410
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kosuke-ai/kosuke",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.75",
|
|
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": "3bc0660afe20181e8e7f71defd26b891307da387",
|
|
47
|
+
"sourceIdentity": "4e048893ec5a25f64dadb13b7dc3e7008289d29b695df760110efd92e50fa7ce",
|
|
48
48
|
"fragments": [
|
|
49
|
-
"
|
|
49
|
+
"sensei-cards-quoted-r4k9tw.json"
|
|
50
50
|
]
|
|
51
51
|
}
|
|
52
52
|
}
|