@kennra/app-sdk 0.2.0 → 0.3.0
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/dist/manifest.d.ts +1 -1
- package/dist/manifest.js +3 -0
- package/dist/protocol.d.ts +68 -12
- package/package.json +1 -1
package/dist/manifest.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type ManifestPiiLevel = (typeof PII_LEVELS)[number];
|
|
|
6
6
|
* Scopes an app may request. `kennra:privacy`, workspace scopes and publishing the schema are never
|
|
7
7
|
* granted to apps; proposing schema changes (`kennra:schema:draft`) is.
|
|
8
8
|
*/
|
|
9
|
-
export declare const APP_SCOPES: readonly ["kennra:read", "kennra:party:write", "kennra:commerce:write", "kennra:interaction:write", "kennra:trait:write", "kennra:deal:write", "kennra:work:write", "kennra:consent:write", "kennra:import:backdate", "kennra:export", "kennra:segment:read", "kennra:schema:draft", "kennra:suggestions:decide", "kennra:consent:grant", "kennra:engagement:write", "kennra:consent:import"];
|
|
9
|
+
export declare const APP_SCOPES: readonly ["kennra:read", "kennra:party:write", "kennra:commerce:write", "kennra:interaction:write", "kennra:trait:write", "kennra:deal:write", "kennra:work:write", "kennra:consent:write", "kennra:import:backdate", "kennra:export", "kennra:segment:read", "kennra:schema:draft", "kennra:suggestions:decide", "kennra:consent:grant", "kennra:engagement:write", "kennra:consent:import", "kennra:events:read"];
|
|
10
10
|
export type AppScope = (typeof APP_SCOPES)[number];
|
|
11
11
|
/** The scope that lets an app pass on a member's decision on a suggestion (21 November 2026). */
|
|
12
12
|
export declare const SUGGESTIONS_DECIDE_SCOPE = "kennra:suggestions:decide";
|
package/dist/manifest.js
CHANGED
|
@@ -44,6 +44,9 @@ export const APP_SCOPES = [
|
|
|
44
44
|
// sending tool brings opt-ins older than 30 days. Only with this scope (per purpose), only with
|
|
45
45
|
// evidence of the opt-in, never over a newer withdrawal, capped per installation and day.
|
|
46
46
|
'kennra:consent:import',
|
|
47
|
+
// The event feed and stream (decision 27 November 2026): with kennra:read, a private app reads
|
|
48
|
+
// the workspace's events in commit order, filtered by its grant like its webhook payloads.
|
|
49
|
+
'kennra:events:read',
|
|
47
50
|
];
|
|
48
51
|
/** The scope that lets an app pass on a member's decision on a suggestion (21 November 2026). */
|
|
49
52
|
export const SUGGESTIONS_DECIDE_SCOPE = 'kennra:suggestions:decide';
|
package/dist/protocol.d.ts
CHANGED
|
@@ -305,9 +305,18 @@ export interface CaptureInput {
|
|
|
305
305
|
* The source's own id of the message or event, the same in every mailbox or calendar that has a
|
|
306
306
|
* copy (an email's RFC 822 `Message-ID`, a calendar event's iCalendar UID). Metadata, never
|
|
307
307
|
* content. The core summarizes one message once: a copy with the same id and text reuses the
|
|
308
|
-
* summary and costs no AI credit.
|
|
308
|
+
* summary and costs no AI credit. For a meeting it is also stored as the meeting's calendar
|
|
309
|
+
* identity: a meeting-notes source finds the meeting by it (`MeetingNotesCapture.match`).
|
|
309
310
|
*/
|
|
310
311
|
contentId?: string;
|
|
312
|
+
/**
|
|
313
|
+
* Captured by a meeting-notes or recording source because no calendar had the meeting (needs
|
|
314
|
+
* `contentId` to merge). A later capture of the same meeting from a calendar (same member,
|
|
315
|
+
* `contentId` and start within 30 minutes) takes the interaction over, notes included, instead
|
|
316
|
+
* of making a second one; a provisional capture of a meeting a calendar already has is
|
|
317
|
+
* `duplicate`.
|
|
318
|
+
*/
|
|
319
|
+
provisional?: boolean;
|
|
311
320
|
}
|
|
312
321
|
/** One spoken turn of a meeting transcript, as the source recorded it. */
|
|
313
322
|
export interface TranscriptTurn {
|
|
@@ -319,25 +328,72 @@ export interface TranscriptTurn {
|
|
|
319
328
|
startsAt?: string;
|
|
320
329
|
}
|
|
321
330
|
/**
|
|
322
|
-
*
|
|
323
|
-
* captured with
|
|
324
|
-
*
|
|
325
|
-
*
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
|
|
329
|
-
|
|
331
|
+
* How a meeting-notes source finds the meeting when it does not know the `sourceRef` it was
|
|
332
|
+
* captured with (another app's calendar captured it). The core looks only at the member's own
|
|
333
|
+
* meetings: first by calendar identity (`contentIds`, as a calendar capture sends `contentId`)
|
|
334
|
+
* starting within 30 minutes of `startsAt`, then, for meetings captured without one, by a start
|
|
335
|
+
* within 30 minutes and at least one of `attendeeEmails` among the meeting's known people. Two
|
|
336
|
+
* candidates are `ambiguous` and skipped; none is `no_match`.
|
|
337
|
+
*/
|
|
338
|
+
export interface MeetingMatch {
|
|
339
|
+
/** The meeting's calendar identity in the forms the source knows (`ical:<uid>`), at most 5. */
|
|
340
|
+
contentIds?: string[];
|
|
341
|
+
startsAt: string;
|
|
342
|
+
/** The attendees' emails (both sides), at most 200. */
|
|
343
|
+
attendeeEmails?: string[];
|
|
344
|
+
}
|
|
345
|
+
/** A next step in a source's own meeting notes. */
|
|
346
|
+
export interface ProviderNextStep {
|
|
347
|
+
text: string;
|
|
348
|
+
/** Whose step: `us`, `customer` or `unknown`. Ignored when `ownerEmail` is given. */
|
|
349
|
+
owner?: 'us' | 'customer' | 'unknown';
|
|
350
|
+
/**
|
|
351
|
+
* The email of the person the source assigned the step to: the core decides the side (ours when
|
|
352
|
+
* it is a member's address or on the workspace's own domains, else the customer's).
|
|
353
|
+
*/
|
|
354
|
+
ownerEmail?: string;
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* The source's own meeting notes (`MeetingNotesCapture.notes`): the core writes them as they are,
|
|
358
|
+
* masked and capped, instead of summarizing a transcript. No AI credit is used, and no transcript
|
|
359
|
+
* reaches Kennra.
|
|
360
|
+
*/
|
|
361
|
+
export interface ProviderMeetingNotes {
|
|
362
|
+
/** At most 2,000 characters are kept. */
|
|
363
|
+
summary: string;
|
|
364
|
+
/** At most 10, 300 characters each. */
|
|
365
|
+
decisions?: string[];
|
|
366
|
+
/** At most 20 are read, 300 characters each; our side's (at most 5) become task suggestions. */
|
|
367
|
+
nextSteps?: ProviderNextStep[];
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* `captureMeetingNotes`: the notes of a meeting that ended, for a meeting Kennra captured. The app
|
|
371
|
+
* names the meeting with `interactionSourceRef` (when it captured it itself) or `match` (when
|
|
372
|
+
* another app's calendar did). The core decides: the member must have connected their transcripts
|
|
373
|
+
* (`userId` + `connectionKey`), the meeting must be a captured, not cancelled interaction they own,
|
|
374
|
+
* and its title must have none of the workspace's opt-out keywords. With `turns`, it summarizes the
|
|
375
|
+
* transcript with its own LLM gateway (one AI credit); with `notes`, it takes the source's own
|
|
376
|
+
* summary and next steps (no credit). Either way it writes one note marked aiGenerated on the
|
|
377
|
+
* interaction and its companies, people and deals, and suggests a task per next step on our side
|
|
378
|
+
* (never accepted on its own). One note per meeting: the first source wins, later ones are
|
|
379
|
+
* `unchanged`. The transcript is never stored; `transcriptUrl` (a link to it in the source) is.
|
|
330
380
|
*/
|
|
331
381
|
export interface MeetingNotesCapture {
|
|
332
382
|
userId: string;
|
|
333
383
|
/** The member's transcripts connection in this installation (reportUserConnection). */
|
|
334
384
|
connectionKey: string;
|
|
335
|
-
/** The `sourceRef` the meeting was captured with (`captureInteraction`). */
|
|
336
|
-
interactionSourceRef
|
|
385
|
+
/** The `sourceRef` the meeting was captured with (`captureInteraction`). Or give `match`. */
|
|
386
|
+
interactionSourceRef?: string;
|
|
387
|
+
/** Finds the meeting another app captured. Used when `interactionSourceRef` is absent. */
|
|
388
|
+
match?: MeetingMatch;
|
|
337
389
|
/** The source's own id of this recording or transcript (idempotency and the source trail). */
|
|
338
390
|
sourceRef: string;
|
|
391
|
+
/** The meeting's title in the source: checked for opt-out keywords too. */
|
|
392
|
+
title?: string;
|
|
339
393
|
/** The turns, in order. Summarized and dropped, never stored. At most 2,000 turns. */
|
|
340
|
-
turns
|
|
394
|
+
turns?: TranscriptTurn[];
|
|
395
|
+
/** The source's own notes instead of turns (no AI credit). */
|
|
396
|
+
notes?: ProviderMeetingNotes;
|
|
341
397
|
/** Where people with access read the transcript in the source. Stored and shown as a link. */
|
|
342
398
|
transcriptUrl?: string;
|
|
343
399
|
/** The transcript's language (BCP 47), when the source says. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kennra/app-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Build Kennra apps: manifest types and validation, installation tokens, ingest helpers, signed lookups, schedules and webhooks, and a test harness. Web-standard Request/Response.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"kennra",
|