@oddington/sdk 0.1.77 → 0.1.79
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/README.md +10 -2
- package/dist/browser.js +13 -7
- package/dist/index.js +4 -4
- package/dist/types/packages/sdk/src/routine-definition-types.d.ts +7 -1
- package/dist/types/shared/inbox-contract.d.ts +1 -0
- package/dist/types/shared/inbox-member-types.d.ts +1 -0
- package/dist/types/shared/inbox-records.d.ts +2 -1
- package/dist/types/shared/record-display.d.ts +2 -1
- package/dist/types/shared/record-link.d.ts +6 -0
- package/package.json +1 -1
|
@@ -102,7 +102,13 @@ export type ResponseCapabilities = SharedRoutineCapabilities<{
|
|
|
102
102
|
connections: readonly string[];
|
|
103
103
|
ai: true;
|
|
104
104
|
publish: readonly ('asks' | 'digests')[];
|
|
105
|
-
}
|
|
105
|
+
}> & {
|
|
106
|
+
readonly action: {
|
|
107
|
+
progress(value: {
|
|
108
|
+
label: string;
|
|
109
|
+
}): Promise<void>;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
106
112
|
export type ResponseAction<Input extends JsonValue = JsonValue> = Omit<Handler<Input>, 'run'> & {
|
|
107
113
|
run(context: HandlerRuntime<Input>, os: ResponseCapabilities): Promise<HandlerTransition>;
|
|
108
114
|
};
|
|
@@ -40,6 +40,7 @@ export type QuestionStatus = {
|
|
|
40
40
|
} | ActionStatus;
|
|
41
41
|
export interface ResponseConsequence {
|
|
42
42
|
phase: 'loading' | 'invoking' | 'committing' | null;
|
|
43
|
+
progressLabel?: string | null;
|
|
43
44
|
updatedAt: string;
|
|
44
45
|
evidence: Array<RepositoryReceipt | AirtableReceipt>;
|
|
45
46
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type QualifiedRecordRef, type InboxBlock } from './inbox-contract.js';
|
|
2
2
|
import type { CollectionSchema, SelectedRecord } from './data-contract.js';
|
|
3
|
+
import { type RecordDisplayLinkTitle } from './record-display.js';
|
|
3
4
|
export type InboxRecord = QualifiedRecordRef & {
|
|
4
5
|
record: SelectedRecord | null;
|
|
5
6
|
schema: CollectionSchema | null;
|
|
@@ -26,5 +27,5 @@ export declare const recordKey: ({ repository, ref }: QualifiedRecordRef) => str
|
|
|
26
27
|
/** Only authored Record blocks disclose bootstrap hydration destinations. */
|
|
27
28
|
export declare function authoredInboxRecordRefs(body: InboxBlock[]): QualifiedRecordRef[];
|
|
28
29
|
/** Inbox's existing title policy, shared by full Records and immediate summaries. */
|
|
29
|
-
export declare function inboxRecordTitle(entry: InboxRecord): string;
|
|
30
|
+
export declare function inboxRecordTitle(entry: InboxRecord, linkedTitle?: RecordDisplayLinkTitle): string;
|
|
30
31
|
export declare function parseInboxRecords(value: unknown, maximumRecords?: number): InboxRecords;
|
|
@@ -4,8 +4,9 @@ type DisplayField = {
|
|
|
4
4
|
readonly kind: string;
|
|
5
5
|
readonly many: boolean;
|
|
6
6
|
};
|
|
7
|
+
export type RecordDisplayLinkTitle = (ref: string) => string | undefined;
|
|
7
8
|
type InvalidDisplay = (message: string) => never;
|
|
8
9
|
export declare function parseRecordDisplay(value: unknown, definitions: readonly DisplayField[], fail?: InvalidDisplay): RecordDisplay | undefined;
|
|
9
10
|
/** Resolve the schema-owned short presentation title without changing Record identity. */
|
|
10
|
-
export declare function recordDisplayTitle(record: Record<string, unknown>, display
|
|
11
|
+
export declare function recordDisplayTitle(record: Record<string, unknown>, display: Readonly<RecordDisplay> | undefined, definitions: readonly DisplayField[], linkedTitle?: RecordDisplayLinkTitle): string | undefined;
|
|
11
12
|
export {};
|