@opengeni/sdk 0.29.0 → 0.33.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/README.md +47 -4
- package/dist/artifact-client.d.ts +11 -0
- package/dist/chunk-YROWFD7R.js +2971 -0
- package/dist/chunk-YROWFD7R.js.map +1 -0
- package/dist/client.d.ts +643 -0
- package/dist/core.d.ts +5 -0
- package/dist/core.js +23 -0
- package/dist/core.js.map +1 -0
- package/dist/desktop.d.ts +71 -0
- package/dist/errors.d.ts +39 -0
- package/dist/index.d.ts +26 -4211
- package/dist/index.js +50 -2729
- package/dist/index.js.map +1 -1
- package/dist/mcp-output.d.ts +15 -0
- package/dist/preference-registry.d.ts +169 -0
- package/dist/proxy.d.ts +64 -0
- package/dist/sse.d.ts +14 -0
- package/dist/stream.d.ts +48 -0
- package/dist/terminal.d.ts +49 -0
- package/dist/transcription.d.ts +189 -0
- package/dist/types.d.ts +3221 -0
- package/dist/workspace-artifacts.d.ts +94 -0
- package/dist/workspace-control-stream.d.ts +12 -0
- package/dist/workspace-instruction-policies.d.ts +98 -0
- package/dist/workspace-state.d.ts +122 -0
- package/package.json +7 -3
- package/src/artifact-client.ts +85 -0
- package/src/client.ts +280 -3
- package/src/core.ts +19 -0
- package/src/index.ts +79 -1
- package/src/preference-registry.ts +210 -0
- package/src/transcription.ts +16 -0
- package/src/types.ts +262 -2
- package/src/workspace-artifacts.ts +94 -0
- package/src/workspace-state.ts +134 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
export type WorkspaceArtifactVersion = {
|
|
2
|
+
id: string;
|
|
3
|
+
accountId: string;
|
|
4
|
+
workspaceId: string;
|
|
5
|
+
artifactId: string;
|
|
6
|
+
revision: number;
|
|
7
|
+
contentType: "text/html";
|
|
8
|
+
contentSha256: string;
|
|
9
|
+
sizeBytes: number;
|
|
10
|
+
sourceSessionId: string | null;
|
|
11
|
+
sourceTurnId: string | null;
|
|
12
|
+
sourceAttemptId: string | null;
|
|
13
|
+
sourceExecutionGeneration: number | null;
|
|
14
|
+
createdBySubjectId: string;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type WorkspaceArtifact = {
|
|
19
|
+
id: string;
|
|
20
|
+
accountId: string;
|
|
21
|
+
workspaceId: string;
|
|
22
|
+
slug: string;
|
|
23
|
+
title: string;
|
|
24
|
+
description: string | null;
|
|
25
|
+
status: "active" | "archived";
|
|
26
|
+
currentVersion: WorkspaceArtifactVersion | null;
|
|
27
|
+
createdBySubjectId: string;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
updatedAt: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type WorkspaceArtifactEvent = {
|
|
33
|
+
id: string;
|
|
34
|
+
accountId: string;
|
|
35
|
+
workspaceId: string;
|
|
36
|
+
artifactId: string;
|
|
37
|
+
type: "published" | "rolled_back";
|
|
38
|
+
fromVersionId: string | null;
|
|
39
|
+
toVersionId: string;
|
|
40
|
+
sourceSessionId: string | null;
|
|
41
|
+
sourceTurnId: string | null;
|
|
42
|
+
sourceAttemptId: string | null;
|
|
43
|
+
sourceExecutionGeneration: number | null;
|
|
44
|
+
actorSubjectId: string;
|
|
45
|
+
reason: string;
|
|
46
|
+
createdAt: string;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export type WorkspaceArtifactListOptions = { limit?: number; cursor?: string };
|
|
50
|
+
export type WorkspaceArtifactListResponse = {
|
|
51
|
+
artifacts: WorkspaceArtifact[];
|
|
52
|
+
nextCursor: string | null;
|
|
53
|
+
truncated: boolean;
|
|
54
|
+
};
|
|
55
|
+
export type WorkspaceArtifactDetailResponse = {
|
|
56
|
+
artifact: WorkspaceArtifact;
|
|
57
|
+
versions: WorkspaceArtifactVersion[];
|
|
58
|
+
events: WorkspaceArtifactEvent[];
|
|
59
|
+
versionsTruncated: boolean;
|
|
60
|
+
eventsTruncated: boolean;
|
|
61
|
+
};
|
|
62
|
+
export type WorkspaceArtifactContentResponse = {
|
|
63
|
+
artifactId: string;
|
|
64
|
+
versionId: string;
|
|
65
|
+
contentType: "text/html";
|
|
66
|
+
contentSha256: string;
|
|
67
|
+
html: string;
|
|
68
|
+
};
|
|
69
|
+
export type WorkspaceArtifactMutationResponse = {
|
|
70
|
+
artifact: WorkspaceArtifact;
|
|
71
|
+
version: WorkspaceArtifactVersion;
|
|
72
|
+
event: WorkspaceArtifactEvent;
|
|
73
|
+
replayed: boolean;
|
|
74
|
+
};
|
|
75
|
+
export type CreateWorkspaceArtifactRequest = {
|
|
76
|
+
slug?: string;
|
|
77
|
+
title: string;
|
|
78
|
+
description?: string | null;
|
|
79
|
+
html: string;
|
|
80
|
+
idempotencyKey: string;
|
|
81
|
+
};
|
|
82
|
+
export type PublishWorkspaceArtifactVersionRequest = {
|
|
83
|
+
title?: string;
|
|
84
|
+
description?: string | null;
|
|
85
|
+
html: string;
|
|
86
|
+
expectedCurrentVersionId: string;
|
|
87
|
+
idempotencyKey: string;
|
|
88
|
+
};
|
|
89
|
+
export type RollbackWorkspaceArtifactRequest = {
|
|
90
|
+
versionId: string;
|
|
91
|
+
expectedCurrentVersionId: string;
|
|
92
|
+
reason: string;
|
|
93
|
+
idempotencyKey: string;
|
|
94
|
+
};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
WorkspaceInstructionPolicyKind,
|
|
3
|
+
WorkspaceInstructionPolicyProvenanceSource,
|
|
4
|
+
WorkspaceInstructionPolicyScope,
|
|
5
|
+
} from "./workspace-instruction-policies";
|
|
6
|
+
|
|
7
|
+
export type WorkspaceStateDocumentStatusCounts = {
|
|
8
|
+
queued: number;
|
|
9
|
+
indexing: number;
|
|
10
|
+
ready: number;
|
|
11
|
+
failed: number;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type WorkspaceStateSourceKindCounts = {
|
|
15
|
+
manual_upload: number;
|
|
16
|
+
meeting_transcript: number;
|
|
17
|
+
repository: number;
|
|
18
|
+
email: number;
|
|
19
|
+
chat: number;
|
|
20
|
+
document: number;
|
|
21
|
+
web: number;
|
|
22
|
+
other: number;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type WorkspaceStateMemoryStatusCounts = {
|
|
26
|
+
proposed: number;
|
|
27
|
+
approved: number;
|
|
28
|
+
rejected: number;
|
|
29
|
+
active: number;
|
|
30
|
+
superseded: number;
|
|
31
|
+
archived: number;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type WorkspaceStateMemoryKindCounts = {
|
|
35
|
+
semantic: number;
|
|
36
|
+
episodic: number;
|
|
37
|
+
procedural: number;
|
|
38
|
+
decision: number;
|
|
39
|
+
preference: number;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export type WorkspaceStateGapCode =
|
|
43
|
+
| "no_document_bases"
|
|
44
|
+
| "no_visible_documents"
|
|
45
|
+
| "failed_documents"
|
|
46
|
+
| "processing_documents"
|
|
47
|
+
| "missing_topic_coverage"
|
|
48
|
+
| "no_memory_records"
|
|
49
|
+
| "pending_memory_review"
|
|
50
|
+
| "partial_inventory";
|
|
51
|
+
|
|
52
|
+
export type WorkspaceStateResponse = {
|
|
53
|
+
workspaceId: string;
|
|
54
|
+
generatedAt: string;
|
|
55
|
+
truth: {
|
|
56
|
+
current: { source: "read_time_projection"; capturedAt: string };
|
|
57
|
+
policySnapshot: {
|
|
58
|
+
status: "not_captured";
|
|
59
|
+
reason: "workspace_instruction_policy_snapshot_not_implemented";
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
policy: {
|
|
63
|
+
authority: "workspace_instruction_policy_heads";
|
|
64
|
+
activeHeads: Array<{
|
|
65
|
+
kind: WorkspaceInstructionPolicyKind;
|
|
66
|
+
scope: WorkspaceInstructionPolicyScope;
|
|
67
|
+
roleKey: string | null;
|
|
68
|
+
revisionId: string;
|
|
69
|
+
revision: number;
|
|
70
|
+
contentHash: string;
|
|
71
|
+
activationVersion: number;
|
|
72
|
+
activatedAt: string;
|
|
73
|
+
}>;
|
|
74
|
+
activeHeadsTruncated: boolean;
|
|
75
|
+
latestRevision: {
|
|
76
|
+
kind: WorkspaceInstructionPolicyKind;
|
|
77
|
+
scope: WorkspaceInstructionPolicyScope;
|
|
78
|
+
roleKey: string | null;
|
|
79
|
+
revisionId: string;
|
|
80
|
+
revision: number;
|
|
81
|
+
contentHash: string;
|
|
82
|
+
provenanceSource: WorkspaceInstructionPolicyProvenanceSource;
|
|
83
|
+
state: "active" | "inactive";
|
|
84
|
+
createdAt: string;
|
|
85
|
+
} | null;
|
|
86
|
+
legacyRuntime: {
|
|
87
|
+
source: "workspace_override" | "deployment_default";
|
|
88
|
+
workspaceOverrideConfigured: boolean;
|
|
89
|
+
};
|
|
90
|
+
runtimeComposition: { status: "not_implemented" };
|
|
91
|
+
};
|
|
92
|
+
knowledge:
|
|
93
|
+
| {
|
|
94
|
+
availability: "unavailable";
|
|
95
|
+
reason: "missing_permission";
|
|
96
|
+
requiredPermission: "documents:search";
|
|
97
|
+
}
|
|
98
|
+
| {
|
|
99
|
+
availability: "available";
|
|
100
|
+
coverage: "complete" | "partial";
|
|
101
|
+
baseCount: number;
|
|
102
|
+
bases: Array<{
|
|
103
|
+
id: string;
|
|
104
|
+
name: string;
|
|
105
|
+
visibleDocumentCount: number;
|
|
106
|
+
statusCounts: WorkspaceStateDocumentStatusCounts;
|
|
107
|
+
latestUpdatedAt: string | null;
|
|
108
|
+
}>;
|
|
109
|
+
basesTruncated: boolean;
|
|
110
|
+
inspectedVisibleDocumentCount: number;
|
|
111
|
+
documentStatusCounts: WorkspaceStateDocumentStatusCounts;
|
|
112
|
+
sourceKindCounts: WorkspaceStateSourceKindCounts;
|
|
113
|
+
topics: Array<{ name: string; documentCount: number }>;
|
|
114
|
+
topicsTruncated: boolean;
|
|
115
|
+
latestDocumentUpdatedAt: string | null;
|
|
116
|
+
memorySample: {
|
|
117
|
+
recordCount: number;
|
|
118
|
+
sampleLimit: 100;
|
|
119
|
+
limitReached: boolean;
|
|
120
|
+
statusCounts: WorkspaceStateMemoryStatusCounts;
|
|
121
|
+
kindCounts: WorkspaceStateMemoryKindCounts;
|
|
122
|
+
preferenceAuthority: {
|
|
123
|
+
kindCountSource: "knowledge_memories_legacy_observations";
|
|
124
|
+
activeAuthority: "structured_preference_registry";
|
|
125
|
+
};
|
|
126
|
+
latestUpdatedAt: string | null;
|
|
127
|
+
};
|
|
128
|
+
gaps: Array<{
|
|
129
|
+
code: WorkspaceStateGapCode;
|
|
130
|
+
severity: "info" | "warning";
|
|
131
|
+
relatedCount: number | null;
|
|
132
|
+
}>;
|
|
133
|
+
};
|
|
134
|
+
};
|