@kosuke-ai/kosuke 1.2.3589 → 1.2.3606

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.3606
4
+
5
+ - Name each connection's full connectionId in `kosuke integrations list` and in a tool call's meta.ranOn, so a card can reference it.
6
+
7
+ ## 1.2.3601
8
+
9
+ - Files keeps everything Kosuke and Sensei make under one `system` folder: sessions, Crons, prototypes, research, reports and task scratch. A prototype saved to Files now lands in `system/prototypes/`, and a file listing can name the new kept folders.
10
+
3
11
  ## 1.2.3589
4
12
 
5
13
  - Session reads now include `prBehindBlockedSince`: when the pull request's branch began to be behind its base while GitHub could not merge it.
@@ -15,14 +15,14 @@ export const operation = {
15
15
  "flag": "name",
16
16
  "kind": "string",
17
17
  "required": true,
18
- "description": "The page name: prototype- and two to five lowercase hyphenated words for a session (its file name), two to five words for Files (prototypes/<name>.html)."
18
+ "description": "The page name: prototype- and two to five lowercase hyphenated words for a session (its file name), two to five words for Files (system/prototypes/<name>.html)."
19
19
  },
20
20
  {
21
21
  "name": "variants",
22
22
  "flag": "variants",
23
23
  "kind": "string",
24
24
  "required": false,
25
- "description": "one (default): one page, with a Variant control when there are several. per-variant: one page per Variant, <name>-<letter>-<words> in a session, prototypes/<name>/<letter>-<words>.html in Files.",
25
+ "description": "one (default): one page, with a Variant control when there are several. per-variant: one page per Variant, <name>-<letter>-<words> in a session, system/prototypes/<name>/<letter>-<words>.html in Files.",
26
26
  "choices": [
27
27
  "one",
28
28
  "per-variant"
@@ -20,13 +20,17 @@ export function oneLine(value, max) {
20
20
  return flat.length > max ? `${flat.slice(0, max - 1).trimEnd()}…` : flat;
21
21
  }
22
22
  const count = (value) => typeof value === 'number' && Number.isFinite(value) && value >= 0 ? Math.trunc(value) : 0;
23
+ /** A whole connection id as a card's connection reference takes it: an RFC 9562 UUID. */
24
+ const FULL_ID = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|0{8}-0{4}-0{4}-0{4}-0{12}|f{8}-f{4}-f{4}-f{4}-f{12})$/i;
23
25
  export function connectionOf(row) {
24
26
  const id = oneLine(row.id, 16);
25
27
  const alias = oneLine(row.alias, 80);
26
28
  if (!alias)
27
29
  return null;
30
+ const connectionId = oneLine(row.connectionId, 36).toLowerCase();
28
31
  return {
29
32
  id,
33
+ connectionId: FULL_ID.test(connectionId) ? connectionId : null,
30
34
  alias,
31
35
  scope: row.scope === 'personal' ? 'personal' : 'workspace',
32
36
  label: oneLine(row.label, 60),
@@ -18,6 +18,7 @@ export function withRanOn(text, connection) {
18
18
  if (!isRow(body))
19
19
  return null;
20
20
  const ranOn = JSON.stringify({
21
+ ...(connection.connectionId && { connectionId: connection.connectionId }),
21
22
  alias: connection.alias,
22
23
  scope: connection.scope,
23
24
  label: connection.label,
@@ -7,7 +7,8 @@ const plural = (count, noun) => `${count} ${noun}${count === 1 ? '' : 's'}`;
7
7
  function connectionLine(connection) {
8
8
  const identity = connection.accountIdentity ?? 'account unknown';
9
9
  const id = connection.id ? `, id ${connection.id}` : '';
10
- return `${connection.alias}: ${connection.scope}, "${connection.label}", ${identity}${id}`;
10
+ const whole = connection.connectionId ? `, connectionId ${connection.connectionId}` : '';
11
+ return `${connection.alias}: ${connection.scope}, "${connection.label}", ${identity}${id}${whole}`;
11
12
  }
12
13
  function toolLine(tool, width) {
13
14
  const access = (tool.access === 'read' ? '[read-only]' : '[writes]').padEnd(11);
@@ -44,7 +44,7 @@ class CheckError extends Error {
44
44
  * then dark), screenshots the baseline state's canvas and the real screen.
45
45
  * 6. Compares them in the browser and draws the side-by-side picture of the worst theme.
46
46
  * 7. Saves the picture as the session's `<name>-visual-check` artifact, or the File
47
- * `prototypes/<name>-visual-check.png`; a failed save keeps the result with no image.
47
+ * `system/prototypes/<name>-visual-check.png`; a failed save keeps the result with no image.
48
48
  * Any other failure is not compared, with a notice: the save itself goes on.
49
49
  */
50
50
  export async function runVisualCheck(input) {
@@ -352,7 +352,7 @@ async function saveImage(input) {
352
352
  const { fields } = input;
353
353
  const name = typeof fields.name === 'string' ? fields.name : 'prototype';
354
354
  if (typeof fields.workspaceId === 'string' && fields.workspaceId) {
355
- const path = `prototypes/${name}${SUFFIX}.png`;
355
+ const path = `system/prototypes/${name}${SUFFIX}.png`;
356
356
  const upload = join(input.image, '..', `${name}${SUFFIX}.png`);
357
357
  copyFileSync(input.image, upload);
358
358
  // The workspace form of `kosuke files set`, read from the registry like every command.
package/openapi.json CHANGED
@@ -23159,10 +23159,10 @@
23159
23159
  "properties": {
23160
23160
  "name": {
23161
23161
  "type": "string",
23162
- "description": "The page name: prototype- and two to five lowercase hyphenated words for a session (its file name), two to five words for Files (prototypes/<name>.html)."
23162
+ "description": "The page name: prototype- and two to five lowercase hyphenated words for a session (its file name), two to five words for Files (system/prototypes/<name>.html)."
23163
23163
  },
23164
23164
  "variants": {
23165
- "description": "one (default): one page, with a Variant control when there are several. per-variant: one page per Variant, <name>-<letter>-<words> in a session, prototypes/<name>/<letter>-<words>.html in Files.",
23165
+ "description": "one (default): one page, with a Variant control when there are several. per-variant: one page per Variant, <name>-<letter>-<words> in a session, system/prototypes/<name>/<letter>-<words>.html in Files.",
23166
23166
  "type": "string",
23167
23167
  "enum": ["one", "per-variant"]
23168
23168
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kosuke-ai/kosuke",
3
- "version": "1.2.3589",
3
+ "version": "1.2.3606",
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": "e406039e186f99140b65bbe757de40b6ebb1c5e6",
47
- "sourceIdentity": "24286d3ca5e74df62be968e0cabb3c9c53012bb3cb7ac081a0e05ccabcdd5165",
46
+ "sourceCommit": "7d2a6823b371f54830b2139a27c4367c5c1e805c",
47
+ "sourceIdentity": "ca908e59210d77fa30599cfa8575a1cb0263ed7b63889ca838f6eccb811344da",
48
48
  "fragments": [
49
- "pr-behind-blocked-since-rssuyy.json"
49
+ "integrations-full-connection-id-56fs9y.json"
50
50
  ]
51
51
  }
52
52
  }