@owlmeans/viable-common 0.0.45 → 0.0.47
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 +163 -13
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/agent-presentation/SKILL.md +1 -1
- package/agent-meta/skills/viable-common/SKILL.md +132 -23
- package/build/connect/account/types.d.ts +81 -0
- package/build/connect/account/types.d.ts.map +1 -0
- package/build/connect/account/types.js +2 -0
- package/build/connect/account/types.js.map +1 -0
- package/build/connect/branding/types.d.ts +26 -4
- package/build/connect/branding/types.d.ts.map +1 -1
- package/build/connect/call/types.d.ts +28 -0
- package/build/connect/call/types.d.ts.map +1 -0
- package/build/connect/call/types.js +2 -0
- package/build/connect/call/types.js.map +1 -0
- package/build/connect/config/types.d.ts +45 -0
- package/build/connect/config/types.d.ts.map +1 -0
- package/build/connect/config/types.js +2 -0
- package/build/connect/config/types.js.map +1 -0
- package/build/connect/consts.d.ts +383 -1
- package/build/connect/consts.d.ts.map +1 -1
- package/build/connect/consts.js +387 -1
- package/build/connect/consts.js.map +1 -1
- package/build/connect/conversion/types.d.ts +24 -0
- package/build/connect/conversion/types.d.ts.map +1 -1
- package/build/connect/entrypoints/types.d.ts +22 -13
- package/build/connect/entrypoints/types.d.ts.map +1 -1
- package/build/connect/entrypoints.d.ts +441 -8
- package/build/connect/entrypoints.d.ts.map +1 -1
- package/build/connect/entrypoints.js +292 -9
- package/build/connect/entrypoints.js.map +1 -1
- package/build/connect/errors.d.ts +12 -0
- package/build/connect/errors.d.ts.map +1 -1
- package/build/connect/errors.js +16 -0
- package/build/connect/errors.js.map +1 -1
- package/build/connect/feed/types.d.ts +71 -0
- package/build/connect/feed/types.d.ts.map +1 -0
- package/build/connect/feed/types.js +2 -0
- package/build/connect/feed/types.js.map +1 -0
- package/build/connect/files/types.d.ts +34 -0
- package/build/connect/files/types.d.ts.map +1 -0
- package/build/connect/files/types.js +2 -0
- package/build/connect/files/types.js.map +1 -0
- package/build/connect/git/types.d.ts +170 -0
- package/build/connect/git/types.d.ts.map +1 -0
- package/build/connect/git/types.js +14 -0
- package/build/connect/git/types.js.map +1 -0
- package/build/connect/iam/types.d.ts +25 -0
- package/build/connect/iam/types.d.ts.map +1 -0
- package/build/connect/iam/types.js +8 -0
- package/build/connect/iam/types.js.map +1 -0
- package/build/connect/index.d.ts +9 -0
- package/build/connect/index.d.ts.map +1 -1
- package/build/connect/ops.d.ts +189 -0
- package/build/connect/ops.d.ts.map +1 -0
- package/build/connect/ops.js +2 -0
- package/build/connect/ops.js.map +1 -0
- package/build/connect/production/types.d.ts +65 -0
- package/build/connect/production/types.d.ts.map +1 -0
- package/build/connect/production/types.js +2 -0
- package/build/connect/production/types.js.map +1 -0
- package/build/connect/project/types.d.ts +23 -16
- package/build/connect/project/types.d.ts.map +1 -1
- package/build/connect/references/types.d.ts +424 -2
- package/build/connect/references/types.d.ts.map +1 -1
- package/build/connect/references.d.ts.map +1 -1
- package/build/connect/references.js +122 -0
- package/build/connect/references.js.map +1 -1
- package/build/connect/schemas.d.ts +65 -2
- package/build/connect/schemas.d.ts.map +1 -1
- package/build/connect/schemas.js +306 -1
- package/build/connect/schemas.js.map +1 -1
- package/build/connect/settings/types.d.ts +0 -25
- package/build/connect/settings/types.d.ts.map +1 -1
- package/build/connect/slot/types.d.ts +24 -0
- package/build/connect/slot/types.d.ts.map +1 -0
- package/build/connect/slot/types.js +2 -0
- package/build/connect/slot/types.js.map +1 -0
- package/build/connect/types.d.ts +453 -0
- package/build/connect/types.d.ts.map +1 -0
- package/build/connect/types.js +2 -0
- package/build/connect/types.js.map +1 -0
- package/build/convert/record/types.d.ts +0 -9
- package/build/convert/record/types.d.ts.map +1 -1
- package/build/convert/schemas.d.ts +2 -5
- package/build/convert/schemas.d.ts.map +1 -1
- package/build/convert/schemas.js +2 -15
- package/build/convert/schemas.js.map +1 -1
- package/build/iam-console/consts.d.ts +13 -0
- package/build/iam-console/consts.d.ts.map +1 -0
- package/build/iam-console/consts.js +13 -0
- package/build/iam-console/consts.js.map +1 -0
- package/build/iam-console/consts.local.d.ts +123 -0
- package/build/iam-console/consts.local.d.ts.map +1 -0
- package/build/iam-console/consts.local.js +50 -0
- package/build/iam-console/consts.local.js.map +1 -0
- package/build/iam-console/index.d.ts +4 -0
- package/build/iam-console/index.d.ts.map +1 -0
- package/build/iam-console/index.js +3 -0
- package/build/iam-console/index.js.map +1 -0
- package/build/iam-console/schemas.d.ts +38 -0
- package/build/iam-console/schemas.d.ts.map +1 -0
- package/build/iam-console/schemas.js +217 -0
- package/build/iam-console/schemas.js.map +1 -0
- package/build/iam-console/types.d.ts +140 -0
- package/build/iam-console/types.d.ts.map +1 -0
- package/build/iam-console/types.js +2 -0
- package/build/iam-console/types.js.map +1 -0
- package/build/index.d.ts +2 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -0
- package/build/index.js.map +1 -1
- package/build/intent/flow.d.ts +17 -0
- package/build/intent/flow.d.ts.map +1 -0
- package/build/intent/flow.js +65 -0
- package/build/intent/flow.js.map +1 -0
- package/build/legal/consts.d.ts +67 -0
- package/build/legal/consts.d.ts.map +1 -0
- package/build/legal/consts.js +24 -0
- package/build/legal/consts.js.map +1 -0
- package/build/legal/index.d.ts +3 -0
- package/build/legal/index.d.ts.map +1 -0
- package/build/legal/index.js +2 -0
- package/build/legal/index.js.map +1 -0
- package/build/legal/types.d.ts +17 -0
- package/build/legal/types.d.ts.map +1 -0
- package/build/legal/types.js +2 -0
- package/build/legal/types.js.map +1 -0
- package/build/planning/flows.d.ts +34 -0
- package/build/planning/flows.d.ts.map +1 -0
- package/build/planning/flows.js +174 -0
- package/build/planning/flows.js.map +1 -0
- package/build/planning/schemas.d.ts.map +1 -1
- package/build/planning/schemas.js +0 -1
- package/build/planning/schemas.js.map +1 -1
- package/build/planning/types.d.ts +0 -2
- package/build/planning/types.d.ts.map +1 -1
- package/build/skills/roles.d.ts +43 -0
- package/build/skills/roles.d.ts.map +1 -0
- package/build/skills/roles.js +44 -0
- package/build/skills/roles.js.map +1 -0
- package/package.json +19 -3
- package/src/connect/account/types.ts +91 -0
- package/src/connect/branding/types.ts +28 -4
- package/src/connect/call/types.ts +31 -0
- package/src/connect/config/types.ts +51 -0
- package/src/connect/consts.ts +400 -1
- package/src/connect/conversion/types.ts +25 -0
- package/src/connect/entrypoints/types.ts +22 -7
- package/src/connect/entrypoints.ts +592 -15
- package/src/connect/errors.ts +18 -0
- package/src/connect/feed/types.ts +76 -0
- package/src/connect/files/types.ts +38 -0
- package/src/connect/git/types.ts +187 -0
- package/src/connect/iam/types.ts +28 -0
- package/src/connect/index.ts +9 -0
- package/src/connect/production/types.ts +71 -0
- package/src/connect/project/types.ts +25 -12
- package/src/connect/references/types.ts +166 -5
- package/src/connect/references.ts +210 -5
- package/src/connect/schemas.ts +366 -5
- package/src/connect/settings/types.ts +0 -25
- package/src/connect/slot/types.ts +24 -0
- package/src/convert/record/types.ts +0 -11
- package/src/convert/schemas.ts +3 -19
- package/src/iam-console/consts.local.ts +64 -0
- package/src/iam-console/consts.ts +15 -0
- package/src/iam-console/index.ts +3 -0
- package/src/iam-console/schemas.ts +251 -0
- package/src/iam-console/types.ts +165 -0
- package/src/index.ts +2 -0
- package/src/legal/consts.ts +25 -0
- package/src/legal/index.ts +2 -0
- package/src/legal/types.ts +22 -0
- package/src/planning/schemas.ts +0 -1
- package/src/planning/types.ts +0 -2
- package/tests/connect-convert.spec.ts +6 -2
- package/tests/connect-entrypoints.spec.ts +554 -16
- package/tests/error-status.spec.ts +2 -1
- package/tests/iam-console.spec.ts +89 -0
- package/tests/planning.spec.ts +8 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { ConnectFeedDetail, ConnectFeedKind } from '../consts.js';
|
|
2
|
+
/**
|
|
3
|
+
* One feed entry before it has a position — what the platform appends. Small by construction: a
|
|
4
|
+
* projection of the event, never the record behind it (no namespace, no workload, no credential), and
|
|
5
|
+
* prose cut to a bounded excerpt.
|
|
6
|
+
*/
|
|
7
|
+
export interface ConnectFeedRecord {
|
|
8
|
+
kind: ConnectFeedKind;
|
|
9
|
+
/** When it happened, ISO 8601. */
|
|
10
|
+
at: string;
|
|
11
|
+
/** The model call or platform step it belongs to. */
|
|
12
|
+
run?: string;
|
|
13
|
+
/** The project it belongs to — on an organization notice, the project it is about, if any. */
|
|
14
|
+
projectId?: string;
|
|
15
|
+
/** The story it belongs to. */
|
|
16
|
+
storyId?: string;
|
|
17
|
+
/** The workload it belongs to. */
|
|
18
|
+
slotId?: string;
|
|
19
|
+
/** The platform's own name for the step, model call or notice. */
|
|
20
|
+
action?: string;
|
|
21
|
+
/** The platform agent that did it. */
|
|
22
|
+
agent?: string;
|
|
23
|
+
/** Prose: a model excerpt, a notice, a step's note — bounded. */
|
|
24
|
+
text?: string;
|
|
25
|
+
/** A small structured detail of the kind: a step's index, a card's status, a file's path. */
|
|
26
|
+
data?: Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
/** One feed entry as a read answers it: the record and its position. */
|
|
29
|
+
export interface ConnectFeedEntry extends ConnectFeedRecord {
|
|
30
|
+
/** The entry's position — the cursor to read after it. */
|
|
31
|
+
id: string;
|
|
32
|
+
}
|
|
33
|
+
/** What one feed read answers. */
|
|
34
|
+
export interface ConnectFeedPage {
|
|
35
|
+
/**
|
|
36
|
+
* The cursor to pass as `after` on the next read: the last entry this read SCANNED (a filtered-out
|
|
37
|
+
* entry included), or the cursor it was given when nothing came. A feed that had nothing yet
|
|
38
|
+
* answers `CONNECT_FEED_START`.
|
|
39
|
+
*/
|
|
40
|
+
cursor: string;
|
|
41
|
+
entries: ConnectFeedEntry[];
|
|
42
|
+
/**
|
|
43
|
+
* Entries after the cursor it was given were dropped before this read — the feed keeps a bounded
|
|
44
|
+
* tail for a bounded time. The domain status reads (`project_status`, `story_status`, …) say where
|
|
45
|
+
* the work stands.
|
|
46
|
+
*/
|
|
47
|
+
gap: boolean;
|
|
48
|
+
}
|
|
49
|
+
/** The preview's file changes, and whether its watcher runs. */
|
|
50
|
+
export interface ConnectFileChanges extends ConnectFeedPage {
|
|
51
|
+
/**
|
|
52
|
+
* The preview's file watcher is running. False while the preview is not ready: nothing records a
|
|
53
|
+
* change until it runs again.
|
|
54
|
+
*/
|
|
55
|
+
watching: boolean;
|
|
56
|
+
}
|
|
57
|
+
/** A feed read's query: after which entry, how many, and how long to hold for the next one. */
|
|
58
|
+
export interface ConnectFeedQuery {
|
|
59
|
+
/** The cursor the previous read answered; absent, the latest entries. */
|
|
60
|
+
after?: string;
|
|
61
|
+
/** At most `CONNECT_FEED_LIMIT_MAX`; `CONNECT_FEED_LIMIT_DEFAULT` when absent. */
|
|
62
|
+
limit?: number;
|
|
63
|
+
/** Seconds to hold for the next entry when none is there yet — at most `CONNECT_FEED_WAIT_MAX_SEC`. */
|
|
64
|
+
wait?: number;
|
|
65
|
+
}
|
|
66
|
+
/** The project activity read's query: a feed query and how much of the activity it answers. */
|
|
67
|
+
export interface ConnectActivityQuery extends ConnectFeedQuery {
|
|
68
|
+
/** `progress` (absent) leaves the model's own words out; `thinking` includes them. */
|
|
69
|
+
detail?: ConnectFeedDetail;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/connect/feed/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAEtE;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,eAAe,CAAA;IACrB,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,qDAAqD;IACrD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,8FAA8F;IAC9F,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,6FAA6F;IAC7F,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC/B;AAED,wEAAwE;AACxE,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,0DAA0D;IAC1D,EAAE,EAAE,MAAM,CAAA;CACX;AAED,kCAAkC;AAClC,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,gBAAgB,EAAE,CAAA;IAC3B;;;;OAIG;IACH,GAAG,EAAE,OAAO,CAAA;CACb;AAED,gEAAgE;AAChE,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,+FAA+F;AAC/F,MAAM,WAAW,gBAAgB;IAC/B,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,uGAAuG;IACvG,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,+FAA+F;AAC/F,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,sFAAsF;IACtF,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/connect/feed/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { SpecCategory } from '../../ba/consts.js';
|
|
2
|
+
import type { MetadataListKind } from '../../metadata/consts.js';
|
|
3
|
+
/** One file of a cloud target's tree, addressed by its path relative to the project root. */
|
|
4
|
+
export interface ConnectFileQuery {
|
|
5
|
+
path: string;
|
|
6
|
+
}
|
|
7
|
+
/** A file read from a cloud target. */
|
|
8
|
+
export interface ConnectFileContent {
|
|
9
|
+
path: string;
|
|
10
|
+
content: string;
|
|
11
|
+
}
|
|
12
|
+
/** A whole-file write: the content replaces whatever the file held. */
|
|
13
|
+
export interface ConnectFileSaveBody {
|
|
14
|
+
path: string;
|
|
15
|
+
content: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* What a write or a delete did. The platform rebuilds the preview after either; a build that failed
|
|
19
|
+
* leaves the last good preview serving and says why on `buildWarning` — the file change itself stands.
|
|
20
|
+
*/
|
|
21
|
+
export interface ConnectFileWritten {
|
|
22
|
+
path: string;
|
|
23
|
+
buildWarning?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Which of the project's metadata documents to list: `stories` (the story documents), `meta` (the
|
|
27
|
+
* specifications beside the sources, narrowed by `category`) or `all` (everything under `docs/` and
|
|
28
|
+
* `.agents/` plus the specifications beside the sources).
|
|
29
|
+
*/
|
|
30
|
+
export interface ConnectFileMetaQuery {
|
|
31
|
+
kind: MetadataListKind;
|
|
32
|
+
category?: SpecCategory;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/connect/files/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAEhE,6FAA6F;AAC7F,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,uEAAuE;AACvE,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,gBAAgB,CAAA;IACtB,QAAQ,CAAC,EAAE,YAAY,CAAA;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/connect/files/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A cloud target's git repository and its GitHub connection, as a connector reads them.
|
|
3
|
+
*
|
|
4
|
+
* Self-contained mirrors of the platform's own git vocabulary (`@owlmeans/git/model` and the
|
|
5
|
+
* platform's `GithubConnection`): the connector contract depends on no git package, so these name the
|
|
6
|
+
* same fields and nothing more. A status is a plain string for the same reason a slot's is — this
|
|
7
|
+
* view crosses a version skew, and a newer platform may answer with a value an older connector has
|
|
8
|
+
* never heard of.
|
|
9
|
+
*
|
|
10
|
+
* NOTHING here carries the GitHub token. The platform stores it locked and relays it only to the
|
|
11
|
+
* project's own slot; no connector answer, and no field of any shape below, can hold it.
|
|
12
|
+
*/
|
|
13
|
+
/** One commit of the project's repository. */
|
|
14
|
+
export interface ConnectGitCommit {
|
|
15
|
+
hash: string;
|
|
16
|
+
shortHash: string;
|
|
17
|
+
subject: string;
|
|
18
|
+
authorName: string;
|
|
19
|
+
authorEmail: string;
|
|
20
|
+
committedAt: string;
|
|
21
|
+
}
|
|
22
|
+
/** One changed path of the working tree, with git's porcelain status letters. */
|
|
23
|
+
export interface ConnectGitFileChange {
|
|
24
|
+
path: string;
|
|
25
|
+
status: string;
|
|
26
|
+
}
|
|
27
|
+
/** The working tree: its branch and head, what changed, and where it stands against its remote. */
|
|
28
|
+
export interface ConnectGitStatus {
|
|
29
|
+
initialized: boolean;
|
|
30
|
+
head: ConnectGitCommit | null;
|
|
31
|
+
branch: string;
|
|
32
|
+
dirty: boolean;
|
|
33
|
+
changedFiles: number;
|
|
34
|
+
/** The changed paths — capped by the platform; `changedFiles` is the whole count. */
|
|
35
|
+
files: ConnectGitFileChange[];
|
|
36
|
+
/** The credential-free remote the project publishes to, once it has been published. */
|
|
37
|
+
remoteUrl: string | null;
|
|
38
|
+
ahead: number | null;
|
|
39
|
+
behind: number | null;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The project's GitHub connection — who connected it and where it publishes. `status` is `connected`
|
|
43
|
+
* (authorized, not published yet), `published` (push and pull work) or `invalid` (GitHub refused the
|
|
44
|
+
* stored access: it has to be connected again).
|
|
45
|
+
*/
|
|
46
|
+
export interface ConnectGithubConnection {
|
|
47
|
+
projectId: string;
|
|
48
|
+
githubLogin: string;
|
|
49
|
+
repoFullName?: string;
|
|
50
|
+
repoUrl?: string;
|
|
51
|
+
status: string;
|
|
52
|
+
connectedAt: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The project's git state: its GitHub connection (`null` when none) and its working tree (`null`
|
|
56
|
+
* while the preview is not ready — git lives in the preview's pod, and reading it there would start
|
|
57
|
+
* a stopped preview).
|
|
58
|
+
*/
|
|
59
|
+
export interface ConnectGitState {
|
|
60
|
+
connection: ConnectGithubConnection | null;
|
|
61
|
+
git: ConnectGitStatus | null;
|
|
62
|
+
}
|
|
63
|
+
/** A commit of every change in the working tree. */
|
|
64
|
+
export interface ConnectGitCommitBody {
|
|
65
|
+
message: string;
|
|
66
|
+
}
|
|
67
|
+
/** What a commit made — `null` when there was nothing to commit. */
|
|
68
|
+
export interface ConnectGitCommitResult {
|
|
69
|
+
commit: ConnectGitCommit | null;
|
|
70
|
+
}
|
|
71
|
+
/** Go back to the tree of one earlier commit, as a NEW commit (history is never rewritten). */
|
|
72
|
+
export interface ConnectGitRevertBody {
|
|
73
|
+
hash: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* What a revert made. `dbWarning` is what the project's database migration said after the tree went
|
|
77
|
+
* back — a schema the older code no longer matches is reported, never silently left.
|
|
78
|
+
*/
|
|
79
|
+
export interface ConnectGitRevertResult {
|
|
80
|
+
commit: ConnectGitCommit | null;
|
|
81
|
+
dbWarning?: string | null;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* A push or a pull: `ok`, `up-to-date`, `conflict` (a pull that could not merge — aborted, nothing
|
|
85
|
+
* changed), `rejected` (the remote moved: pull first), `no-remote` or `auth-failed` (GitHub refused
|
|
86
|
+
* the stored access; the connection is then `invalid`).
|
|
87
|
+
*/
|
|
88
|
+
export interface ConnectGitSyncResult {
|
|
89
|
+
status: string;
|
|
90
|
+
ahead: number | null;
|
|
91
|
+
behind: number | null;
|
|
92
|
+
message?: string;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* The address the PERSON opens to connect GitHub. The authorization finishes in their browser — GitHub
|
|
96
|
+
* returns to the platform's web application, which completes it; nothing a connector can call does.
|
|
97
|
+
*/
|
|
98
|
+
export interface ConnectGithubAuthorize {
|
|
99
|
+
authorizeUrl: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Publish the project to GitHub: a new repository (`repoName`, private unless `private` is false) or
|
|
103
|
+
* one that exists (`existing`). The repository a converted project came FROM is refused while its
|
|
104
|
+
* original sources are still on the volume.
|
|
105
|
+
*/
|
|
106
|
+
export interface ConnectGithubPublishBody {
|
|
107
|
+
repoName?: string;
|
|
108
|
+
private?: boolean;
|
|
109
|
+
existing?: {
|
|
110
|
+
owner: string;
|
|
111
|
+
repo: string;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/** The connection after a disconnect — there is none. */
|
|
115
|
+
export interface ConnectGithubDisconnected {
|
|
116
|
+
connection: null;
|
|
117
|
+
}
|
|
118
|
+
/** One page of the person's repositories; `search` narrows the page that came back. */
|
|
119
|
+
export interface ConnectGithubRepoQuery {
|
|
120
|
+
page?: number;
|
|
121
|
+
search?: string;
|
|
122
|
+
}
|
|
123
|
+
/** One repository as the picker lists it. */
|
|
124
|
+
export interface ConnectGithubRepo {
|
|
125
|
+
fullName: string;
|
|
126
|
+
name: string;
|
|
127
|
+
owner: string;
|
|
128
|
+
url: string;
|
|
129
|
+
private: boolean;
|
|
130
|
+
defaultBranch: string;
|
|
131
|
+
updatedAt: string;
|
|
132
|
+
archived: boolean;
|
|
133
|
+
fork: boolean;
|
|
134
|
+
sizeKb: number;
|
|
135
|
+
description?: string;
|
|
136
|
+
language?: string;
|
|
137
|
+
}
|
|
138
|
+
export interface ConnectGithubRepoList {
|
|
139
|
+
repos: ConnectGithubRepo[];
|
|
140
|
+
page: number;
|
|
141
|
+
hasMore: boolean;
|
|
142
|
+
}
|
|
143
|
+
/** One page of one repository's branches. */
|
|
144
|
+
export interface ConnectGithubBranchQuery {
|
|
145
|
+
owner: string;
|
|
146
|
+
repo: string;
|
|
147
|
+
page?: number;
|
|
148
|
+
}
|
|
149
|
+
export interface ConnectGithubBranch {
|
|
150
|
+
name: string;
|
|
151
|
+
protected: boolean;
|
|
152
|
+
}
|
|
153
|
+
export interface ConnectGithubBranchList {
|
|
154
|
+
branches: ConnectGithubBranch[];
|
|
155
|
+
page: number;
|
|
156
|
+
hasMore: boolean;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Record which repository an imported project came FROM — it pushes nothing and publishes nothing.
|
|
160
|
+
* Absent `branch` is the repository's own default branch, read back from GitHub.
|
|
161
|
+
*/
|
|
162
|
+
export interface ConnectGithubLinkBody {
|
|
163
|
+
owner: string;
|
|
164
|
+
repo: string;
|
|
165
|
+
branch?: string;
|
|
166
|
+
}
|
|
167
|
+
export interface ConnectGithubLinked {
|
|
168
|
+
connection: ConnectGithubConnection;
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0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AAE,OAAO,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,iBAAiB,EAAE,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,6CAA6C;AAC7C,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,mBAAmB,EAAE,CAAA;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,uBAAuB,CAAA;CACpC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A cloud target's git repository and its GitHub connection, as a connector reads them.
|
|
3
|
+
*
|
|
4
|
+
* Self-contained mirrors of the platform's own git vocabulary (`@owlmeans/git/model` and the
|
|
5
|
+
* platform's `GithubConnection`): the connector contract depends on no git package, so these name the
|
|
6
|
+
* same fields and nothing more. A status is a plain string for the same reason a slot's is — this
|
|
7
|
+
* view crosses a version skew, and a newer platform may answer with a value an older connector has
|
|
8
|
+
* never heard of.
|
|
9
|
+
*
|
|
10
|
+
* NOTHING here carries the GitHub token. The platform stores it locked and relays it only to the
|
|
11
|
+
* project's own slot; no connector answer, and no field of any shape below, can hold it.
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/connect/git/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The connector's twins of the owner console's IAM (`connect.iam`): the same bodies, answers and
|
|
3
|
+
* refusals as the browser's `back.iam` routes (`../../iam-console/types.ts`), addressed under the
|
|
4
|
+
* connector's project path (`/project/:id/iam/…`) — so the project travels as `id`, like every other
|
|
5
|
+
* connector route. A read takes `scope` in its query, a write in its body.
|
|
6
|
+
*/
|
|
7
|
+
/** One subject of the project's client, by its pairwise `profileId`. */
|
|
8
|
+
export interface ConnectIamUserParams {
|
|
9
|
+
id: string;
|
|
10
|
+
profileId: string;
|
|
11
|
+
}
|
|
12
|
+
/** One organization the project's client has members in, by its slug. */
|
|
13
|
+
export interface ConnectIamOrganizationParams {
|
|
14
|
+
id: string;
|
|
15
|
+
entitySlug: string;
|
|
16
|
+
}
|
|
17
|
+
/** One member of an organization, as the project's client sees them. */
|
|
18
|
+
export interface ConnectIamMemberParams extends ConnectIamOrganizationParams {
|
|
19
|
+
profileId: string;
|
|
20
|
+
}
|
|
21
|
+
/** One group of (organization, the project's client), by its key. */
|
|
22
|
+
export interface ConnectIamGroupParams extends ConnectIamOrganizationParams {
|
|
23
|
+
group: string;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/connect/iam/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,yEAAyE;AACzE,MAAM,WAAW,4BAA4B;IAC3C,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,wEAAwE;AACxE,MAAM,WAAW,sBAAuB,SAAQ,4BAA4B;IAC1E,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,qEAAqE;AACrE,MAAM,WAAW,qBAAsB,SAAQ,4BAA4B;IACzE,KAAK,EAAE,MAAM,CAAA;CACd"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The connector's twins of the owner console's IAM (`connect.iam`): the same bodies, answers and
|
|
3
|
+
* refusals as the browser's `back.iam` routes (`../../iam-console/types.ts`), addressed under the
|
|
4
|
+
* connector's project path (`/project/:id/iam/…`) — so the project travels as `id`, like every other
|
|
5
|
+
* connector route. A read takes `scope` in its query, a write in its body.
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/connect/iam/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
package/build/connect/index.d.ts
CHANGED
|
@@ -9,9 +9,18 @@ export type * from './ops/types.js';
|
|
|
9
9
|
export type * from './project/types.js';
|
|
10
10
|
export type * from './settings/types.js';
|
|
11
11
|
export type * from './branding/types.js';
|
|
12
|
+
export type * from './account/types.js';
|
|
13
|
+
export type * from './config/types.js';
|
|
12
14
|
export type * from './pipeline/types.js';
|
|
13
15
|
export type * from './conversion/types.js';
|
|
14
16
|
export type * from './kit/types.js';
|
|
17
|
+
export type * from './files/types.js';
|
|
18
|
+
export type * from './slot/types.js';
|
|
19
|
+
export type * from './git/types.js';
|
|
20
|
+
export type * from './production/types.js';
|
|
21
|
+
export type * from './iam/types.js';
|
|
22
|
+
export type * from './call/types.js';
|
|
23
|
+
export type * from './feed/types.js';
|
|
15
24
|
export type * from './entrypoints/types.js';
|
|
16
25
|
export type * from './errors/types.js';
|
|
17
26
|
export type * from './references/types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connect/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,mBAAmB,oBAAoB,CAAA;AACvC,mBAAmB,gBAAgB,CAAA;AACnC,mBAAmB,oBAAoB,CAAA;AACvC,mBAAmB,qBAAqB,CAAA;AACxC,mBAAmB,qBAAqB,CAAA;AACxC,mBAAmB,qBAAqB,CAAA;AACxC,mBAAmB,uBAAuB,CAAA;AAC1C,mBAAmB,gBAAgB,CAAA;AACnC,mBAAmB,wBAAwB,CAAA;AAC3C,mBAAmB,mBAAmB,CAAA;AACtC,mBAAmB,uBAAuB,CAAA;AAC1C,mBAAmB,uBAAuB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connect/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,mBAAmB,oBAAoB,CAAA;AACvC,mBAAmB,gBAAgB,CAAA;AACnC,mBAAmB,oBAAoB,CAAA;AACvC,mBAAmB,qBAAqB,CAAA;AACxC,mBAAmB,qBAAqB,CAAA;AACxC,mBAAmB,oBAAoB,CAAA;AACvC,mBAAmB,mBAAmB,CAAA;AACtC,mBAAmB,qBAAqB,CAAA;AACxC,mBAAmB,uBAAuB,CAAA;AAC1C,mBAAmB,gBAAgB,CAAA;AACnC,mBAAmB,kBAAkB,CAAA;AACrC,mBAAmB,iBAAiB,CAAA;AACpC,mBAAmB,gBAAgB,CAAA;AACnC,mBAAmB,uBAAuB,CAAA;AAC1C,mBAAmB,gBAAgB,CAAA;AACnC,mBAAmB,iBAAiB,CAAA;AACpC,mBAAmB,iBAAiB,CAAA;AACpC,mBAAmB,wBAAwB,CAAA;AAC3C,mBAAmB,mBAAmB,CAAA;AACtC,mBAAmB,uBAAuB,CAAA;AAC1C,mBAAmB,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import type { SlotCommandPayload } from '../slot/index.js';
|
|
2
|
+
import type { ConnectInquiryKind, ConnectOpErrorKind, ConnectOpKind, ModelTaskMode, ModelTaskResultKind, ModelTaskRole, ModelTier } from './consts.js';
|
|
3
|
+
import type { ConnectServices } from './types.js';
|
|
4
|
+
/**
|
|
5
|
+
* One thing the platform asks a connector to do.
|
|
6
|
+
*
|
|
7
|
+
* Operations are addressed to a PROJECT, not to a session: a connector that restarts mid-run
|
|
8
|
+
* re-attaches and is handed whatever is still pending, so an MCP server dying does not kill a
|
|
9
|
+
* pipeline that is minutes into its work. `sessionId` records which session it was published to,
|
|
10
|
+
* for tracing and for the redelivery counter — never for routing a result back.
|
|
11
|
+
*/
|
|
12
|
+
export interface ConnectOp {
|
|
13
|
+
id: string;
|
|
14
|
+
projectId: string;
|
|
15
|
+
sessionId: string;
|
|
16
|
+
kind: ConnectOpKind;
|
|
17
|
+
payload: SlotCommandPayload | ModelTask | ConfigurePayload | InquiryPayload;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
/** When the asker stops waiting. A connector past this may skip the work and say so. */
|
|
20
|
+
deadlineAt: string;
|
|
21
|
+
/** How many times this op has been delivered. > 1 means a connector reconnected. */
|
|
22
|
+
attempt: number;
|
|
23
|
+
deliveredAt?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The answer to exactly one operation.
|
|
27
|
+
*
|
|
28
|
+
* `ok: false` with `kind: 'malformed'` is a RETRYABLE outcome — the platform asks again, with the
|
|
29
|
+
* problem quoted back. `'unavailable'` says the connector cannot do this at all and the run should
|
|
30
|
+
* fail rather than spin.
|
|
31
|
+
*/
|
|
32
|
+
export interface ConnectOpResult {
|
|
33
|
+
opId: string;
|
|
34
|
+
sessionId: string;
|
|
35
|
+
ok: boolean;
|
|
36
|
+
value?: unknown;
|
|
37
|
+
error?: ConnectOpError;
|
|
38
|
+
}
|
|
39
|
+
export interface ConnectOpError {
|
|
40
|
+
type: string;
|
|
41
|
+
message: string;
|
|
42
|
+
kind?: ConnectOpErrorKind;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The configuration a local target needs, as file CONTENT rather than as keys.
|
|
46
|
+
*
|
|
47
|
+
* The platform composes it — it is the only side that knows the OIDC client, its secret and the
|
|
48
|
+
* redirect URIs — and the connector writes it into the managed block of each named file, leaving
|
|
49
|
+
* every line the user added alone. `probe` names the services the platform wants to know about
|
|
50
|
+
* before it asks for a database migration or a boot check.
|
|
51
|
+
*/
|
|
52
|
+
export interface ConfigurePayload {
|
|
53
|
+
files: ConfigureFile[];
|
|
54
|
+
probe: Array<keyof ConnectServices>;
|
|
55
|
+
}
|
|
56
|
+
export interface ConfigureFile {
|
|
57
|
+
/** Target-root-relative, e.g. `.env` or `sources/web/.env`. */
|
|
58
|
+
path: string;
|
|
59
|
+
/** The managed block's content. Written between the connector's own markers. */
|
|
60
|
+
content: string;
|
|
61
|
+
}
|
|
62
|
+
export interface ConfigureResult {
|
|
63
|
+
written: string[];
|
|
64
|
+
/**
|
|
65
|
+
* Keys the target still needs and the user must supply — a local database URL, say.
|
|
66
|
+
*
|
|
67
|
+
* Read exactly like the publisher's configure acknowledgement: a key with an EMPTY value counts
|
|
68
|
+
* as missing, because a push that ran before a secret existed leaves one behind.
|
|
69
|
+
*/
|
|
70
|
+
missing: string[];
|
|
71
|
+
services: ConnectServices;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* One model call, handed to the parent agent.
|
|
75
|
+
*
|
|
76
|
+
* It carries everything a fresh subagent needs and nothing it does not: the persona as a system
|
|
77
|
+
* prompt, the conversation so far, and the shape the answer must take. There is no platform
|
|
78
|
+
* vocabulary in it — no pipeline, no step, no internal role semantics beyond a name and a tier —
|
|
79
|
+
* because it is read by a model the platform does not own.
|
|
80
|
+
*/
|
|
81
|
+
export interface ModelTask {
|
|
82
|
+
id: string;
|
|
83
|
+
projectId: string;
|
|
84
|
+
/** The platform role that asked. Informational; the tier is what decides the model. */
|
|
85
|
+
role: string;
|
|
86
|
+
tier: ModelTier;
|
|
87
|
+
/** Which attempt this is. > 0 means a previous answer was refused; `feedback` says why. */
|
|
88
|
+
attempt: number;
|
|
89
|
+
mode: ModelTaskMode;
|
|
90
|
+
system?: string;
|
|
91
|
+
messages: ModelTaskMessage[];
|
|
92
|
+
/** `Tools` mode: what the subagent may call. JSON Schema per tool. */
|
|
93
|
+
tools?: ModelTaskTool[];
|
|
94
|
+
/** `Tools` mode: force one tool, or leave the choice open. */
|
|
95
|
+
toolChoice?: ModelTaskToolChoice;
|
|
96
|
+
/** `Json` mode: the schema the single returned object must satisfy. */
|
|
97
|
+
outputSchema?: Record<string, unknown>;
|
|
98
|
+
/** A soft cap, stated so a parent can size its own call. */
|
|
99
|
+
maxOutputChars?: number;
|
|
100
|
+
/** Present on a retry: what was wrong with the previous answer. */
|
|
101
|
+
feedback?: string;
|
|
102
|
+
expiresAt: string;
|
|
103
|
+
}
|
|
104
|
+
export interface ModelTaskMessage {
|
|
105
|
+
role: ModelTaskRole;
|
|
106
|
+
content: string;
|
|
107
|
+
/** Assistant messages that called tools. */
|
|
108
|
+
toolCalls?: ModelTaskToolCall[];
|
|
109
|
+
/** Tool messages answer one call. */
|
|
110
|
+
toolCallId?: string;
|
|
111
|
+
/** Tool messages name the tool they answer. */
|
|
112
|
+
name?: string;
|
|
113
|
+
}
|
|
114
|
+
export interface ModelTaskTool {
|
|
115
|
+
name: string;
|
|
116
|
+
description?: string;
|
|
117
|
+
/** JSON Schema for the tool's arguments. */
|
|
118
|
+
parameters: Record<string, unknown>;
|
|
119
|
+
}
|
|
120
|
+
export type ModelTaskToolChoice = 'auto' | 'none' | {
|
|
121
|
+
name: string;
|
|
122
|
+
};
|
|
123
|
+
export interface ModelTaskToolCall {
|
|
124
|
+
id?: string;
|
|
125
|
+
name: string;
|
|
126
|
+
args: Record<string, unknown>;
|
|
127
|
+
}
|
|
128
|
+
/** What the parent's subagent produced. */
|
|
129
|
+
export interface ModelTaskResult {
|
|
130
|
+
taskId: string;
|
|
131
|
+
kind: ModelTaskResultKind;
|
|
132
|
+
text?: string;
|
|
133
|
+
json?: unknown;
|
|
134
|
+
toolCalls?: ModelTaskToolCall[];
|
|
135
|
+
/** Why the parent could not answer. Treated as a malformed answer and retried. */
|
|
136
|
+
error?: string;
|
|
137
|
+
/** What the parent spent. Recorded for the trace; it costs the platform nothing. */
|
|
138
|
+
usage?: ModelTaskUsage;
|
|
139
|
+
/** What the parent actually ran. Display only. */
|
|
140
|
+
model?: string;
|
|
141
|
+
}
|
|
142
|
+
export interface ModelTaskUsage {
|
|
143
|
+
inputTokens?: number;
|
|
144
|
+
outputTokens?: number;
|
|
145
|
+
}
|
|
146
|
+
/** One option a {@link ConnectInquiryKind.Choice} question offers. */
|
|
147
|
+
export interface ConnectInquiryOption {
|
|
148
|
+
value: string;
|
|
149
|
+
label: string;
|
|
150
|
+
description?: string;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* One question put to the person the connector is working for.
|
|
154
|
+
*
|
|
155
|
+
* It carries where it came from — the run and the step — because an answer is recorded
|
|
156
|
+
* against the run that asked and re-read when that run resumes. `expiresAt` is what makes an
|
|
157
|
+
* unanswered question fail its step instead of parking a project lock forever.
|
|
158
|
+
*/
|
|
159
|
+
export interface InquiryPayload {
|
|
160
|
+
id: string;
|
|
161
|
+
projectId: string;
|
|
162
|
+
runId?: string;
|
|
163
|
+
/** The pipeline step that asked, so a resumed run can match the answer to the place it belongs. */
|
|
164
|
+
step?: string;
|
|
165
|
+
kind: ConnectInquiryKind;
|
|
166
|
+
question: string;
|
|
167
|
+
/** What the asker already knows, so the person is not asked to go and find it out. */
|
|
168
|
+
context?: string;
|
|
169
|
+
options?: ConnectInquiryOption[];
|
|
170
|
+
multiple?: boolean;
|
|
171
|
+
/** Whether a choice question also accepts text the options do not cover. */
|
|
172
|
+
allowText?: boolean;
|
|
173
|
+
/** What the asker will assume if nobody answers. Recorded as an assumption when it is used. */
|
|
174
|
+
default?: string | string[];
|
|
175
|
+
expiresAt: string;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* The answer to one question.
|
|
179
|
+
*
|
|
180
|
+
* `declined` is a real answer and not an absence: it says a person saw the question and chose not
|
|
181
|
+
* to decide, which the asker records as an assumption rather than waiting out the timeout.
|
|
182
|
+
*/
|
|
183
|
+
export interface InquiryAnswerPayload {
|
|
184
|
+
inquiryId: string;
|
|
185
|
+
value?: string | string[];
|
|
186
|
+
text?: string;
|
|
187
|
+
declined?: boolean;
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=ops.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ops.d.ts","sourceRoot":"","sources":["../../src/connect/ops.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,KAAK,EACV,kBAAkB,EAAE,kBAAkB,EAAE,aAAa,EAAE,aAAa,EAAE,mBAAmB,EACzF,aAAa,EAAE,SAAS,EACzB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAEjD;;;;;;;GAOG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CA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