exponential-sdk 1.22.0 → 1.24.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/index.d.ts +311 -5
- package/dist/index.js +66 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -284,6 +284,14 @@ interface TrpcClient {
|
|
|
284
284
|
limit?: number;
|
|
285
285
|
}) => Promise<unknown>;
|
|
286
286
|
};
|
|
287
|
+
knowledge: {
|
|
288
|
+
query: (input: {
|
|
289
|
+
query: string;
|
|
290
|
+
workspaceId: string;
|
|
291
|
+
limit?: number;
|
|
292
|
+
sourceTypes?: ('transcription' | 'resource' | 'document' | 'page')[];
|
|
293
|
+
}) => Promise<unknown>;
|
|
294
|
+
};
|
|
287
295
|
};
|
|
288
296
|
action: {
|
|
289
297
|
getAll: {
|
|
@@ -905,6 +913,16 @@ interface TrpcClient {
|
|
|
905
913
|
get: {
|
|
906
914
|
query: (input: {
|
|
907
915
|
id: string;
|
|
916
|
+
format?: 'full' | 'markdown' | 'outline';
|
|
917
|
+
section?: string;
|
|
918
|
+
}) => Promise<unknown>;
|
|
919
|
+
};
|
|
920
|
+
search: {
|
|
921
|
+
query: (input: {
|
|
922
|
+
workspaceId: string;
|
|
923
|
+
query: string;
|
|
924
|
+
projectId?: string;
|
|
925
|
+
limit?: number;
|
|
908
926
|
}) => Promise<unknown>;
|
|
909
927
|
};
|
|
910
928
|
create: {
|
|
@@ -914,6 +932,9 @@ interface TrpcClient {
|
|
|
914
932
|
title?: string;
|
|
915
933
|
body?: string;
|
|
916
934
|
includeInSearch?: boolean;
|
|
935
|
+
note?: string;
|
|
936
|
+
source?: string | null;
|
|
937
|
+
asOf?: Date | null;
|
|
917
938
|
}) => Promise<unknown>;
|
|
918
939
|
};
|
|
919
940
|
update: {
|
|
@@ -923,6 +944,38 @@ interface TrpcClient {
|
|
|
923
944
|
projectId?: string | null;
|
|
924
945
|
includeInSearch?: boolean;
|
|
925
946
|
body?: string;
|
|
947
|
+
baseVersion?: number;
|
|
948
|
+
note?: string;
|
|
949
|
+
source?: string | null;
|
|
950
|
+
asOf?: Date | null;
|
|
951
|
+
}) => Promise<unknown>;
|
|
952
|
+
};
|
|
953
|
+
history: {
|
|
954
|
+
query: (input: {
|
|
955
|
+
id: string;
|
|
956
|
+
limit?: number;
|
|
957
|
+
cursor?: string;
|
|
958
|
+
}) => Promise<unknown>;
|
|
959
|
+
};
|
|
960
|
+
revision: {
|
|
961
|
+
query: (input: {
|
|
962
|
+
id: string;
|
|
963
|
+
revisionId: string;
|
|
964
|
+
}) => Promise<unknown>;
|
|
965
|
+
};
|
|
966
|
+
diff: {
|
|
967
|
+
query: (input: {
|
|
968
|
+
id: string;
|
|
969
|
+
revisionId: string;
|
|
970
|
+
against?: string;
|
|
971
|
+
}) => Promise<unknown>;
|
|
972
|
+
};
|
|
973
|
+
restore: {
|
|
974
|
+
mutate: (input: {
|
|
975
|
+
id: string;
|
|
976
|
+
revisionId: string;
|
|
977
|
+
note?: string;
|
|
978
|
+
baseVersion?: number;
|
|
926
979
|
}) => Promise<unknown>;
|
|
927
980
|
};
|
|
928
981
|
};
|
|
@@ -3090,8 +3143,19 @@ declare class DecisionsApi {
|
|
|
3090
3143
|
unlink(workspaceId: string, linkId: string): Promise<{
|
|
3091
3144
|
deleted: boolean;
|
|
3092
3145
|
}>;
|
|
3093
|
-
/**
|
|
3094
|
-
|
|
3146
|
+
/**
|
|
3147
|
+
* Publish a draft into the log. Needs a person's login: agent keys are
|
|
3148
|
+
* refused. Idempotent on a decision that is already confirmed.
|
|
3149
|
+
*
|
|
3150
|
+
* `status` moves it in the same write — `{ status: 'ACCEPTED' }` is
|
|
3151
|
+
* "confirm as accepted", and works on an already-confirmed decision too.
|
|
3152
|
+
* `SUPERSEDED` is refused (it needs a successor; use {@link setStatus}).
|
|
3153
|
+
* A person confirming or accepting a decision that no person stands behind
|
|
3154
|
+
* becomes its decider. `decisionId` may also be a `D-0006` label.
|
|
3155
|
+
*/
|
|
3156
|
+
confirmDraft(workspaceId: string, decisionId: string, options?: {
|
|
3157
|
+
status?: DecisionStatus;
|
|
3158
|
+
}): Promise<Decision>;
|
|
3095
3159
|
/**
|
|
3096
3160
|
* Reject a draft. Confirmed decisions are never rejected — deprecate or
|
|
3097
3161
|
* supersede them through {@link setStatus}.
|
|
@@ -4038,9 +4102,19 @@ interface KnowledgePage {
|
|
|
4038
4102
|
workspaceId: string;
|
|
4039
4103
|
projectId: string | null;
|
|
4040
4104
|
title: string;
|
|
4105
|
+
/**
|
|
4106
|
+
* Markdown body. With `format: "outline"` this is null; with `section` it is
|
|
4107
|
+
* that section only (see `section`).
|
|
4108
|
+
*/
|
|
4041
4109
|
body: string | null;
|
|
4110
|
+
/** UTF-8 size of the whole Markdown body, whatever `format`/`section` returned. */
|
|
4111
|
+
bodyBytes?: number;
|
|
4042
4112
|
includeInSearch: boolean;
|
|
4043
4113
|
docVersion: number;
|
|
4114
|
+
/** Provenance (ADR-0074): where the page's facts come from — a URL, a document, a person. */
|
|
4115
|
+
source?: string | null;
|
|
4116
|
+
/** Provenance (ADR-0074): the date the page's facts were true. */
|
|
4117
|
+
asOf?: Date | null;
|
|
4044
4118
|
createdById: string;
|
|
4045
4119
|
createdAt: Date;
|
|
4046
4120
|
updatedAt: Date;
|
|
@@ -4056,13 +4130,148 @@ interface KnowledgePage {
|
|
|
4056
4130
|
};
|
|
4057
4131
|
/** Present on `get` responses: whether the caller may edit the page. */
|
|
4058
4132
|
canEdit?: boolean;
|
|
4133
|
+
/** Present on `get` responses: which `format` produced this payload. */
|
|
4134
|
+
format?: PageGetFormat;
|
|
4135
|
+
/** Present on `get` with `format: "outline"`: the page's headings. */
|
|
4136
|
+
outline?: PageOutlineEntry[] | null;
|
|
4137
|
+
/** Present on `get` with `section`: the heading the body was narrowed to. */
|
|
4138
|
+
section?: PageOutlineEntry | null;
|
|
4139
|
+
}
|
|
4140
|
+
type PageGetFormat = 'full' | 'markdown' | 'outline';
|
|
4141
|
+
interface PageOutlineEntry {
|
|
4142
|
+
/** Heading depth, 1–6. */
|
|
4143
|
+
level: number;
|
|
4144
|
+
text: string;
|
|
4145
|
+
/** 0-based line in the Markdown body. */
|
|
4146
|
+
line: number;
|
|
4147
|
+
}
|
|
4148
|
+
/** `baseline` is the unattributed starting row seeded for pages that predate history. */
|
|
4149
|
+
type PageRevisionKind = 'baseline' | 'create' | 'editor' | 'markdown' | 'restore';
|
|
4150
|
+
interface PageRevisionAuthor {
|
|
4151
|
+
id: string;
|
|
4152
|
+
name: string | null;
|
|
4153
|
+
image: string | null;
|
|
4154
|
+
}
|
|
4155
|
+
/** One row of a page's history (ADR-0074): a snapshot after a write, without its body. */
|
|
4156
|
+
interface PageRevision {
|
|
4157
|
+
id: string;
|
|
4158
|
+
/** The page's `docVersion` after this write. */
|
|
4159
|
+
docVersion: number;
|
|
4160
|
+
title: string;
|
|
4161
|
+
kind: PageRevisionKind;
|
|
4162
|
+
/** Why the change was made, when the writer said. */
|
|
4163
|
+
note: string | null;
|
|
4164
|
+
/** UTF-8 size of the Markdown body at this revision. */
|
|
4165
|
+
bodyBytes: number;
|
|
4166
|
+
/** Provenance as it stood at this revision. */
|
|
4167
|
+
source: string | null;
|
|
4168
|
+
asOf: Date | null;
|
|
4169
|
+
/**
|
|
4170
|
+
* The author, or null. Null with `authorHidden: true` means names are
|
|
4171
|
+
* withheld from you (you can view the page but are not a workspace member).
|
|
4172
|
+
* Null with `authorHidden: false` means no person wrote it: a `baseline`
|
|
4173
|
+
* row, or an automated write (an agenda seed, a generated Workspace update)
|
|
4174
|
+
* whose `note` says what did.
|
|
4175
|
+
*/
|
|
4176
|
+
author: PageRevisionAuthor | null;
|
|
4177
|
+
authorHidden: boolean;
|
|
4178
|
+
/** When the revision was first recorded. */
|
|
4179
|
+
createdAt: Date;
|
|
4180
|
+
/** When it last moved forward (editor saves fold into an open revision). */
|
|
4181
|
+
updatedAt: Date;
|
|
4182
|
+
}
|
|
4183
|
+
interface PageHistory {
|
|
4184
|
+
revisions: PageRevision[];
|
|
4185
|
+
/** Pass back as `cursor` to fetch older revisions; null when there are none. */
|
|
4186
|
+
nextCursor: string | null;
|
|
4187
|
+
}
|
|
4188
|
+
/** A revision with its Markdown body. */
|
|
4189
|
+
interface PageRevisionDetail extends PageRevision {
|
|
4190
|
+
pageId: string;
|
|
4191
|
+
body: string | null;
|
|
4192
|
+
}
|
|
4193
|
+
interface PageDiffSide {
|
|
4194
|
+
/** Null for the empty state before the first revision, or for the live page. */
|
|
4195
|
+
revisionId: string | null;
|
|
4196
|
+
docVersion: number;
|
|
4197
|
+
title: string;
|
|
4198
|
+
source: string | null;
|
|
4199
|
+
asOf: Date | null;
|
|
4200
|
+
createdAt: Date | null;
|
|
4201
|
+
}
|
|
4202
|
+
interface PageDiff {
|
|
4203
|
+
from: PageDiffSide;
|
|
4204
|
+
to: PageDiffSide;
|
|
4205
|
+
/** Unified diff of the Markdown bodies; empty when identical. */
|
|
4206
|
+
unified: string;
|
|
4207
|
+
stats: {
|
|
4208
|
+
added: number;
|
|
4209
|
+
removed: number;
|
|
4210
|
+
};
|
|
4211
|
+
titleChanged: boolean;
|
|
4212
|
+
/** `source` or `asOf` differ between the two sides. */
|
|
4213
|
+
provenanceChanged: boolean;
|
|
4214
|
+
}
|
|
4215
|
+
interface PageSearchResult {
|
|
4216
|
+
id: string;
|
|
4217
|
+
title: string;
|
|
4218
|
+
/** The best-matching chunk (semantic) or the text around the match. */
|
|
4219
|
+
snippet: string;
|
|
4220
|
+
/** Cosine similarity for semantic hits; null for substring matches. */
|
|
4221
|
+
similarity: number | null;
|
|
4222
|
+
matchedBy: 'semantic' | 'text';
|
|
4223
|
+
/** App-relative URL. */
|
|
4224
|
+
url: string;
|
|
4225
|
+
}
|
|
4226
|
+
interface PageSearchOutput {
|
|
4227
|
+
query: string;
|
|
4228
|
+
workspaceId: string;
|
|
4229
|
+
results: PageSearchResult[];
|
|
4059
4230
|
}
|
|
4060
4231
|
|
|
4061
4232
|
interface PageListOptions {
|
|
4062
4233
|
workspaceId: string;
|
|
4063
4234
|
projectId?: string;
|
|
4235
|
+
/** Case-insensitive title match. To find pages by content or meaning use `search`. */
|
|
4064
4236
|
search?: string;
|
|
4065
4237
|
}
|
|
4238
|
+
interface PageGetOptions {
|
|
4239
|
+
/**
|
|
4240
|
+
* How much of the body to fetch. Defaults to `markdown` — the Markdown body
|
|
4241
|
+
* without the editor's ProseMirror doc, which is several times larger and
|
|
4242
|
+
* carries nothing an agent needs. `outline` returns headings only; `full`
|
|
4243
|
+
* is the editor payload.
|
|
4244
|
+
*/
|
|
4245
|
+
format?: PageGetFormat;
|
|
4246
|
+
/**
|
|
4247
|
+
* Narrow the body to one section: the heading's text (case-insensitive;
|
|
4248
|
+
* `## ` prefix tolerated) through to the next heading of the same or a
|
|
4249
|
+
* higher level. Unknown headings fail with the list of headings that exist.
|
|
4250
|
+
*/
|
|
4251
|
+
section?: string;
|
|
4252
|
+
}
|
|
4253
|
+
interface PageSearchOptions {
|
|
4254
|
+
workspaceId: string;
|
|
4255
|
+
/** What the page should be about (2–200 chars). */
|
|
4256
|
+
query: string;
|
|
4257
|
+
projectId?: string;
|
|
4258
|
+
/** Max pages returned (1–25, server default 10). */
|
|
4259
|
+
limit?: number;
|
|
4260
|
+
}
|
|
4261
|
+
interface PageHistoryOptions {
|
|
4262
|
+
/** Max revisions (1–200, server default 50). */
|
|
4263
|
+
limit?: number;
|
|
4264
|
+
/** `nextCursor` from a previous page of history. */
|
|
4265
|
+
cursor?: string;
|
|
4266
|
+
}
|
|
4267
|
+
interface PageDiffOptions {
|
|
4268
|
+
/**
|
|
4269
|
+
* What to compare the revision with: `previous` (default — what this
|
|
4270
|
+
* revision changed), `current` (the page as it is now), or another
|
|
4271
|
+
* revision's id.
|
|
4272
|
+
*/
|
|
4273
|
+
against?: 'previous' | 'current' | string;
|
|
4274
|
+
}
|
|
4066
4275
|
interface PageCreateInput {
|
|
4067
4276
|
workspaceId: string;
|
|
4068
4277
|
projectId?: string | null;
|
|
@@ -4070,6 +4279,12 @@ interface PageCreateInput {
|
|
|
4070
4279
|
/** Markdown body. Indexed for search when non-empty. */
|
|
4071
4280
|
body?: string;
|
|
4072
4281
|
includeInSearch?: boolean;
|
|
4282
|
+
/** Why the page was created — recorded on its first revision. */
|
|
4283
|
+
note?: string;
|
|
4284
|
+
/** Provenance: where the facts come from (URL, document, person). */
|
|
4285
|
+
source?: string | null;
|
|
4286
|
+
/** Provenance: the date the facts were true. */
|
|
4287
|
+
asOf?: Date | null;
|
|
4073
4288
|
}
|
|
4074
4289
|
interface PageUpdateInput {
|
|
4075
4290
|
id: string;
|
|
@@ -4082,18 +4297,73 @@ interface PageUpdateInput {
|
|
|
4082
4297
|
* the editor re-derives its rich document on next open.
|
|
4083
4298
|
*/
|
|
4084
4299
|
body?: string;
|
|
4300
|
+
/**
|
|
4301
|
+
* The `docVersion` you read before editing. With it, a body write is a
|
|
4302
|
+
* compare-and-set: if someone saved in between, the call fails with
|
|
4303
|
+
* CONFLICT instead of overwriting their work. Always send it when you can.
|
|
4304
|
+
*/
|
|
4305
|
+
baseVersion?: number;
|
|
4306
|
+
/**
|
|
4307
|
+
* Why this change — recorded on the revision and shown in the page's
|
|
4308
|
+
* history. Always send one from an agent: a body write without a note
|
|
4309
|
+
* reads "No reason given" to everyone who looks at the history.
|
|
4310
|
+
*/
|
|
4311
|
+
note?: string;
|
|
4312
|
+
/** Provenance: where the facts come from. Empty string / null clears it. */
|
|
4313
|
+
source?: string | null;
|
|
4314
|
+
/** Provenance: the date the facts were true. Null clears it. */
|
|
4315
|
+
asOf?: Date | null;
|
|
4316
|
+
}
|
|
4317
|
+
interface PageRestoreOptions {
|
|
4318
|
+
/** Why you are restoring; defaults to "Restored the version from <date>". */
|
|
4319
|
+
note?: string;
|
|
4320
|
+
/**
|
|
4321
|
+
* The page's `docVersion` when you decided to restore (the newest
|
|
4322
|
+
* revision's `docVersion` from `history`). With it, a page saved since then
|
|
4323
|
+
* fails with CONFLICT instead of being replaced. Always send it.
|
|
4324
|
+
*/
|
|
4325
|
+
baseVersion?: number;
|
|
4085
4326
|
}
|
|
4086
4327
|
/**
|
|
4087
4328
|
* Knowledge pages (PRDs, research, technical specs). Workspace-scoped
|
|
4088
4329
|
* documents; link one to a feature via `FeaturesApi.linkPage`.
|
|
4330
|
+
*
|
|
4331
|
+
* Reads are lean by default: `get` returns Markdown only. Use `outline` to see
|
|
4332
|
+
* a long page's shape, then `get(id, { section })` for the part you need.
|
|
4333
|
+
* Every write is recorded in the page's history (`history`, `diff`,
|
|
4334
|
+
* `restore`); pass a `note` so the record says why.
|
|
4089
4335
|
*/
|
|
4090
4336
|
declare class PagesApi {
|
|
4091
4337
|
private client;
|
|
4092
4338
|
constructor(client: TrpcClient);
|
|
4093
4339
|
list(options: PageListOptions): Promise<KnowledgePage[]>;
|
|
4094
|
-
|
|
4340
|
+
/** One page. Markdown body only unless `format` says otherwise. */
|
|
4341
|
+
get(id: string, options?: PageGetOptions): Promise<KnowledgePage>;
|
|
4342
|
+
/** The page's headings (level, text, line) and `bodyBytes`, no body. */
|
|
4343
|
+
outline(id: string): Promise<KnowledgePage>;
|
|
4344
|
+
/**
|
|
4345
|
+
* Pages about something: semantic hits from the Knowledge index first
|
|
4346
|
+
* (nearest first, with the matching passage as `snippet`), then pages whose
|
|
4347
|
+
* title or body contain the query. Only pages the caller can view.
|
|
4348
|
+
*/
|
|
4349
|
+
search(options: PageSearchOptions): Promise<PageSearchOutput>;
|
|
4095
4350
|
create(input: PageCreateInput): Promise<KnowledgePage>;
|
|
4096
4351
|
update(input: PageUpdateInput): Promise<KnowledgePage>;
|
|
4352
|
+
/** The page's revisions, newest first — who, when, why, size. Never the bodies. */
|
|
4353
|
+
history(id: string, options?: PageHistoryOptions): Promise<PageHistory>;
|
|
4354
|
+
/** One revision with its Markdown body. */
|
|
4355
|
+
revision(pageId: string, revisionId: string): Promise<PageRevisionDetail>;
|
|
4356
|
+
/** What a revision changed, as a unified diff of the Markdown. */
|
|
4357
|
+
diff(pageId: string, revisionId: string, options?: PageDiffOptions): Promise<PageDiff>;
|
|
4358
|
+
/**
|
|
4359
|
+
* Put a revision's content back as the page's current content. A forward
|
|
4360
|
+
* write: `docVersion` bumps and a "restore" revision is recorded.
|
|
4361
|
+
*/
|
|
4362
|
+
restore(pageId: string, revisionId: string, options?: PageRestoreOptions): Promise<{
|
|
4363
|
+
id: string;
|
|
4364
|
+
docVersion: number;
|
|
4365
|
+
revisionId: string;
|
|
4366
|
+
}>;
|
|
4097
4367
|
}
|
|
4098
4368
|
|
|
4099
4369
|
type ResourceContentType = 'web_page' | 'document' | 'pdf' | 'bookmark' | 'note';
|
|
@@ -4304,6 +4574,34 @@ interface GlobalSearchOutput {
|
|
|
4304
4574
|
query: string;
|
|
4305
4575
|
results: SearchResult[];
|
|
4306
4576
|
}
|
|
4577
|
+
type KnowledgeSourceType = 'transcription' | 'resource' | 'document' | 'page';
|
|
4578
|
+
interface KnowledgeSearchOptions {
|
|
4579
|
+
/** What the content should be about (3–200 chars). */
|
|
4580
|
+
query: string;
|
|
4581
|
+
/** Required: the Knowledge index is searched one workspace at a time. */
|
|
4582
|
+
workspaceId: string;
|
|
4583
|
+
/** Max sources returned (1-20, server default 5). */
|
|
4584
|
+
limit?: number;
|
|
4585
|
+
/** Restrict to these kinds of source; default is every kind the caller can see. */
|
|
4586
|
+
sourceTypes?: KnowledgeSourceType[];
|
|
4587
|
+
}
|
|
4588
|
+
/** One Knowledge Base hit: the best-matching chunk of one indexed source. */
|
|
4589
|
+
interface KnowledgeSearchResult {
|
|
4590
|
+
sourceType: KnowledgeSourceType;
|
|
4591
|
+
sourceId: string;
|
|
4592
|
+
title: string;
|
|
4593
|
+
/** The matching chunk, whitespace-collapsed and cut to a one-line preview. */
|
|
4594
|
+
snippet: string;
|
|
4595
|
+
similarity: number;
|
|
4596
|
+
/** In-app route, or the source's own URL when `external`. */
|
|
4597
|
+
url: string;
|
|
4598
|
+
external: boolean;
|
|
4599
|
+
}
|
|
4600
|
+
interface KnowledgeSearchOutput {
|
|
4601
|
+
query: string;
|
|
4602
|
+
workspaceId: string;
|
|
4603
|
+
results: KnowledgeSearchResult[];
|
|
4604
|
+
}
|
|
4307
4605
|
|
|
4308
4606
|
declare class SearchApi {
|
|
4309
4607
|
private client;
|
|
@@ -4311,9 +4609,17 @@ declare class SearchApi {
|
|
|
4311
4609
|
/**
|
|
4312
4610
|
* Global text search across the entities the caller can access — the same
|
|
4313
4611
|
* coverage as the app's Cmd+K palette (projects, actions, goals,
|
|
4314
|
-
* workspaces, and other entity types as the API grows).
|
|
4612
|
+
* workspaces, and other entity types as the API grows). Matches titles;
|
|
4613
|
+
* for pages by meaning use `knowledge` or `PagesApi.search`.
|
|
4315
4614
|
*/
|
|
4316
4615
|
global(options: GlobalSearchOptions): Promise<GlobalSearchOutput>;
|
|
4616
|
+
/**
|
|
4617
|
+
* Semantic search over one workspace's Knowledge index — the caller's own
|
|
4618
|
+
* indexed meetings, resources, documents and pages, scored by meaning. Each
|
|
4619
|
+
* source contributes its best-matching passage. Costs an embedding call;
|
|
4620
|
+
* never throws for an index failure (returns no results instead).
|
|
4621
|
+
*/
|
|
4622
|
+
knowledge(options: KnowledgeSearchOptions): Promise<KnowledgeSearchOutput>;
|
|
4317
4623
|
}
|
|
4318
4624
|
|
|
4319
4625
|
type TimeEntryStatus = 'PROPOSED' | 'CONFIRMED';
|
|
@@ -4726,4 +5032,4 @@ declare class ExponentialClient {
|
|
|
4726
5032
|
});
|
|
4727
5033
|
}
|
|
4728
5034
|
|
|
4729
|
-
export { type Action, type ActionComment, type ActionCommentAddInput, type ActionCommentUpdateInput, type ActionCreateInput, type ActionOutput, type ActionStatus, type ActionUpdateInput, type ActionUpsertBySourceInput, type ActionUpsertBySourceResult, type ActionsListOutput, type AddInteractionInput, type AgentRunStatus, AgentRunsApi, type AppendEventsResult, type Area, type AreaCreateInput, type AreaListOptions, type ClaimedRun, type CommentAuthor, type Contact, type ContactCreateInput, type ContactInteraction, type ContactListOutput, type ContactUpdateInput, type ContactsListOptions, type ConversationMessage, DEFAULT_GAP_MINUTES, type DayReport, type DayReportActionRow, type DayReportEntry, type DayReportProductRow, type Deal, type DealActivity, type DealCreateInput, type DealMoveInput, type DealUpdateInput, type Decision, type DecisionAdrRef, type DecisionChainRef, type DecisionCreateInput, type DecisionDecider, type DecisionDeciderInput, type DecisionEvidenceTurn, type DecisionFeatureRef, type DecisionLink, type DecisionListOptions, type DecisionListRow, type DecisionMeetingRef, type DecisionOccurrenceRef, type DecisionProductRef, type DecisionProjectRef, type DecisionReviewState, type DecisionSetStatusInput, type DecisionSource, type DecisionStatus, type DecisionTicketRef, type DecisionUpdateInput, type DecisionUserRef, type DraftDecisionsResult, type EnrichContactResult, type Epic, type EpicCreateInput, type EpicListOptions, type EpicPriority, type EpicStatus, type EpicUpdateInput, ExponentialClient, type ExponentialConfig, type Feature, type FeatureComment, type FeatureCommentCreateInput, type FeatureCommentReplyInput, type FeatureCommentThreadInput, type FeatureCommentUpdateInput, type FeatureCreateInput, type FeatureKeyResultLink, type FeatureLinkPageInput, type FeatureListOptions, type FeatureScope, type FeatureScopeStatus, type FeatureStatus, type FeatureUpdateInput, type FinishInput, type FinishResult, type GlobalSearchOptions, type GlobalSearchOutput, type Goal, type GoalChildSummary, type GoalComment, type GoalCommentAddInput, type GoalCommentUpdateInput, type GoalCreateInput, type GoalHealth, type GoalKeyResultSummary, type GoalLifeDomain, type GoalListOptions, type GoalPeriod, type GoalProjectSummary, type GoalSetParentInput, type GoalSetStatusInput, type GoalStats, type GoalStatsOptions, type GoalStatus, type GoalTreeNode, type GoalTreeOptions, type GoalUpdateInput, type GoalUserSummary, type GoalWritableStatus, type HeartbeatResult, type InteractionDirection, type InteractionType, type KanbanStatus, type KeyResult, type KeyResultByObjectiveOptions, type KeyResultCheckIn, type KeyResultCheckInInput, type KeyResultCreateInput, type KeyResultFeatureLink, type KeyResultListOptions, type KeyResultProjectLink, type KeyResultStatus, type KeyResultUnit, type KeyResultUpdateInput, type KnowledgePage, type LabelCreateInput, type LabelListOptions, type ListForEntityInput, type Meeting, type MeetingActionSummary, type MeetingCreateInput, type MeetingDecisions, type MeetingListOptions, type MeetingParticipant, type MeetingParticipantInput, type MeetingProjectRef, type MeetingSourceIntegration, type MeetingTypeFilter, type MeetingUpdateInput, type MeetingWorkspaceRef, type ObjectiveWithKeyResults, type Organization, type OrganizationCreateInput, type OrganizationListOutput, type OrganizationSize, type OrganizationsListOptions, type OverdueCohort, type OverdueTriage, type OverdueTriageRow, type PageComment, type PageCommentCreateInput, type PageCommentUpdateInput, type PageCreateInput, type PageListOptions, type PageUpdateInput, type Pipeline, type PipelineStage, type Priority, type Product, type ProductCreateInput, type ProductUpdateInput, type Project, type ProjectDetail, type ProjectKeyResultLink, type ProjectOutput, type ProjectPriority, type ProjectStatus, type ProjectUpdateInput, type ProjectsListOptions, type ProjectsListOutput, ROUND_MINUTES, type ReadStatus, type Requirement, type RequirementCreateInput, type RequirementKind, type RequirementListOptions, type Resource, type ResourceContentType, type ResourceCreateInput, type ResourceListOptions, type ResourceListResult, type ResourceReadState, type RunMessage, type RunnerEvent, type RunnerEventKind, type ScopeCreateInput, type ScopeListOptions, type ScopeUpdateInput, type SearchResult, type SearchResultType, type SearchResultWorkspace, type SetEntityTagsInput, type SetEntityTagsResult, type Tag, type TagEntityType, type TagListResult, type Ticket, type TicketAssignee, type TicketComment, type TicketCommentAddInput, type TicketCommentUpdateInput, type TicketCreateInput, type TicketDependencyEdge, type TicketDetail, type TicketListOptions, type TicketSearchOptions, type TicketStatus, type TicketType, type TicketUpdateInput, TimeApi, type TimeConfirmDayResult, type TimeEntry, type TimeEntrySource, type TimeEntryStatus, type TimeLogBatchResult, type TimeLogInput, type TimeLogOutcome, type TimeLogResult, type TodaysActionRow, type TodaysActions, type TodaysActionsGroup, type UserStory, type UserStoryCreateInput, type UserStoryListOptions, type UserStoryUpdateInput, type WorklogSegment, type Workspace, type WorkspaceMember, type WorkspaceOutput, type WorkspacesListOutput, clearConfig, createConfigStore, getConfigPath, isAuthenticated, isTRPCError, loadConfig, saveConfig, segmentConversation };
|
|
5035
|
+
export { type Action, type ActionComment, type ActionCommentAddInput, type ActionCommentUpdateInput, type ActionCreateInput, type ActionOutput, type ActionStatus, type ActionUpdateInput, type ActionUpsertBySourceInput, type ActionUpsertBySourceResult, type ActionsListOutput, type AddInteractionInput, type AgentRunStatus, AgentRunsApi, type AppendEventsResult, type Area, type AreaCreateInput, type AreaListOptions, type ClaimedRun, type CommentAuthor, type Contact, type ContactCreateInput, type ContactInteraction, type ContactListOutput, type ContactUpdateInput, type ContactsListOptions, type ConversationMessage, DEFAULT_GAP_MINUTES, type DayReport, type DayReportActionRow, type DayReportEntry, type DayReportProductRow, type Deal, type DealActivity, type DealCreateInput, type DealMoveInput, type DealUpdateInput, type Decision, type DecisionAdrRef, type DecisionChainRef, type DecisionCreateInput, type DecisionDecider, type DecisionDeciderInput, type DecisionEvidenceTurn, type DecisionFeatureRef, type DecisionLink, type DecisionListOptions, type DecisionListRow, type DecisionMeetingRef, type DecisionOccurrenceRef, type DecisionProductRef, type DecisionProjectRef, type DecisionReviewState, type DecisionSetStatusInput, type DecisionSource, type DecisionStatus, type DecisionTicketRef, type DecisionUpdateInput, type DecisionUserRef, type DraftDecisionsResult, type EnrichContactResult, type Epic, type EpicCreateInput, type EpicListOptions, type EpicPriority, type EpicStatus, type EpicUpdateInput, ExponentialClient, type ExponentialConfig, type Feature, type FeatureComment, type FeatureCommentCreateInput, type FeatureCommentReplyInput, type FeatureCommentThreadInput, type FeatureCommentUpdateInput, type FeatureCreateInput, type FeatureKeyResultLink, type FeatureLinkPageInput, type FeatureListOptions, type FeatureScope, type FeatureScopeStatus, type FeatureStatus, type FeatureUpdateInput, type FinishInput, type FinishResult, type GlobalSearchOptions, type GlobalSearchOutput, type Goal, type GoalChildSummary, type GoalComment, type GoalCommentAddInput, type GoalCommentUpdateInput, type GoalCreateInput, type GoalHealth, type GoalKeyResultSummary, type GoalLifeDomain, type GoalListOptions, type GoalPeriod, type GoalProjectSummary, type GoalSetParentInput, type GoalSetStatusInput, type GoalStats, type GoalStatsOptions, type GoalStatus, type GoalTreeNode, type GoalTreeOptions, type GoalUpdateInput, type GoalUserSummary, type GoalWritableStatus, type HeartbeatResult, type InteractionDirection, type InteractionType, type KanbanStatus, type KeyResult, type KeyResultByObjectiveOptions, type KeyResultCheckIn, type KeyResultCheckInInput, type KeyResultCreateInput, type KeyResultFeatureLink, type KeyResultListOptions, type KeyResultProjectLink, type KeyResultStatus, type KeyResultUnit, type KeyResultUpdateInput, type KnowledgePage, type KnowledgeSearchOptions, type KnowledgeSearchOutput, type KnowledgeSearchResult, type KnowledgeSourceType, type LabelCreateInput, type LabelListOptions, type ListForEntityInput, type Meeting, type MeetingActionSummary, type MeetingCreateInput, type MeetingDecisions, type MeetingListOptions, type MeetingParticipant, type MeetingParticipantInput, type MeetingProjectRef, type MeetingSourceIntegration, type MeetingTypeFilter, type MeetingUpdateInput, type MeetingWorkspaceRef, type ObjectiveWithKeyResults, type Organization, type OrganizationCreateInput, type OrganizationListOutput, type OrganizationSize, type OrganizationsListOptions, type OverdueCohort, type OverdueTriage, type OverdueTriageRow, type PageComment, type PageCommentCreateInput, type PageCommentUpdateInput, type PageCreateInput, type PageDiff, type PageDiffOptions, type PageDiffSide, type PageGetFormat, type PageGetOptions, type PageHistory, type PageHistoryOptions, type PageListOptions, type PageOutlineEntry, type PageRestoreOptions, type PageRevision, type PageRevisionAuthor, type PageRevisionDetail, type PageRevisionKind, type PageSearchOptions, type PageSearchOutput, type PageSearchResult, type PageUpdateInput, type Pipeline, type PipelineStage, type Priority, type Product, type ProductCreateInput, type ProductUpdateInput, type Project, type ProjectDetail, type ProjectKeyResultLink, type ProjectOutput, type ProjectPriority, type ProjectStatus, type ProjectUpdateInput, type ProjectsListOptions, type ProjectsListOutput, ROUND_MINUTES, type ReadStatus, type Requirement, type RequirementCreateInput, type RequirementKind, type RequirementListOptions, type Resource, type ResourceContentType, type ResourceCreateInput, type ResourceListOptions, type ResourceListResult, type ResourceReadState, type RunMessage, type RunnerEvent, type RunnerEventKind, type ScopeCreateInput, type ScopeListOptions, type ScopeUpdateInput, type SearchResult, type SearchResultType, type SearchResultWorkspace, type SetEntityTagsInput, type SetEntityTagsResult, type Tag, type TagEntityType, type TagListResult, type Ticket, type TicketAssignee, type TicketComment, type TicketCommentAddInput, type TicketCommentUpdateInput, type TicketCreateInput, type TicketDependencyEdge, type TicketDetail, type TicketListOptions, type TicketSearchOptions, type TicketStatus, type TicketType, type TicketUpdateInput, TimeApi, type TimeConfirmDayResult, type TimeEntry, type TimeEntrySource, type TimeEntryStatus, type TimeLogBatchResult, type TimeLogInput, type TimeLogOutcome, type TimeLogResult, type TodaysActionRow, type TodaysActions, type TodaysActionsGroup, type UserStory, type UserStoryCreateInput, type UserStoryListOptions, type UserStoryUpdateInput, type WorklogSegment, type Workspace, type WorkspaceMember, type WorkspaceOutput, type WorkspacesListOutput, clearConfig, createConfigStore, getConfigPath, isAuthenticated, isTRPCError, loadConfig, saveConfig, segmentConversation };
|
package/dist/index.js
CHANGED
|
@@ -643,11 +643,21 @@ var DecisionsApi = class {
|
|
|
643
643
|
linkId
|
|
644
644
|
});
|
|
645
645
|
}
|
|
646
|
-
/**
|
|
647
|
-
|
|
646
|
+
/**
|
|
647
|
+
* Publish a draft into the log. Needs a person's login: agent keys are
|
|
648
|
+
* refused. Idempotent on a decision that is already confirmed.
|
|
649
|
+
*
|
|
650
|
+
* `status` moves it in the same write — `{ status: 'ACCEPTED' }` is
|
|
651
|
+
* "confirm as accepted", and works on an already-confirmed decision too.
|
|
652
|
+
* `SUPERSEDED` is refused (it needs a successor; use {@link setStatus}).
|
|
653
|
+
* A person confirming or accepting a decision that no person stands behind
|
|
654
|
+
* becomes its decider. `decisionId` may also be a `D-0006` label.
|
|
655
|
+
*/
|
|
656
|
+
async confirmDraft(workspaceId, decisionId, options = {}) {
|
|
648
657
|
return await this.client.decision.confirmDraft.mutate({
|
|
649
658
|
workspaceId,
|
|
650
|
-
decisionId
|
|
659
|
+
decisionId,
|
|
660
|
+
...options.status ? { status: options.status } : {}
|
|
651
661
|
});
|
|
652
662
|
}
|
|
653
663
|
/**
|
|
@@ -1076,8 +1086,25 @@ var PagesApi = class {
|
|
|
1076
1086
|
async list(options) {
|
|
1077
1087
|
return await this.client.page.list.query(options);
|
|
1078
1088
|
}
|
|
1079
|
-
|
|
1080
|
-
|
|
1089
|
+
/** One page. Markdown body only unless `format` says otherwise. */
|
|
1090
|
+
async get(id, options = {}) {
|
|
1091
|
+
return await this.client.page.get.query({
|
|
1092
|
+
id,
|
|
1093
|
+
format: options.format ?? "markdown",
|
|
1094
|
+
...options.section ? { section: options.section } : {}
|
|
1095
|
+
});
|
|
1096
|
+
}
|
|
1097
|
+
/** The page's headings (level, text, line) and `bodyBytes`, no body. */
|
|
1098
|
+
async outline(id) {
|
|
1099
|
+
return await this.get(id, { format: "outline" });
|
|
1100
|
+
}
|
|
1101
|
+
/**
|
|
1102
|
+
* Pages about something: semantic hits from the Knowledge index first
|
|
1103
|
+
* (nearest first, with the matching passage as `snippet`), then pages whose
|
|
1104
|
+
* title or body contain the query. Only pages the caller can view.
|
|
1105
|
+
*/
|
|
1106
|
+
async search(options) {
|
|
1107
|
+
return await this.client.page.search.query(options);
|
|
1081
1108
|
}
|
|
1082
1109
|
async create(input) {
|
|
1083
1110
|
return await this.client.page.create.mutate(input);
|
|
@@ -1085,6 +1112,29 @@ var PagesApi = class {
|
|
|
1085
1112
|
async update(input) {
|
|
1086
1113
|
return await this.client.page.update.mutate(input);
|
|
1087
1114
|
}
|
|
1115
|
+
/** The page's revisions, newest first — who, when, why, size. Never the bodies. */
|
|
1116
|
+
async history(id, options = {}) {
|
|
1117
|
+
return await this.client.page.history.query({ id, ...options });
|
|
1118
|
+
}
|
|
1119
|
+
/** One revision with its Markdown body. */
|
|
1120
|
+
async revision(pageId, revisionId) {
|
|
1121
|
+
return await this.client.page.revision.query({ id: pageId, revisionId });
|
|
1122
|
+
}
|
|
1123
|
+
/** What a revision changed, as a unified diff of the Markdown. */
|
|
1124
|
+
async diff(pageId, revisionId, options = {}) {
|
|
1125
|
+
return await this.client.page.diff.query({
|
|
1126
|
+
id: pageId,
|
|
1127
|
+
revisionId,
|
|
1128
|
+
against: options.against ?? "previous"
|
|
1129
|
+
});
|
|
1130
|
+
}
|
|
1131
|
+
/**
|
|
1132
|
+
* Put a revision's content back as the page's current content. A forward
|
|
1133
|
+
* write: `docVersion` bumps and a "restore" revision is recorded.
|
|
1134
|
+
*/
|
|
1135
|
+
async restore(pageId, revisionId, options = {}) {
|
|
1136
|
+
return await this.client.page.restore.mutate({ id: pageId, revisionId, ...options });
|
|
1137
|
+
}
|
|
1088
1138
|
};
|
|
1089
1139
|
|
|
1090
1140
|
// src/resources.ts
|
|
@@ -1193,11 +1243,21 @@ var SearchApi = class {
|
|
|
1193
1243
|
/**
|
|
1194
1244
|
* Global text search across the entities the caller can access — the same
|
|
1195
1245
|
* coverage as the app's Cmd+K palette (projects, actions, goals,
|
|
1196
|
-
* workspaces, and other entity types as the API grows).
|
|
1246
|
+
* workspaces, and other entity types as the API grows). Matches titles;
|
|
1247
|
+
* for pages by meaning use `knowledge` or `PagesApi.search`.
|
|
1197
1248
|
*/
|
|
1198
1249
|
async global(options) {
|
|
1199
1250
|
return await this.client.search.global.query(options);
|
|
1200
1251
|
}
|
|
1252
|
+
/**
|
|
1253
|
+
* Semantic search over one workspace's Knowledge index — the caller's own
|
|
1254
|
+
* indexed meetings, resources, documents and pages, scored by meaning. Each
|
|
1255
|
+
* source contributes its best-matching passage. Costs an embedding call;
|
|
1256
|
+
* never throws for an index failure (returns no results instead).
|
|
1257
|
+
*/
|
|
1258
|
+
async knowledge(options) {
|
|
1259
|
+
return await this.client.search.knowledge.query(options);
|
|
1260
|
+
}
|
|
1201
1261
|
};
|
|
1202
1262
|
|
|
1203
1263
|
// src/time.ts
|