@robota-sdk/agent-product 3.6.0 → 3.6.1
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 +16 -0
- package/dist/personal/index.cjs +21 -17
- package/dist/personal/index.d.cts +624 -9
- package/dist/personal/index.d.cts.map +1 -1
- package/dist/personal/index.d.ts +624 -9
- package/dist/personal/index.d.ts.map +1 -1
- package/dist/personal/index.js +24 -20
- package/dist/personal/index.js.map +1 -1
- package/package.json +1 -1
package/dist/personal/index.d.ts
CHANGED
|
@@ -293,6 +293,8 @@ interface IGoal {
|
|
|
293
293
|
readonly readOnly: boolean;
|
|
294
294
|
/** The connector this goal keeps in sync, when it is one: a person's own goals have none. */
|
|
295
295
|
readonly connectorId?: string;
|
|
296
|
+
/** The case this goal gives a turn on, when it is one: found by this id, and run again for each answer. */
|
|
297
|
+
readonly caseId?: string;
|
|
296
298
|
readonly status: TGoalStatus;
|
|
297
299
|
/** When the goal is next due (ISO 8601); absent when it is not scheduled. */
|
|
298
300
|
readonly nextRunAt?: string;
|
|
@@ -319,8 +321,31 @@ interface IGoalRun {
|
|
|
319
321
|
readonly report?: string;
|
|
320
322
|
readonly actions: readonly IGoalAction[];
|
|
321
323
|
}
|
|
322
|
-
type TFeedKind = 'report' | 'approval' | 'notice';
|
|
324
|
+
type TFeedKind = 'report' | 'approval' | 'notice' | 'question';
|
|
323
325
|
type TApprovalState = 'pending' | 'approved' | 'denied' | 'expired';
|
|
326
|
+
/** A question is open until the person answers it, or withdrawn when its case closes first. */
|
|
327
|
+
type TQuestionState = 'open' | 'answered' | 'withdrawn';
|
|
328
|
+
/** What the person answered: one of the offered choices, or a reply in their own words. */
|
|
329
|
+
interface IQuestionAnswer {
|
|
330
|
+
readonly choice?: string;
|
|
331
|
+
readonly reply?: string;
|
|
332
|
+
readonly at: string;
|
|
333
|
+
}
|
|
334
|
+
/** The question the agent asks from a case, and where it stands. Never approved, only answered. */
|
|
335
|
+
interface IFeedQuestion {
|
|
336
|
+
readonly caseId: string;
|
|
337
|
+
readonly text: string;
|
|
338
|
+
readonly options: readonly string[];
|
|
339
|
+
readonly allowsReply: boolean;
|
|
340
|
+
readonly state: TQuestionState;
|
|
341
|
+
readonly answer?: IQuestionAnswer;
|
|
342
|
+
/**
|
|
343
|
+
* How the case closed, when it closed right after this answer: shown under the answer so a close the
|
|
344
|
+
* person would want to know about is not left in the case's thread alone. Written by the agent from
|
|
345
|
+
* content other people wrote, so a host shows it as plain text.
|
|
346
|
+
*/
|
|
347
|
+
readonly resolution?: string;
|
|
348
|
+
}
|
|
324
349
|
interface IFeedItem {
|
|
325
350
|
readonly id: string;
|
|
326
351
|
readonly at: string;
|
|
@@ -335,6 +360,8 @@ interface IFeedItem {
|
|
|
335
360
|
readonly detail: string;
|
|
336
361
|
readonly state: TApprovalState;
|
|
337
362
|
};
|
|
363
|
+
/** Present on a question: what the agent asks the person about one of its cases. */
|
|
364
|
+
readonly question?: IFeedQuestion;
|
|
338
365
|
readonly dismissed: boolean;
|
|
339
366
|
}
|
|
340
367
|
/** Where goals, their runs and the feed live; a host supplies one per principal. */
|
|
@@ -363,6 +390,7 @@ interface ICreateGoalInput {
|
|
|
363
390
|
readonly everyMinutes?: number;
|
|
364
391
|
readonly readOnly?: boolean;
|
|
365
392
|
readonly connectorId?: string;
|
|
393
|
+
readonly caseId?: string;
|
|
366
394
|
}
|
|
367
395
|
declare class GoalRefusedError extends Error {
|
|
368
396
|
constructor(reason: string);
|
|
@@ -391,6 +419,13 @@ declare class GoalBook {
|
|
|
391
419
|
reschedule(id: string, everyMinutes: number): Promise<IGoal>;
|
|
392
420
|
/** Make a paused, finished or failed goal due now. */
|
|
393
421
|
resume(id: string): Promise<IGoal>;
|
|
422
|
+
/**
|
|
423
|
+
* Make a goal that has finished due now again, as a one-shot goal's next turn: a case's goal runs once
|
|
424
|
+
* for each answer. A goal still running or waiting is refused, since a second run would start before
|
|
425
|
+
* the first ended, and so is a paused one, which the person stopped; `resume` is for them. The interval
|
|
426
|
+
* is untouched, so a scheduled goal follows its own schedule again once the extra run ends.
|
|
427
|
+
*/
|
|
428
|
+
runAgain(id: string): Promise<IGoal>;
|
|
394
429
|
remove(id: string): Promise<void>;
|
|
395
430
|
startRun(goalId: string): Promise<IGoalRun>;
|
|
396
431
|
recordAction(run: IGoalRun, action: Omit<IGoalAction, 'at'>): Promise<IGoalRun>;
|
|
@@ -412,9 +447,499 @@ declare class GoalBook {
|
|
|
412
447
|
feed(limit?: number): Promise<readonly IFeedItem[]>;
|
|
413
448
|
feedItem(id: string): Promise<IFeedItem | undefined>;
|
|
414
449
|
setApproval(id: string, state: TApprovalState): Promise<IFeedItem>;
|
|
450
|
+
/** Record the person's answer to a question; a question is answered once. */
|
|
451
|
+
answerQuestion(id: string, answer: Omit<IQuestionAnswer, 'at'>): Promise<IFeedItem>;
|
|
452
|
+
/** Show how the case closed under the person's answer; only an answered question carries one. */
|
|
453
|
+
resolveQuestion(id: string, resolution: string): Promise<IFeedItem>;
|
|
454
|
+
/** A question whose case closed before the person answered it can no longer be answered. */
|
|
455
|
+
withdrawQuestion(id: string): Promise<IFeedItem>;
|
|
415
456
|
dismiss(id: string): Promise<void>;
|
|
416
457
|
}
|
|
417
458
|
//#endregion
|
|
459
|
+
//#region src/personal/cases/types.d.ts
|
|
460
|
+
/**
|
|
461
|
+
* Cases: a thread of thought the agent opens from something it noticed, asks the person about, and
|
|
462
|
+
* keeps until it is settled. A case is not a chat and not a goal: it is the agent's own record of one
|
|
463
|
+
* matter (what it saw, what it noted, the one question it is waiting on, and what happened), kept
|
|
464
|
+
* beside the goals and the feed the question is shown in.
|
|
465
|
+
*/
|
|
466
|
+
type TCaseState = 'open' | 'closed';
|
|
467
|
+
type TCaseEventKind = 'observed' | 'noted' | 'asked' | 'answered' | 'closed';
|
|
468
|
+
/**
|
|
469
|
+
* How soon the agent suggests a question be put to the person: `now` for what needs them soon, `digest`
|
|
470
|
+
* for what can wait for a daily summary, `feed` for the rest. It is only a suggestion: what actually
|
|
471
|
+
* reaches the person is decided by their own delivery limits.
|
|
472
|
+
*/
|
|
473
|
+
type TCaseUrgency = 'now' | 'digest' | 'feed';
|
|
474
|
+
/** Where a case came from: the service that showed it and the agent's own stable reference to the item. */
|
|
475
|
+
interface ICaseOrigin {
|
|
476
|
+
readonly connectorId?: string;
|
|
477
|
+
/** The same reference for the same item every time, so one source never opens two cases. */
|
|
478
|
+
readonly source: string;
|
|
479
|
+
}
|
|
480
|
+
interface ICaseNote {
|
|
481
|
+
readonly at: string;
|
|
482
|
+
readonly text: string;
|
|
483
|
+
}
|
|
484
|
+
/** The question a case is waiting on; at most one at a time. */
|
|
485
|
+
interface ICaseQuestion {
|
|
486
|
+
readonly text: string;
|
|
487
|
+
/** The answers the person may pick; empty when only a reply is wanted. */
|
|
488
|
+
readonly options: readonly string[];
|
|
489
|
+
readonly allowsReply: boolean;
|
|
490
|
+
readonly askedAt: string;
|
|
491
|
+
/** The feed item that shows the question to the person. */
|
|
492
|
+
readonly feedItemId: string;
|
|
493
|
+
/** The agent's suggestion of how urgent the question is; absent in a case written before it existed, which reads as `feed`. */
|
|
494
|
+
readonly urgency?: TCaseUrgency;
|
|
495
|
+
}
|
|
496
|
+
/** What happened on the case, oldest first. */
|
|
497
|
+
interface ICaseEvent {
|
|
498
|
+
readonly at: string;
|
|
499
|
+
readonly kind: TCaseEventKind;
|
|
500
|
+
readonly text: string;
|
|
501
|
+
}
|
|
502
|
+
interface ICase {
|
|
503
|
+
readonly id: string;
|
|
504
|
+
readonly title: string;
|
|
505
|
+
readonly origin: ICaseOrigin;
|
|
506
|
+
readonly state: TCaseState;
|
|
507
|
+
/** The agent's running notes, oldest first; what a question shows as its evidence. */
|
|
508
|
+
readonly notes: readonly ICaseNote[];
|
|
509
|
+
readonly question?: ICaseQuestion;
|
|
510
|
+
/**
|
|
511
|
+
* The feed item that showed the question the person answered last; it is where the case's resolution
|
|
512
|
+
* is shown if the case closes after that answer. Absent until a question is answered, and in a case
|
|
513
|
+
* written before it existed, where there is nothing to show it on.
|
|
514
|
+
*/
|
|
515
|
+
readonly lastAnsweredFeedItemId?: string;
|
|
516
|
+
readonly history: readonly ICaseEvent[];
|
|
517
|
+
readonly createdAt: string;
|
|
518
|
+
readonly updatedAt: string;
|
|
519
|
+
}
|
|
520
|
+
/** Where cases live; a host supplies one per principal. */
|
|
521
|
+
interface ICaseStore {
|
|
522
|
+
list(): Promise<readonly ICase[]>;
|
|
523
|
+
get(id: string): Promise<ICase | undefined>;
|
|
524
|
+
put(item: ICase): Promise<void>;
|
|
525
|
+
}
|
|
526
|
+
//#endregion
|
|
527
|
+
//#region src/personal/cases/case-book.d.ts
|
|
528
|
+
declare const CASE_URGENCIES: readonly TCaseUrgency[];
|
|
529
|
+
declare class CaseRefusedError extends Error {
|
|
530
|
+
constructor(reason: string);
|
|
531
|
+
}
|
|
532
|
+
/** What a host is told when a question was asked: the case, the card that shows it, and the urgency suggested. */
|
|
533
|
+
interface ICaseAskedEvent {
|
|
534
|
+
readonly case: ICase;
|
|
535
|
+
readonly item: IFeedItem;
|
|
536
|
+
readonly urgency: TCaseUrgency;
|
|
537
|
+
}
|
|
538
|
+
interface ICaseBookOptions {
|
|
539
|
+
readonly store: ICaseStore;
|
|
540
|
+
/** Where a question is shown to the person, and where their answer is recorded. */
|
|
541
|
+
readonly feed: GoalBook;
|
|
542
|
+
/**
|
|
543
|
+
* Called once a question has been asked and written. It is not waited for and cannot fail the ask: a
|
|
544
|
+
* question is already in the feed when this runs, whatever the host does about telling the person.
|
|
545
|
+
*/
|
|
546
|
+
readonly onAsked?: (event: ICaseAskedEvent) => void | Promise<void>;
|
|
547
|
+
readonly now?: () => Date;
|
|
548
|
+
}
|
|
549
|
+
interface IOpenCaseInput {
|
|
550
|
+
readonly title: string;
|
|
551
|
+
/** What was noticed and why it matters; the case's first note. */
|
|
552
|
+
readonly noticed: string;
|
|
553
|
+
/** The agent's own stable reference to the item, so the same item opens one case. */
|
|
554
|
+
readonly source: string;
|
|
555
|
+
readonly connectorId?: string;
|
|
556
|
+
}
|
|
557
|
+
interface IAskInput {
|
|
558
|
+
readonly question: string;
|
|
559
|
+
readonly options?: readonly string[];
|
|
560
|
+
/** Whether the person may answer in their own words; by default, when there are no choices. */
|
|
561
|
+
readonly allowsReply?: boolean;
|
|
562
|
+
/** How urgent the agent suggests the question is; `feed` when it says nothing. */
|
|
563
|
+
readonly urgency?: string;
|
|
564
|
+
}
|
|
565
|
+
interface IAnswerInput {
|
|
566
|
+
readonly choice?: string;
|
|
567
|
+
readonly reply?: string;
|
|
568
|
+
}
|
|
569
|
+
declare class CaseBook {
|
|
570
|
+
private readonly store;
|
|
571
|
+
private readonly feed;
|
|
572
|
+
private readonly onAsked;
|
|
573
|
+
private readonly now;
|
|
574
|
+
private sequence;
|
|
575
|
+
private tail;
|
|
576
|
+
constructor(options: ICaseBookOptions);
|
|
577
|
+
/** Tell the host a question was asked, without waiting for it and without letting it fail the ask. */
|
|
578
|
+
private announce;
|
|
579
|
+
private stamp;
|
|
580
|
+
/** One write at a time, so two calls in one turn cannot both pass a check the other changes. */
|
|
581
|
+
private exclusive;
|
|
582
|
+
private require;
|
|
583
|
+
private requireOpen;
|
|
584
|
+
/** A card that still looks open although its case moved on becomes a withdrawn one, which can be dismissed. */
|
|
585
|
+
private stale;
|
|
586
|
+
private requireRoom;
|
|
587
|
+
/** Open a case, or return the one this source already opened, open or closed. */
|
|
588
|
+
open(input: IOpenCaseInput): Promise<{
|
|
589
|
+
readonly case: ICase;
|
|
590
|
+
readonly existing: boolean;
|
|
591
|
+
}>;
|
|
592
|
+
note(id: string, text: string): Promise<ICase>;
|
|
593
|
+
/** Ask the person the case's one question; it shows in their feed with the notes as its evidence. */
|
|
594
|
+
ask(id: string, input: IAskInput): Promise<{
|
|
595
|
+
readonly case: ICase;
|
|
596
|
+
readonly item: IFeedItem;
|
|
597
|
+
}>;
|
|
598
|
+
/**
|
|
599
|
+
* Record the person's answer to a question in the feed: one of its choices, or a reply when the
|
|
600
|
+
* question allows one. The case moves on with no question waiting; what to do next is not decided here.
|
|
601
|
+
*/
|
|
602
|
+
answer(feedItemId: string, input: IAnswerInput): Promise<{
|
|
603
|
+
readonly case: ICase;
|
|
604
|
+
readonly item: IFeedItem;
|
|
605
|
+
}>;
|
|
606
|
+
/**
|
|
607
|
+
* Settle a case with a one-line resolution. A question still waiting is withdrawn from the feed; with
|
|
608
|
+
* none waiting, the resolution is shown on the card of the question the person answered last, so a
|
|
609
|
+
* close that matters to them (the agent telling them to go to the service directly, say) is not left
|
|
610
|
+
* in the case's thread alone. The case is written first: if that fails nothing changed and the case
|
|
611
|
+
* still waits on a visible card, and if the withdrawal fails the case is closed and its card is
|
|
612
|
+
* withdrawn when the person next answers it.
|
|
613
|
+
*/
|
|
614
|
+
close(id: string, resolution: string): Promise<ICase>;
|
|
615
|
+
/**
|
|
616
|
+
* The card shows a copy of what the closed case already holds, so a card that cannot take it is left
|
|
617
|
+
* as it is: failing the close here would tell the agent a close that happened had not, and a second
|
|
618
|
+
* close is refused, so nothing could be retried. The resolution stays in the case's thread.
|
|
619
|
+
*/
|
|
620
|
+
private showResolution;
|
|
621
|
+
get(id: string): Promise<ICase | undefined>;
|
|
622
|
+
/** Open cases first, then the ones closed last; each newest first. */
|
|
623
|
+
list(limit?: number): Promise<readonly ICase[]>;
|
|
624
|
+
}
|
|
625
|
+
//#endregion
|
|
626
|
+
//#region src/personal/cases/stores.d.ts
|
|
627
|
+
declare function createMemoryCaseStore(): ICaseStore;
|
|
628
|
+
declare function createFileCaseStore(directory: string): ICaseStore;
|
|
629
|
+
//#endregion
|
|
630
|
+
//#region src/personal/cases/tools.d.ts
|
|
631
|
+
declare const CASE_TOOL_NAMES: {
|
|
632
|
+
readonly open: "CaseOpen";
|
|
633
|
+
readonly note: "CaseNote";
|
|
634
|
+
readonly ask: "CaseAsk";
|
|
635
|
+
readonly close: "CaseClose";
|
|
636
|
+
};
|
|
637
|
+
declare function createCaseTools(book: CaseBook): FunctionTool[];
|
|
638
|
+
declare const CASE_INSTRUCTIONS: string;
|
|
639
|
+
//#endregion
|
|
640
|
+
//#region src/personal/cases/turn.d.ts
|
|
641
|
+
/**
|
|
642
|
+
* The only tools a case turn has: it may look at the connector and the library to check something
|
|
643
|
+
* related, and keep the case (note, ask, close). It cannot change a service, keep a fact, reach the web,
|
|
644
|
+
* the files or the browser, or set up goals. It is a list of what is allowed, not of what is withheld: a
|
|
645
|
+
* tool added later is then not offered until it is named.
|
|
646
|
+
*/
|
|
647
|
+
declare function caseTurnTools(): string[];
|
|
648
|
+
/**
|
|
649
|
+
* What a case turn is asked, as the goal's own text: short, and shown to the person with the goal. It
|
|
650
|
+
* carries no case text, since the title was written by the agent from content other people wrote.
|
|
651
|
+
*/
|
|
652
|
+
declare function caseTurnPrompt(): string;
|
|
653
|
+
/**
|
|
654
|
+
* What a case turn is told about how to work, for this turn: the person's answer and what to do. The
|
|
655
|
+
* title, the question and the notes were written by the agent from content other people wrote, so they
|
|
656
|
+
* come after the label that says so, and the directions come after them; only the case id and the
|
|
657
|
+
* person's own answer stand before it.
|
|
658
|
+
*/
|
|
659
|
+
declare function caseTurnInstructions(found: ICase): string;
|
|
660
|
+
//#endregion
|
|
661
|
+
//#region src/personal/delivery/types.d.ts
|
|
662
|
+
/** Times are `HH:MM` on a 24-hour clock, in the local time of the machine that runs the agent. */
|
|
663
|
+
interface IQuietHours {
|
|
664
|
+
readonly enabled: boolean;
|
|
665
|
+
readonly from: string;
|
|
666
|
+
readonly to: string;
|
|
667
|
+
}
|
|
668
|
+
interface IDigestSchedule {
|
|
669
|
+
readonly enabled: boolean;
|
|
670
|
+
readonly at: string;
|
|
671
|
+
}
|
|
672
|
+
/** The person's limits. Local time throughout: that of the machine running the agent. */
|
|
673
|
+
interface IDeliverySettings {
|
|
674
|
+
/** How many questions may be pushed immediately in one local day, 0 to 20; 0 pushes none. */
|
|
675
|
+
readonly dailyLimit: number;
|
|
676
|
+
/** While it lasts nothing is pushed immediately; a window may cross midnight. */
|
|
677
|
+
readonly quietHours: IQuietHours;
|
|
678
|
+
/** Whether questions that can wait are gathered into one daily summary, and when it goes out. */
|
|
679
|
+
readonly digest: IDigestSchedule;
|
|
680
|
+
}
|
|
681
|
+
/** What delivery remembers between runs. */
|
|
682
|
+
interface IDeliveryState {
|
|
683
|
+
/** The local day `sent` counts, as `YYYY-MM-DD`. */
|
|
684
|
+
readonly day: string;
|
|
685
|
+
/** How many questions were pushed immediately on `day`. */
|
|
686
|
+
readonly sent: number;
|
|
687
|
+
/** The local day the last digest went out. */
|
|
688
|
+
readonly digestedOn?: string;
|
|
689
|
+
/** Feed items waiting for the next digest. */
|
|
690
|
+
readonly pendingDigest: readonly string[];
|
|
691
|
+
}
|
|
692
|
+
/** What becomes of one question: pushed now, held for the daily summary, or left in the feed. */
|
|
693
|
+
type TDelivery = 'notify' | 'digest' | 'feed';
|
|
694
|
+
interface IDeliveryMessage {
|
|
695
|
+
/** A `test` message is the person's own check that a sink works; it is never a question. */
|
|
696
|
+
readonly kind: 'question' | 'digest' | 'test';
|
|
697
|
+
/** A short plain line that says what the message is about, for a sink that shows a heading. */
|
|
698
|
+
readonly title: string;
|
|
699
|
+
/** Plain text on one or a few lines; a sink adds nothing to it. */
|
|
700
|
+
readonly text: string;
|
|
701
|
+
}
|
|
702
|
+
/**
|
|
703
|
+
* Somewhere a message can be pushed to: the person's connected messengers, an address they gave, a page
|
|
704
|
+
* they have open. A sink that cannot take a message throws, which is how a push is told from one that
|
|
705
|
+
* was not taken.
|
|
706
|
+
*/
|
|
707
|
+
interface IDeliverySink {
|
|
708
|
+
readonly id: string;
|
|
709
|
+
deliver(message: IDeliveryMessage): Promise<void>;
|
|
710
|
+
}
|
|
711
|
+
/** Where one value lives between runs; a host supplies one for each. */
|
|
712
|
+
interface IDeliveryStore<T> {
|
|
713
|
+
/** The stored value, or `undefined` when nothing was stored yet. */
|
|
714
|
+
read(): Promise<T | undefined>;
|
|
715
|
+
write(value: T): Promise<void>;
|
|
716
|
+
}
|
|
717
|
+
/** What the person sees of delivery: their limits, today's pushes against them, and what waits for the digest. */
|
|
718
|
+
interface IDeliveryStatus {
|
|
719
|
+
readonly settings: IDeliverySettings;
|
|
720
|
+
readonly today: {
|
|
721
|
+
readonly sent: number;
|
|
722
|
+
readonly limit: number;
|
|
723
|
+
};
|
|
724
|
+
/** Open questions held for the next digest. */
|
|
725
|
+
readonly waitingInDigest: number;
|
|
726
|
+
}
|
|
727
|
+
/** The feed as delivery needs it: a card, looked up again before a digest names it. */
|
|
728
|
+
interface IDeliveryFeed {
|
|
729
|
+
feedItem(id: string): Promise<IFeedItem | undefined>;
|
|
730
|
+
}
|
|
731
|
+
//#endregion
|
|
732
|
+
//#region src/personal/delivery/policy.d.ts
|
|
733
|
+
declare const DAILY_LIMIT_MAX = 20;
|
|
734
|
+
declare const DEFAULT_DELIVERY_SETTINGS: IDeliverySettings;
|
|
735
|
+
declare class DeliveryRefusedError extends Error {
|
|
736
|
+
constructor(reason: string);
|
|
737
|
+
}
|
|
738
|
+
interface IDecideDeliveryInput {
|
|
739
|
+
readonly urgency: TCaseUrgency;
|
|
740
|
+
readonly now: Date;
|
|
741
|
+
readonly settings: IDeliverySettings;
|
|
742
|
+
/** How many questions were already pushed immediately on the local day of `now`. */
|
|
743
|
+
readonly sentToday: number;
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* `feed` stays in the feed. `digest` waits for the daily summary, or stays in the feed when there is
|
|
747
|
+
* none. `now` is pushed unless the person's quiet hours or daily limit say otherwise, and then it is
|
|
748
|
+
* held like a `digest`.
|
|
749
|
+
*/
|
|
750
|
+
declare function decideDelivery(input: IDecideDeliveryInput): TDelivery;
|
|
751
|
+
//#endregion
|
|
752
|
+
//#region src/personal/delivery/browser-outbox.d.ts
|
|
753
|
+
/** How many messages are kept; an older one is dropped for a new one. */
|
|
754
|
+
declare const BROWSER_OUTBOX_CAPACITY = 20;
|
|
755
|
+
/** How long after its last poll a page still counts as open. */
|
|
756
|
+
declare const BROWSER_LISTENING_MS = 90000;
|
|
757
|
+
interface IBrowserNotification {
|
|
758
|
+
/** Counts up from 1 for as long as the agent runs, so a page asks for what came after the last one it saw. */
|
|
759
|
+
readonly id: number;
|
|
760
|
+
readonly at: string;
|
|
761
|
+
readonly kind: IDeliveryMessage['kind'];
|
|
762
|
+
readonly title: string;
|
|
763
|
+
readonly text: string;
|
|
764
|
+
}
|
|
765
|
+
interface IBrowserOutboxOptions {
|
|
766
|
+
/** Milliseconds, on the clock the page's polls are counted by. */
|
|
767
|
+
readonly now?: () => number;
|
|
768
|
+
readonly capacity?: number;
|
|
769
|
+
readonly listeningMs?: number;
|
|
770
|
+
}
|
|
771
|
+
declare class BrowserOutbox implements IDeliverySink {
|
|
772
|
+
readonly id = "browser";
|
|
773
|
+
private readonly now;
|
|
774
|
+
private readonly capacity;
|
|
775
|
+
private readonly listeningMs;
|
|
776
|
+
private messages;
|
|
777
|
+
private latest;
|
|
778
|
+
private polledAt;
|
|
779
|
+
constructor(options?: IBrowserOutboxOptions);
|
|
780
|
+
/** Whether a page has polled lately enough to be open. */
|
|
781
|
+
listening(): boolean;
|
|
782
|
+
/** Keeps the message for the page to fetch, or throws when no page is open to take it. */
|
|
783
|
+
deliver(message: IDeliveryMessage): Promise<void>;
|
|
784
|
+
/**
|
|
785
|
+
* A page asks what came after the last message it saw; that it asked is what shows a page is open.
|
|
786
|
+
* A page with nothing yet asks from now on and gets none; one that remembers a later message than any
|
|
787
|
+
* here, as after a restart, gets everything kept.
|
|
788
|
+
*/
|
|
789
|
+
poll(after?: number): {
|
|
790
|
+
readonly messages: readonly IBrowserNotification[];
|
|
791
|
+
readonly latest: number;
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
//#endregion
|
|
795
|
+
//#region src/personal/delivery/notification-address.d.ts
|
|
796
|
+
declare const WEBHOOK_FORMATS: readonly ["plain", "json"];
|
|
797
|
+
type TWebhookFormat = (typeof WEBHOOK_FORMATS)[number];
|
|
798
|
+
/** The address as kept, and how a message is written to it. */
|
|
799
|
+
interface IWebhookTarget {
|
|
800
|
+
readonly url: string;
|
|
801
|
+
readonly format: TWebhookFormat;
|
|
802
|
+
}
|
|
803
|
+
/** Where the address lives between runs; a host supplies one. Only this module reads it. */
|
|
804
|
+
interface IWebhookStore {
|
|
805
|
+
read(): Promise<IWebhookTarget | undefined>;
|
|
806
|
+
write(value: IWebhookTarget): Promise<void>;
|
|
807
|
+
clear(): Promise<void>;
|
|
808
|
+
}
|
|
809
|
+
interface IWebhookRequest {
|
|
810
|
+
readonly url: string;
|
|
811
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
812
|
+
readonly body: string;
|
|
813
|
+
/** The whole exchange, answer included, is given up after this long. */
|
|
814
|
+
readonly timeoutMs: number;
|
|
815
|
+
}
|
|
816
|
+
/** The status of the answer, or why the destination was not reached; the words name no address. */
|
|
817
|
+
type TWebhookAnswer = {
|
|
818
|
+
readonly status: number;
|
|
819
|
+
} | {
|
|
820
|
+
readonly refused: string;
|
|
821
|
+
};
|
|
822
|
+
/** What the host lends for the network: its outbound-request policy and its way to send. */
|
|
823
|
+
interface IWebhookTransport {
|
|
824
|
+
/** Why this destination may not be reached, or `undefined` when it may. Words name no address. */
|
|
825
|
+
admit(url: URL): Promise<string | undefined>;
|
|
826
|
+
/**
|
|
827
|
+
* One request to the address, which is judged by the same policy again, with no redirect followed. It
|
|
828
|
+
* throws when the destination cannot be reached or does not answer in time.
|
|
829
|
+
*/
|
|
830
|
+
post(request: IWebhookRequest): Promise<TWebhookAnswer>;
|
|
831
|
+
}
|
|
832
|
+
/** What the person is told about the address: never the address itself. */
|
|
833
|
+
interface INotificationAddressView {
|
|
834
|
+
readonly configured: boolean;
|
|
835
|
+
/** The host (and port) the notifications go to; present only when one is set. */
|
|
836
|
+
readonly host?: string;
|
|
837
|
+
readonly format: TWebhookFormat;
|
|
838
|
+
}
|
|
839
|
+
declare function createMemoryWebhookStore(initial?: IWebhookTarget): IWebhookStore;
|
|
840
|
+
/**
|
|
841
|
+
* The address in an owner-only file of its own, in an owner-only directory, written atomically. A file
|
|
842
|
+
* that cannot be read as an address means no address: nothing is sent until the person sets one again.
|
|
843
|
+
*/
|
|
844
|
+
declare function createFileWebhookStore(directory: string): IWebhookStore;
|
|
845
|
+
/**
|
|
846
|
+
* The address a person typed, as a URL to judge, or a refusal in plain words that never repeats it. A
|
|
847
|
+
* secret-looking value inside the address is expected and is no reason to refuse it.
|
|
848
|
+
*/
|
|
849
|
+
declare function parseNotificationAddress(value: unknown): URL;
|
|
850
|
+
/** How one message is written to the address: the headers and the body. */
|
|
851
|
+
declare function webhookMessage(message: IDeliveryMessage, format: TWebhookFormat): {
|
|
852
|
+
readonly headers: Record<string, string>;
|
|
853
|
+
readonly body: string;
|
|
854
|
+
};
|
|
855
|
+
interface INotificationAddressOptions {
|
|
856
|
+
readonly store: IWebhookStore;
|
|
857
|
+
readonly transport: IWebhookTransport;
|
|
858
|
+
}
|
|
859
|
+
declare class NotificationAddress {
|
|
860
|
+
private readonly options;
|
|
861
|
+
/** Takes a message to the address, once. It throws when the address did not take it. */
|
|
862
|
+
readonly sink: IDeliverySink;
|
|
863
|
+
constructor(options: INotificationAddressOptions);
|
|
864
|
+
/** Whether an address is set, which is when its sink is worth offering a message. */
|
|
865
|
+
configured(): Promise<boolean>;
|
|
866
|
+
view(): Promise<INotificationAddressView>;
|
|
867
|
+
/**
|
|
868
|
+
* Keep the address the person gave, in place of any earlier one. `format` is `plain` when left out. It
|
|
869
|
+
* is refused whole, in words that never repeat the address, when it is not an `https` address without
|
|
870
|
+
* a user name or when the outbound-request policy does not allow its destination.
|
|
871
|
+
*/
|
|
872
|
+
set(change: unknown): Promise<INotificationAddressView>;
|
|
873
|
+
/** Forget the address: nothing is sent to it again. */
|
|
874
|
+
clear(): Promise<INotificationAddressView>;
|
|
875
|
+
/** Send the fixed test message to the address alone, and say in words that name no address if it did not take it. */
|
|
876
|
+
test(): Promise<void>;
|
|
877
|
+
private send;
|
|
878
|
+
}
|
|
879
|
+
//#endregion
|
|
880
|
+
//#region src/personal/delivery/question-delivery.d.ts
|
|
881
|
+
interface IQuestionDeliveryOptions {
|
|
882
|
+
/** The person's limits; none stored means the defaults. */
|
|
883
|
+
readonly settings: IDeliveryStore<IDeliverySettings>;
|
|
884
|
+
readonly state: IDeliveryStore<IDeliveryState>;
|
|
885
|
+
/**
|
|
886
|
+
* Where the person is told; a message goes to every sink. A function is asked again for each message,
|
|
887
|
+
* so a sink that exists only while the person has set it up is there for exactly that long.
|
|
888
|
+
*/
|
|
889
|
+
readonly sinks: readonly IDeliverySink[] | (() => Promise<readonly IDeliverySink[]>);
|
|
890
|
+
/** Where a held question is looked up again, to see whether it still waits for an answer. */
|
|
891
|
+
readonly feed: IDeliveryFeed;
|
|
892
|
+
/** The time of the machine running the agent; local day and local clock are read from it. */
|
|
893
|
+
readonly now?: () => Date;
|
|
894
|
+
/** How long a sink may take before its attempt is given up. */
|
|
895
|
+
readonly sinkTimeoutMs?: number;
|
|
896
|
+
}
|
|
897
|
+
declare class QuestionDelivery {
|
|
898
|
+
private readonly options;
|
|
899
|
+
private readonly now;
|
|
900
|
+
private readonly sinkTimeoutMs;
|
|
901
|
+
/** Decisions, pushes and digests go one at a time, so two questions cannot both pass the same limit. */
|
|
902
|
+
private readonly deliveries;
|
|
903
|
+
private readonly changes;
|
|
904
|
+
constructor(options: IQuestionDeliveryOptions);
|
|
905
|
+
private limits;
|
|
906
|
+
/** The counters for the local day of `at`: a new day starts the count over and keeps what is held. */
|
|
907
|
+
private load;
|
|
908
|
+
private attempt;
|
|
909
|
+
private sinks;
|
|
910
|
+
/** Send to every sink, once; how many took it. */
|
|
911
|
+
private send;
|
|
912
|
+
/** The held questions that still wait for an answer; answered, withdrawn and vanished ones drop out. */
|
|
913
|
+
private stillOpen;
|
|
914
|
+
/**
|
|
915
|
+
* A question was asked. It is pushed now, held for the digest or left alone as the person's limits
|
|
916
|
+
* say; a push counts toward today's limit only when a sink took it.
|
|
917
|
+
*/
|
|
918
|
+
onAsked(event: ICaseAskedEvent): Promise<void>;
|
|
919
|
+
/**
|
|
920
|
+
* Called every minute and once at start. Sends the day's one digest when its time has come, outside
|
|
921
|
+
* quiet hours, and some held question still waits for an answer; then forgets what was held and
|
|
922
|
+
* records the day, so a digest is attempted once a day.
|
|
923
|
+
*/
|
|
924
|
+
tick(): Promise<void>;
|
|
925
|
+
/** The person's limits, how many pushes are used today, and how many questions wait for the digest. */
|
|
926
|
+
status(): Promise<IDeliveryStatus>;
|
|
927
|
+
/**
|
|
928
|
+
* Change the person's limits: only what the change names, refused whole when any part is not valid.
|
|
929
|
+
* Only the person's own request reaches this; no tool does.
|
|
930
|
+
*/
|
|
931
|
+
updateSettings(change: unknown): Promise<IDeliverySettings>;
|
|
932
|
+
/** Resolves when everything started so far has finished. */
|
|
933
|
+
idle(): Promise<void>;
|
|
934
|
+
}
|
|
935
|
+
//#endregion
|
|
936
|
+
//#region src/personal/delivery/stores.d.ts
|
|
937
|
+
declare function createMemoryDeliveryStore<T>(initial?: T): IDeliveryStore<T>;
|
|
938
|
+
declare function createFileDeliveryStores(directory: string): {
|
|
939
|
+
readonly settings: IDeliveryStore<IDeliverySettings>;
|
|
940
|
+
readonly state: IDeliveryStore<IDeliveryState>;
|
|
941
|
+
};
|
|
942
|
+
//#endregion
|
|
418
943
|
//#region src/personal/goals/file-store.d.ts
|
|
419
944
|
declare function createFileGoalStore(directory: string): IGoalStore;
|
|
420
945
|
//#endregion
|
|
@@ -430,7 +955,10 @@ declare const GOAL_TOOL_NAMES: {
|
|
|
430
955
|
declare function renderGoal(goal: IGoal): string;
|
|
431
956
|
declare function createGoalTools(book: GoalBook): FunctionTool[];
|
|
432
957
|
declare const GOAL_INSTRUCTIONS: string;
|
|
433
|
-
/**
|
|
958
|
+
/**
|
|
959
|
+
* What a goal run's session is told, on top of the agent's usual instructions. A goal on a case is not
|
|
960
|
+
* named: its title is the case's, which the agent wrote from content other people wrote.
|
|
961
|
+
*/
|
|
434
962
|
declare function goalRunInstructions(goal: IGoal): string;
|
|
435
963
|
//#endregion
|
|
436
964
|
//#region src/personal/ideas/ideas.d.ts
|
|
@@ -677,6 +1205,12 @@ declare class SpaceBook {
|
|
|
677
1205
|
/** What a connector is for. A tag the person and the agent read, not a code path. */
|
|
678
1206
|
type TConnectorKind = 'mail' | 'calendar' | 'files' | 'chat' | 'notes' | 'other';
|
|
679
1207
|
declare const CONNECTOR_KINDS: readonly TConnectorKind[];
|
|
1208
|
+
/**
|
|
1209
|
+
* How a service asks the person to sign in: `oauth` (a sign-in in their browser, the default), `token`
|
|
1210
|
+
* (a token they type once) or `none` (the service needs no sign-in).
|
|
1211
|
+
*/
|
|
1212
|
+
type TConnectorAuth = 'oauth' | 'token' | 'none';
|
|
1213
|
+
declare const CONNECTOR_AUTHS: readonly TConnectorAuth[];
|
|
680
1214
|
/** The person's own decision about one tool, over what the service claims about it. */
|
|
681
1215
|
type TToolDecision = 'read' | 'write' | 'blocked';
|
|
682
1216
|
/** What a tool is treated as: reading is allowed, writing is held for the person, blocked is never called. */
|
|
@@ -690,16 +1224,34 @@ interface IConnector {
|
|
|
690
1224
|
readonly protocol: string;
|
|
691
1225
|
/** Where the service is reached: an `https` address that carries no credential. */
|
|
692
1226
|
readonly endpoint: string;
|
|
1227
|
+
/** How it asks the person to sign in; absent means `oauth`. */
|
|
1228
|
+
readonly auth?: TConnectorAuth;
|
|
1229
|
+
/**
|
|
1230
|
+
* With `token`: the header the token goes in when it is not the standard `Authorization` bearer.
|
|
1231
|
+
* A name only; the token itself is never in a connector.
|
|
1232
|
+
*/
|
|
1233
|
+
readonly tokenHeader?: string;
|
|
693
1234
|
/**
|
|
694
1235
|
* What the person registered with the service's authorization server when it has no dynamic
|
|
695
|
-
* registration. Public values only: a secret never lives in a connector.
|
|
1236
|
+
* registration. Public values only: a secret never lives in a connector (it is typed at sign-in).
|
|
696
1237
|
*/
|
|
697
1238
|
readonly oauth?: {
|
|
698
1239
|
readonly clientId?: string;
|
|
699
1240
|
readonly scopes?: readonly string[];
|
|
1241
|
+
/**
|
|
1242
|
+
* Plain-word parameters the person's sign-in adds to the authorization request, for a service
|
|
1243
|
+
* that needs one to keep a sign-in long-lived. Never a secret.
|
|
1244
|
+
*/
|
|
1245
|
+
readonly authorizationParams?: Readonly<Record<string, string>>;
|
|
700
1246
|
};
|
|
701
1247
|
/** The person's decisions, by tool name. A tool without one is sorted by what the service claims. */
|
|
702
1248
|
readonly decisions: Readonly<Record<string, TToolDecision>>;
|
|
1249
|
+
/**
|
|
1250
|
+
* What deserves a question, in the person's own words: one short paragraph a sync run reads before
|
|
1251
|
+
* it looks at the service. Absent means the default for the connector's kind. Only the person sets
|
|
1252
|
+
* it; nothing read from the service ever does.
|
|
1253
|
+
*/
|
|
1254
|
+
readonly attention?: string;
|
|
703
1255
|
readonly createdAt: string;
|
|
704
1256
|
readonly updatedAt: string;
|
|
705
1257
|
}
|
|
@@ -741,7 +1293,19 @@ interface IConnectorStatus {
|
|
|
741
1293
|
}
|
|
742
1294
|
/** Where the person's browser reaches this agent; the consent returns there. */
|
|
743
1295
|
interface ISignInContext {
|
|
744
|
-
|
|
1296
|
+
/** Where the person's browser reaches this agent; an `oauth` sign-in needs it, the others do not. */
|
|
1297
|
+
readonly origin?: string;
|
|
1298
|
+
/**
|
|
1299
|
+
* The token the person typed for a `token` connector. Held until it is checked and then only in
|
|
1300
|
+
* the owner-only credential directory: never in a connector, an answer or a log.
|
|
1301
|
+
*/
|
|
1302
|
+
readonly token?: string;
|
|
1303
|
+
/**
|
|
1304
|
+
* The client secret the person typed for this sign-in, for a service that gives its pre-registered
|
|
1305
|
+
* client one. It is held only until the sign-in ends and then only with the credential the
|
|
1306
|
+
* protocol keeps owner-only: never in a connector, an answer or a log.
|
|
1307
|
+
*/
|
|
1308
|
+
readonly clientSecret?: string;
|
|
745
1309
|
}
|
|
746
1310
|
type TRevocation = 'revoked' | 'partial' | 'unsupported' | 'failed' | 'not-attempted';
|
|
747
1311
|
interface IDisconnectOutcome {
|
|
@@ -795,9 +1359,12 @@ interface ICreateConnectorInput {
|
|
|
795
1359
|
readonly kind: TConnectorKind;
|
|
796
1360
|
readonly protocol: string;
|
|
797
1361
|
readonly endpoint: string;
|
|
1362
|
+
readonly auth?: TConnectorAuth;
|
|
1363
|
+
readonly tokenHeader?: string;
|
|
798
1364
|
readonly oauth?: {
|
|
799
1365
|
readonly clientId?: string;
|
|
800
1366
|
readonly scopes?: readonly string[];
|
|
1367
|
+
readonly authorizationParams?: Readonly<Record<string, string>>;
|
|
801
1368
|
};
|
|
802
1369
|
}
|
|
803
1370
|
declare class ConnectorBook {
|
|
@@ -809,15 +1376,58 @@ declare class ConnectorBook {
|
|
|
809
1376
|
readonly now?: () => Date;
|
|
810
1377
|
});
|
|
811
1378
|
create(input: ICreateConnectorInput): Promise<IConnector>;
|
|
812
|
-
private checkOAuth;
|
|
813
1379
|
list(): Promise<readonly IConnector[]>;
|
|
814
1380
|
get(id: string): Promise<IConnector | undefined>;
|
|
815
1381
|
existing(id: string): Promise<IConnector>;
|
|
816
1382
|
/** Record the person's decision about one tool, or clear it with `undefined`. */
|
|
817
1383
|
decide(id: string, tool: string, decision: TToolDecision | undefined): Promise<IConnector>;
|
|
1384
|
+
/** Record what the person wants to be asked about, in their own words; empty text clears it. */
|
|
1385
|
+
setAttention(id: string, text: string): Promise<IConnector>;
|
|
818
1386
|
remove(id: string): Promise<void>;
|
|
819
1387
|
}
|
|
820
1388
|
//#endregion
|
|
1389
|
+
//#region src/personal/connectors/attention.d.ts
|
|
1390
|
+
/** The longest attention text kept: one short paragraph. */
|
|
1391
|
+
declare const ATTENTION_MAX_CHARACTERS = 600;
|
|
1392
|
+
/** What a connector of this kind asks about until the person words it themselves. */
|
|
1393
|
+
declare function defaultAttention(kind: TConnectorKind): string;
|
|
1394
|
+
/**
|
|
1395
|
+
* The words a sync run is given: the person's own text, or the default for the connector's kind. A
|
|
1396
|
+
* stored text that cannot be used as written (a hand-edited or damaged file) is normalised the way a
|
|
1397
|
+
* saved one is, and an unusable one falls back to the default rather than guessing at it.
|
|
1398
|
+
*/
|
|
1399
|
+
declare function effectiveAttention(connector: IConnector): string;
|
|
1400
|
+
//#endregion
|
|
1401
|
+
//#region src/personal/connectors/catalog.d.ts
|
|
1402
|
+
interface IConnectorCatalogEntry {
|
|
1403
|
+
readonly title: string;
|
|
1404
|
+
readonly endpoint: string;
|
|
1405
|
+
readonly kind: TConnectorKind;
|
|
1406
|
+
/** How the service is expected to be signed in to; the person can change it before adding. */
|
|
1407
|
+
readonly auth: TConnectorAuth;
|
|
1408
|
+
readonly tokenHeader?: string;
|
|
1409
|
+
/**
|
|
1410
|
+
* A client the owner registered with the service for this agent, so a person need not register one:
|
|
1411
|
+
* only the owner's file can carry it. The client's secret, if it has one, is never in a suggestion;
|
|
1412
|
+
* the person types it at sign-in.
|
|
1413
|
+
*/
|
|
1414
|
+
readonly oauth?: {
|
|
1415
|
+
readonly clientId?: string;
|
|
1416
|
+
readonly scopes?: readonly string[];
|
|
1417
|
+
readonly authorizationParams?: Readonly<Record<string, string>>;
|
|
1418
|
+
};
|
|
1419
|
+
readonly description?: string;
|
|
1420
|
+
/** Where the suggestion came from, as a word the page shows. */
|
|
1421
|
+
readonly source: string;
|
|
1422
|
+
}
|
|
1423
|
+
/**
|
|
1424
|
+
* A catalog entry from one raw record, or `undefined` when the record is not a suggestion the book
|
|
1425
|
+
* would accept (a missing or unusable address, an unknown sign-in way, a header the connection owns).
|
|
1426
|
+
*/
|
|
1427
|
+
declare function catalogEntryOf(raw: unknown, source: string): IConnectorCatalogEntry | undefined;
|
|
1428
|
+
/** The services of one page of a registry's answer that can be added here, one entry per address. */
|
|
1429
|
+
declare function catalogEntriesFromRegistry(page: unknown): IConnectorCatalogEntry[];
|
|
1430
|
+
//#endregion
|
|
821
1431
|
//#region src/personal/connectors/registry.d.ts
|
|
822
1432
|
interface IConnectorToolView extends IConnectorToolInfo {
|
|
823
1433
|
/** What the tool is treated as. */
|
|
@@ -922,14 +1532,19 @@ declare const SYNC_MIN_MINUTES = 15;
|
|
|
922
1532
|
declare const SYNC_MAX_MINUTES: number;
|
|
923
1533
|
/**
|
|
924
1534
|
* The only tools a sync run has. Content from the service is written by others, so a run can read it,
|
|
925
|
-
* look in the library
|
|
926
|
-
* web or the files, drive the browser, rewrite what the
|
|
1535
|
+
* look in the library, add what it finds and keep a case on what the person should be asked, and nothing
|
|
1536
|
+
* else: it cannot change the service, reach the web or the files, drive the browser, rewrite what the
|
|
1537
|
+
* person said or set up goals. The case tools touch only the agent's own record and the feed. It is a list of
|
|
927
1538
|
* what is allowed, not of what is withheld: a tool added later is then not offered until it is named.
|
|
928
1539
|
*/
|
|
929
1540
|
declare function syncRunTools(): string[];
|
|
930
1541
|
/** What a sync run is asked, as the goal's own text: short, and shown to the person with the goal. */
|
|
931
1542
|
declare function syncGoalPrompt(connector: IConnector): string;
|
|
932
|
-
/**
|
|
1543
|
+
/**
|
|
1544
|
+
* What a sync run is told about how to work, for this run: the connector, where to start, and the
|
|
1545
|
+
* person's own words about what deserves a question. Those words come before the rules for handling
|
|
1546
|
+
* what is read, and they decide only what the run asks about: they add no tool and no permission.
|
|
1547
|
+
*/
|
|
933
1548
|
declare function syncRunInstructions(connector: IConnector, since: string | undefined): string;
|
|
934
1549
|
interface IConnectorSyncStatus {
|
|
935
1550
|
readonly goalId: string;
|
|
@@ -954,5 +1569,5 @@ declare class ConnectorSync {
|
|
|
954
1569
|
disable(connectorId: string): Promise<boolean>;
|
|
955
1570
|
}
|
|
956
1571
|
//#endregion
|
|
957
|
-
export { BROWSER_INSTRUCTIONS, BROWSER_TOOL_NAMES, BrowserNavigationRefusedError, BrowserUnavailableError, CONNECTOR_INSTRUCTIONS, CONNECTOR_KINDS, CONNECTOR_TOOL_NAMES, ConnectorBook, ConnectorRefusedError, ConnectorRegistry, ConnectorSync, GOAL_INSTRUCTIONS, GOAL_TOOL_NAMES, GoalBook, GoalRefusedError, type IBrowserActionResult, type IBrowserMark, type IBrowserPort, type IBrowserSnapshot, type IBrowserView, type IChannelAdapter, type IChannelApprovalAnswer, type IChannelApprovalRequest, type IChannelBinding, type IChannelCapabilities, type IChannelHandler, type IChannelHub, type IChannelHubOptions, type IChannelMessage, type IClaim, type IClaimSource, type IConnector, type IConnectorCallResult, type IConnectorProtocol, type IConnectorRegistryOptions, type IConnectorStatus, type IConnectorStore, type IConnectorSyncStatus, type IConnectorToolHints, type IConnectorToolInfo, type IConnectorToolView, type IConnectorView, type ICreateConnectorInput, type ICreateGoalInput, IDEA_INSTRUCTIONS, IDEA_TOOL_NAMES, type IDisconnectOutcome, type IFeedItem, type IFixtureChannel, type IGoal, type IGoalAction, type IGoalBookOptions, type IGoalRun, type IGoalStore, type IHeldSubmission, type IIdea, type IIdeaBookOptions, type IIdeaStore, type IKnowledgeStore, type IKnowledgeWikiOptions, type ILintReport, type IRememberInput, type IRememberResult, type ISearchHit, type ISignInContext, type ISpace, type ISpacePage, type ISpaceStore, type IWikiLogEntry, type IWikiPage, IdeaBook, IdeaRefusedError, KnowledgeWiki, PAGE_KINDS, SYNC_MAX_MINUTES, SYNC_MIN_MINUTES, SensitiveContentRefusedError, SpaceBook, SpaceRefusedError, type TApprovalState, type TChannelApprovalAnswer, type TChannelTurn, type TClaimOrigin, type TConnectorKind, type TConnectorState, type TFeedKind, type TGoalRunOutcome, type TGoalStatus, type TIdeaOrigin, type TIdeaStatus, type TPageKind, type TRevocation, type TToolAccess, type TToolDecision, type TWikiLogAction, WIKI_INSTRUCTIONS, WIKI_TOOL_NAMES, classifyTool, connectorReference, countPulled, createBrowserTools, createChannelHub, createConnectorKeepTool, createConnectorTools, createFileConnectorStore, createFileGoalStore, createFileIdeaStore, createFileKnowledgeStore, createFileSpaceStore, createFixtureChannel, createGoalTools, createIdeaTools, createMemoryConnectorStore, createMemoryGoalStore, createMemoryIdeaStore, createMemoryKnowledgeStore, createMemorySpaceStore, createWikiTools, forgetPulled, goalRunInstructions, originOfConnector, pageIdFor, renderGoal, renderPageForModel, renderPageMarkdown, renderView, splitForChannel, syncGoalPrompt, syncRunInstructions, syncRunTools };
|
|
1572
|
+
export { ATTENTION_MAX_CHARACTERS, BROWSER_INSTRUCTIONS, BROWSER_LISTENING_MS, BROWSER_OUTBOX_CAPACITY, BROWSER_TOOL_NAMES, BrowserNavigationRefusedError, BrowserOutbox, BrowserUnavailableError, CASE_INSTRUCTIONS, CASE_TOOL_NAMES, CASE_URGENCIES, CONNECTOR_AUTHS, CONNECTOR_INSTRUCTIONS, CONNECTOR_KINDS, CONNECTOR_TOOL_NAMES, CaseBook, CaseRefusedError, ConnectorBook, ConnectorRefusedError, ConnectorRegistry, ConnectorSync, DAILY_LIMIT_MAX, DEFAULT_DELIVERY_SETTINGS, DeliveryRefusedError, GOAL_INSTRUCTIONS, GOAL_TOOL_NAMES, GoalBook, GoalRefusedError, type IAnswerInput, type IAskInput, type IBrowserActionResult, type IBrowserMark, type IBrowserNotification, type IBrowserOutboxOptions, type IBrowserPort, type IBrowserSnapshot, type IBrowserView, type ICase, type ICaseAskedEvent, type ICaseBookOptions, type ICaseEvent, type ICaseNote, type ICaseOrigin, type ICaseQuestion, type ICaseStore, type IChannelAdapter, type IChannelApprovalAnswer, type IChannelApprovalRequest, type IChannelBinding, type IChannelCapabilities, type IChannelHandler, type IChannelHub, type IChannelHubOptions, type IChannelMessage, type IClaim, type IClaimSource, type IConnector, type IConnectorCallResult, type IConnectorCatalogEntry, type IConnectorProtocol, type IConnectorRegistryOptions, type IConnectorStatus, type IConnectorStore, type IConnectorSyncStatus, type IConnectorToolHints, type IConnectorToolInfo, type IConnectorToolView, type IConnectorView, type ICreateConnectorInput, type ICreateGoalInput, IDEA_INSTRUCTIONS, IDEA_TOOL_NAMES, type IDecideDeliveryInput, type IDeliveryFeed, type IDeliveryMessage, type IDeliverySettings, type IDeliverySink, type IDeliveryState, type IDeliveryStatus, type IDeliveryStore, type IDigestSchedule, type IDisconnectOutcome, type IFeedItem, type IFeedQuestion, type IFixtureChannel, type IGoal, type IGoalAction, type IGoalBookOptions, type IGoalRun, type IGoalStore, type IHeldSubmission, type IIdea, type IIdeaBookOptions, type IIdeaStore, type IKnowledgeStore, type IKnowledgeWikiOptions, type ILintReport, type INotificationAddressOptions, type INotificationAddressView, type IOpenCaseInput, type IQuestionAnswer, type IQuestionDeliveryOptions, type IQuietHours, type IRememberInput, type IRememberResult, type ISearchHit, type ISignInContext, type ISpace, type ISpacePage, type ISpaceStore, type IWebhookRequest, type IWebhookStore, type IWebhookTarget, type IWebhookTransport, type IWikiLogEntry, type IWikiPage, IdeaBook, IdeaRefusedError, KnowledgeWiki, NotificationAddress, PAGE_KINDS, QuestionDelivery, SYNC_MAX_MINUTES, SYNC_MIN_MINUTES, SensitiveContentRefusedError, SpaceBook, SpaceRefusedError, type TApprovalState, type TCaseEventKind, type TCaseState, type TCaseUrgency, type TChannelApprovalAnswer, type TChannelTurn, type TClaimOrigin, type TConnectorAuth, type TConnectorKind, type TConnectorState, type TDelivery, type TFeedKind, type TGoalRunOutcome, type TGoalStatus, type TIdeaOrigin, type TIdeaStatus, type TPageKind, type TQuestionState, type TRevocation, type TToolAccess, type TToolDecision, type TWebhookAnswer, type TWebhookFormat, type TWikiLogAction, WEBHOOK_FORMATS, WIKI_INSTRUCTIONS, WIKI_TOOL_NAMES, caseTurnInstructions, caseTurnPrompt, caseTurnTools, catalogEntriesFromRegistry, catalogEntryOf, classifyTool, connectorReference, countPulled, createBrowserTools, createCaseTools, createChannelHub, createConnectorKeepTool, createConnectorTools, createFileCaseStore, createFileConnectorStore, createFileDeliveryStores, createFileGoalStore, createFileIdeaStore, createFileKnowledgeStore, createFileSpaceStore, createFileWebhookStore, createFixtureChannel, createGoalTools, createIdeaTools, createMemoryCaseStore, createMemoryConnectorStore, createMemoryDeliveryStore, createMemoryGoalStore, createMemoryIdeaStore, createMemoryKnowledgeStore, createMemorySpaceStore, createMemoryWebhookStore, createWikiTools, decideDelivery, defaultAttention, effectiveAttention, forgetPulled, goalRunInstructions, originOfConnector, pageIdFor, parseNotificationAddress, renderGoal, renderPageForModel, renderPageMarkdown, renderView, splitForChannel, syncGoalPrompt, syncRunInstructions, syncRunTools, webhookMessage };
|
|
958
1573
|
//# sourceMappingURL=index.d.ts.map
|