@xpert-ai/contracts 3.27.0 → 3.28.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/index.cjs.js +611 -198
- package/index.esm.js +585 -199
- package/package.json +1 -1
- package/src/ai/chat-recovery.model.d.ts +1 -0
- package/src/ai/chat.model.d.ts +12 -1
- package/src/ai/computer-codex-isolation.model.d.ts +12 -0
- package/src/ai/execution-control-evidence.schema.d.ts +294 -0
- package/src/ai/execution-control.model.d.ts +26 -0
- package/src/ai/index.d.ts +4 -0
- package/src/ai/mcp-execution-control.schema.d.ts +107 -0
- package/src/ai/mcp-operation.model.d.ts +60 -0
- package/src/ai/mcp-task.schema.d.ts +85 -0
- package/src/ai/model-execution-parameters.model.d.ts +46 -0
- package/src/ai/model-execution.model.d.ts +3 -0
- package/src/ai/project-pipeline/operation.schema.d.ts +1987 -2
- package/src/ai/project-task-runtime.model.d.ts +44 -44
- package/src/ai/sandbox-execution-control.schema.d.ts +100 -0
- package/src/ai/thread-activity.model.d.ts +1 -0
- package/src/ai/thread-control-projection.model.d.ts +9 -0
- package/src/ai/thread-control-view.schema.d.ts +97 -0
- package/src/api-key.model.d.ts +3 -1
- package/src/content-document.model.d.ts +3 -1
- package/src/content-resource.model.d.ts +112 -0
- package/src/desktop-shell.model.d.ts +8 -0
- package/src/execution-control-admission.schema.d.ts +119 -0
- package/src/index.d.ts +9 -0
- package/src/plugin-application.d.ts +18 -0
- package/src/runtime-control.d.ts +9 -0
- package/src/secret-token.model.d.ts +33 -0
- package/src/task-control.model.d.ts +45 -0
- package/src/view-extension/model.d.ts +4 -0
|
@@ -748,10 +748,14 @@ export declare const projectTaskDispatchInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
748
748
|
instructions: z.ZodDefault<z.ZodString>;
|
|
749
749
|
}, "strict", z.ZodTypeAny, {
|
|
750
750
|
requestId: string;
|
|
751
|
-
expectedRevision: number;
|
|
752
751
|
taskId: string;
|
|
752
|
+
expectedRevision: number;
|
|
753
753
|
instructions: string;
|
|
754
754
|
bindingId?: string | undefined;
|
|
755
|
+
target?: {
|
|
756
|
+
type: "group_member";
|
|
757
|
+
participantId: string;
|
|
758
|
+
} | undefined;
|
|
755
759
|
purpose?: {
|
|
756
760
|
type: "implementation";
|
|
757
761
|
} | {
|
|
@@ -773,10 +777,6 @@ export declare const projectTaskDispatchInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
773
777
|
implementationInvocationId: string;
|
|
774
778
|
specificationDigest: string;
|
|
775
779
|
} | undefined;
|
|
776
|
-
target?: {
|
|
777
|
-
type: "group_member";
|
|
778
|
-
participantId: string;
|
|
779
|
-
} | undefined;
|
|
780
780
|
delivery?: {
|
|
781
781
|
mode: "none";
|
|
782
782
|
} | {
|
|
@@ -788,9 +788,13 @@ export declare const projectTaskDispatchInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
788
788
|
} | undefined;
|
|
789
789
|
}, {
|
|
790
790
|
requestId: string;
|
|
791
|
-
expectedRevision: number;
|
|
792
791
|
taskId: string;
|
|
792
|
+
expectedRevision: number;
|
|
793
793
|
bindingId?: string | undefined;
|
|
794
|
+
target?: {
|
|
795
|
+
type: "group_member";
|
|
796
|
+
participantId: string;
|
|
797
|
+
} | undefined;
|
|
794
798
|
purpose?: {
|
|
795
799
|
type: "implementation";
|
|
796
800
|
} | {
|
|
@@ -812,10 +816,6 @@ export declare const projectTaskDispatchInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
812
816
|
implementationInvocationId: string;
|
|
813
817
|
specificationDigest: string;
|
|
814
818
|
} | undefined;
|
|
815
|
-
target?: {
|
|
816
|
-
type: "group_member";
|
|
817
|
-
participantId: string;
|
|
818
|
-
} | undefined;
|
|
819
819
|
delivery?: {
|
|
820
820
|
mode: "none";
|
|
821
821
|
} | {
|
|
@@ -828,10 +828,14 @@ export declare const projectTaskDispatchInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
828
828
|
instructions?: string | undefined;
|
|
829
829
|
}>, {
|
|
830
830
|
requestId: string;
|
|
831
|
-
expectedRevision: number;
|
|
832
831
|
taskId: string;
|
|
832
|
+
expectedRevision: number;
|
|
833
833
|
instructions: string;
|
|
834
834
|
bindingId?: string | undefined;
|
|
835
|
+
target?: {
|
|
836
|
+
type: "group_member";
|
|
837
|
+
participantId: string;
|
|
838
|
+
} | undefined;
|
|
835
839
|
purpose?: {
|
|
836
840
|
type: "implementation";
|
|
837
841
|
} | {
|
|
@@ -853,10 +857,6 @@ export declare const projectTaskDispatchInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
853
857
|
implementationInvocationId: string;
|
|
854
858
|
specificationDigest: string;
|
|
855
859
|
} | undefined;
|
|
856
|
-
target?: {
|
|
857
|
-
type: "group_member";
|
|
858
|
-
participantId: string;
|
|
859
|
-
} | undefined;
|
|
860
860
|
delivery?: {
|
|
861
861
|
mode: "none";
|
|
862
862
|
} | {
|
|
@@ -868,9 +868,13 @@ export declare const projectTaskDispatchInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
868
868
|
} | undefined;
|
|
869
869
|
}, {
|
|
870
870
|
requestId: string;
|
|
871
|
-
expectedRevision: number;
|
|
872
871
|
taskId: string;
|
|
872
|
+
expectedRevision: number;
|
|
873
873
|
bindingId?: string | undefined;
|
|
874
|
+
target?: {
|
|
875
|
+
type: "group_member";
|
|
876
|
+
participantId: string;
|
|
877
|
+
} | undefined;
|
|
874
878
|
purpose?: {
|
|
875
879
|
type: "implementation";
|
|
876
880
|
} | {
|
|
@@ -892,10 +896,6 @@ export declare const projectTaskDispatchInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
892
896
|
implementationInvocationId: string;
|
|
893
897
|
specificationDigest: string;
|
|
894
898
|
} | undefined;
|
|
895
|
-
target?: {
|
|
896
|
-
type: "group_member";
|
|
897
|
-
participantId: string;
|
|
898
|
-
} | undefined;
|
|
899
899
|
delivery?: {
|
|
900
900
|
mode: "none";
|
|
901
901
|
} | {
|
|
@@ -1034,10 +1034,14 @@ export declare const projectTaskDispatchToolInputSchema: z.ZodEffects<z.ZodObjec
|
|
|
1034
1034
|
}>]>>;
|
|
1035
1035
|
instructions: z.ZodDefault<z.ZodString>;
|
|
1036
1036
|
}, "requestId">, "strict", z.ZodTypeAny, {
|
|
1037
|
-
expectedRevision: number;
|
|
1038
1037
|
taskId: string;
|
|
1038
|
+
expectedRevision: number;
|
|
1039
1039
|
instructions: string;
|
|
1040
1040
|
bindingId?: string | undefined;
|
|
1041
|
+
target?: {
|
|
1042
|
+
type: "group_member";
|
|
1043
|
+
participantId: string;
|
|
1044
|
+
} | undefined;
|
|
1041
1045
|
purpose?: {
|
|
1042
1046
|
type: "implementation";
|
|
1043
1047
|
} | {
|
|
@@ -1059,10 +1063,6 @@ export declare const projectTaskDispatchToolInputSchema: z.ZodEffects<z.ZodObjec
|
|
|
1059
1063
|
implementationInvocationId: string;
|
|
1060
1064
|
specificationDigest: string;
|
|
1061
1065
|
} | undefined;
|
|
1062
|
-
target?: {
|
|
1063
|
-
type: "group_member";
|
|
1064
|
-
participantId: string;
|
|
1065
|
-
} | undefined;
|
|
1066
1066
|
delivery?: {
|
|
1067
1067
|
mode: "none";
|
|
1068
1068
|
} | {
|
|
@@ -1073,9 +1073,13 @@ export declare const projectTaskDispatchToolInputSchema: z.ZodEffects<z.ZodObjec
|
|
|
1073
1073
|
paths?: string[] | undefined;
|
|
1074
1074
|
} | undefined;
|
|
1075
1075
|
}, {
|
|
1076
|
-
expectedRevision: number;
|
|
1077
1076
|
taskId: string;
|
|
1077
|
+
expectedRevision: number;
|
|
1078
1078
|
bindingId?: string | undefined;
|
|
1079
|
+
target?: {
|
|
1080
|
+
type: "group_member";
|
|
1081
|
+
participantId: string;
|
|
1082
|
+
} | undefined;
|
|
1079
1083
|
purpose?: {
|
|
1080
1084
|
type: "implementation";
|
|
1081
1085
|
} | {
|
|
@@ -1097,10 +1101,6 @@ export declare const projectTaskDispatchToolInputSchema: z.ZodEffects<z.ZodObjec
|
|
|
1097
1101
|
implementationInvocationId: string;
|
|
1098
1102
|
specificationDigest: string;
|
|
1099
1103
|
} | undefined;
|
|
1100
|
-
target?: {
|
|
1101
|
-
type: "group_member";
|
|
1102
|
-
participantId: string;
|
|
1103
|
-
} | undefined;
|
|
1104
1104
|
delivery?: {
|
|
1105
1105
|
mode: "none";
|
|
1106
1106
|
} | {
|
|
@@ -1112,10 +1112,14 @@ export declare const projectTaskDispatchToolInputSchema: z.ZodEffects<z.ZodObjec
|
|
|
1112
1112
|
} | undefined;
|
|
1113
1113
|
instructions?: string | undefined;
|
|
1114
1114
|
}>, {
|
|
1115
|
-
expectedRevision: number;
|
|
1116
1115
|
taskId: string;
|
|
1116
|
+
expectedRevision: number;
|
|
1117
1117
|
instructions: string;
|
|
1118
1118
|
bindingId?: string | undefined;
|
|
1119
|
+
target?: {
|
|
1120
|
+
type: "group_member";
|
|
1121
|
+
participantId: string;
|
|
1122
|
+
} | undefined;
|
|
1119
1123
|
purpose?: {
|
|
1120
1124
|
type: "implementation";
|
|
1121
1125
|
} | {
|
|
@@ -1137,10 +1141,6 @@ export declare const projectTaskDispatchToolInputSchema: z.ZodEffects<z.ZodObjec
|
|
|
1137
1141
|
implementationInvocationId: string;
|
|
1138
1142
|
specificationDigest: string;
|
|
1139
1143
|
} | undefined;
|
|
1140
|
-
target?: {
|
|
1141
|
-
type: "group_member";
|
|
1142
|
-
participantId: string;
|
|
1143
|
-
} | undefined;
|
|
1144
1144
|
delivery?: {
|
|
1145
1145
|
mode: "none";
|
|
1146
1146
|
} | {
|
|
@@ -1151,9 +1151,13 @@ export declare const projectTaskDispatchToolInputSchema: z.ZodEffects<z.ZodObjec
|
|
|
1151
1151
|
paths?: string[] | undefined;
|
|
1152
1152
|
} | undefined;
|
|
1153
1153
|
}, {
|
|
1154
|
-
expectedRevision: number;
|
|
1155
1154
|
taskId: string;
|
|
1155
|
+
expectedRevision: number;
|
|
1156
1156
|
bindingId?: string | undefined;
|
|
1157
|
+
target?: {
|
|
1158
|
+
type: "group_member";
|
|
1159
|
+
participantId: string;
|
|
1160
|
+
} | undefined;
|
|
1157
1161
|
purpose?: {
|
|
1158
1162
|
type: "implementation";
|
|
1159
1163
|
} | {
|
|
@@ -1175,10 +1179,6 @@ export declare const projectTaskDispatchToolInputSchema: z.ZodEffects<z.ZodObjec
|
|
|
1175
1179
|
implementationInvocationId: string;
|
|
1176
1180
|
specificationDigest: string;
|
|
1177
1181
|
} | undefined;
|
|
1178
|
-
target?: {
|
|
1179
|
-
type: "group_member";
|
|
1180
|
-
participantId: string;
|
|
1181
|
-
} | undefined;
|
|
1182
1182
|
delivery?: {
|
|
1183
1183
|
mode: "none";
|
|
1184
1184
|
} | {
|
|
@@ -1341,10 +1341,10 @@ export declare const projectTaskDecisionInputSchema: z.ZodObject<{
|
|
|
1341
1341
|
digest: string;
|
|
1342
1342
|
snapshotId: string;
|
|
1343
1343
|
})[];
|
|
1344
|
+
taskId: string;
|
|
1344
1345
|
expectedRevision: number;
|
|
1345
1346
|
implementationExecutionId: string;
|
|
1346
1347
|
specificationDigest: string;
|
|
1347
|
-
taskId: string;
|
|
1348
1348
|
rationale: string;
|
|
1349
1349
|
checks: string[];
|
|
1350
1350
|
reviewExecutionId?: string | undefined;
|
|
@@ -1364,10 +1364,10 @@ export declare const projectTaskDecisionInputSchema: z.ZodObject<{
|
|
|
1364
1364
|
digest: string;
|
|
1365
1365
|
snapshotId: string;
|
|
1366
1366
|
})[];
|
|
1367
|
+
taskId: string;
|
|
1367
1368
|
expectedRevision: number;
|
|
1368
1369
|
implementationExecutionId: string;
|
|
1369
1370
|
specificationDigest: string;
|
|
1370
|
-
taskId: string;
|
|
1371
1371
|
rationale: string;
|
|
1372
1372
|
checks: string[];
|
|
1373
1373
|
reviewExecutionId?: string | undefined;
|
|
@@ -1443,10 +1443,10 @@ export declare const projectTaskDecisionSchema: z.ZodObject<{
|
|
|
1443
1443
|
snapshotId: string;
|
|
1444
1444
|
})[];
|
|
1445
1445
|
decidedAt: string;
|
|
1446
|
+
taskId: string;
|
|
1446
1447
|
expectedRevision: number;
|
|
1447
1448
|
implementationExecutionId: string;
|
|
1448
1449
|
specificationDigest: string;
|
|
1449
|
-
taskId: string;
|
|
1450
1450
|
rationale: string;
|
|
1451
1451
|
checks: string[];
|
|
1452
1452
|
actorId: string;
|
|
@@ -1471,10 +1471,10 @@ export declare const projectTaskDecisionSchema: z.ZodObject<{
|
|
|
1471
1471
|
snapshotId: string;
|
|
1472
1472
|
})[];
|
|
1473
1473
|
decidedAt: string;
|
|
1474
|
+
taskId: string;
|
|
1474
1475
|
expectedRevision: number;
|
|
1475
1476
|
implementationExecutionId: string;
|
|
1476
1477
|
specificationDigest: string;
|
|
1477
|
-
taskId: string;
|
|
1478
1478
|
rationale: string;
|
|
1479
1479
|
checks: string[];
|
|
1480
1480
|
actorId: string;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { z } from 'zod/v3';
|
|
2
|
+
/** A control request can address only the original environment and execution generation. */
|
|
3
|
+
export declare const sandboxRuntimeTargetSchema: z.ZodObject<{
|
|
4
|
+
version: z.ZodLiteral<1>;
|
|
5
|
+
kind: z.ZodEnum<["host", "engine"]>;
|
|
6
|
+
provider: z.ZodString;
|
|
7
|
+
runtimeProfile: z.ZodString;
|
|
8
|
+
generation: z.ZodString;
|
|
9
|
+
environmentId: z.ZodString;
|
|
10
|
+
runtimeRef: z.ZodString;
|
|
11
|
+
}, "strict", z.ZodTypeAny, {
|
|
12
|
+
version?: 1;
|
|
13
|
+
kind?: "host" | "engine";
|
|
14
|
+
provider?: string;
|
|
15
|
+
generation?: string;
|
|
16
|
+
environmentId?: string;
|
|
17
|
+
runtimeProfile?: string;
|
|
18
|
+
runtimeRef?: string;
|
|
19
|
+
}, {
|
|
20
|
+
version?: 1;
|
|
21
|
+
kind?: "host" | "engine";
|
|
22
|
+
provider?: string;
|
|
23
|
+
generation?: string;
|
|
24
|
+
environmentId?: string;
|
|
25
|
+
runtimeProfile?: string;
|
|
26
|
+
runtimeRef?: string;
|
|
27
|
+
}>;
|
|
28
|
+
export type SandboxRuntimeTarget = z.output<typeof sandboxRuntimeTargetSchema>;
|
|
29
|
+
/** An accepted stop, closed stream, or expired lease is never an exit receipt. */
|
|
30
|
+
export declare const sandboxRuntimeEvidenceSchema: z.ZodObject<{
|
|
31
|
+
version: z.ZodLiteral<1>;
|
|
32
|
+
target: z.ZodObject<{
|
|
33
|
+
version: z.ZodLiteral<1>;
|
|
34
|
+
kind: z.ZodEnum<["host", "engine"]>;
|
|
35
|
+
provider: z.ZodString;
|
|
36
|
+
runtimeProfile: z.ZodString;
|
|
37
|
+
generation: z.ZodString;
|
|
38
|
+
environmentId: z.ZodString;
|
|
39
|
+
runtimeRef: z.ZodString;
|
|
40
|
+
}, "strict", z.ZodTypeAny, {
|
|
41
|
+
version?: 1;
|
|
42
|
+
kind?: "host" | "engine";
|
|
43
|
+
provider?: string;
|
|
44
|
+
generation?: string;
|
|
45
|
+
environmentId?: string;
|
|
46
|
+
runtimeProfile?: string;
|
|
47
|
+
runtimeRef?: string;
|
|
48
|
+
}, {
|
|
49
|
+
version?: 1;
|
|
50
|
+
kind?: "host" | "engine";
|
|
51
|
+
provider?: string;
|
|
52
|
+
generation?: string;
|
|
53
|
+
environmentId?: string;
|
|
54
|
+
runtimeProfile?: string;
|
|
55
|
+
runtimeRef?: string;
|
|
56
|
+
}>;
|
|
57
|
+
state: z.ZodEnum<["running", "exited", "not_started", "unknown"]>;
|
|
58
|
+
observedAt: z.ZodString;
|
|
59
|
+
}, "strict", z.ZodTypeAny, {
|
|
60
|
+
version?: 1;
|
|
61
|
+
target?: {
|
|
62
|
+
version?: 1;
|
|
63
|
+
kind?: "host" | "engine";
|
|
64
|
+
provider?: string;
|
|
65
|
+
generation?: string;
|
|
66
|
+
environmentId?: string;
|
|
67
|
+
runtimeProfile?: string;
|
|
68
|
+
runtimeRef?: string;
|
|
69
|
+
};
|
|
70
|
+
state?: "unknown" | "running" | "exited" | "not_started";
|
|
71
|
+
observedAt?: string;
|
|
72
|
+
}, {
|
|
73
|
+
version?: 1;
|
|
74
|
+
target?: {
|
|
75
|
+
version?: 1;
|
|
76
|
+
kind?: "host" | "engine";
|
|
77
|
+
provider?: string;
|
|
78
|
+
generation?: string;
|
|
79
|
+
environmentId?: string;
|
|
80
|
+
runtimeProfile?: string;
|
|
81
|
+
runtimeRef?: string;
|
|
82
|
+
};
|
|
83
|
+
state?: "unknown" | "running" | "exited" | "not_started";
|
|
84
|
+
observedAt?: string;
|
|
85
|
+
}>;
|
|
86
|
+
export type SandboxRuntimeEvidence = z.output<typeof sandboxRuntimeEvidenceSchema>;
|
|
87
|
+
export declare function sandboxTargetsEqual(a: SandboxRuntimeTarget, b: SandboxRuntimeTarget): boolean;
|
|
88
|
+
export declare function sandboxEvidence(target: SandboxRuntimeTarget, state: SandboxRuntimeEvidence['state']): SandboxRuntimeEvidence;
|
|
89
|
+
/** Explicit new business retry; it may proceed only after this original generation settled. */
|
|
90
|
+
export declare const sandboxJobRetryReferenceSchema: z.ZodObject<{
|
|
91
|
+
jobId: z.ZodString;
|
|
92
|
+
generation: z.ZodString;
|
|
93
|
+
}, "strict", z.ZodTypeAny, {
|
|
94
|
+
generation?: string;
|
|
95
|
+
jobId?: string;
|
|
96
|
+
}, {
|
|
97
|
+
generation?: string;
|
|
98
|
+
jobId?: string;
|
|
99
|
+
}>;
|
|
100
|
+
export type SandboxJobRetryReference = z.output<typeof sandboxJobRetryReferenceSchema>;
|
|
@@ -2,6 +2,7 @@ import type { TMessageContentResourceCard } from './resource-card';
|
|
|
2
2
|
/** Complete durable discovery snapshot. Tokens are delivered only by the per-run stream. */
|
|
3
3
|
export interface ThreadActivitySnapshot {
|
|
4
4
|
version: 1;
|
|
5
|
+
controlView?: import('./thread-control-view.schema').ThreadControlView;
|
|
5
6
|
threadId: string;
|
|
6
7
|
runs: Array<{
|
|
7
8
|
id: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
|
|
2
|
+
/** Internal presentation clock; neither execution evidence nor cached permission grants. */
|
|
3
|
+
export interface IThreadControlProjection extends IBasePerTenantAndOrganizationEntityModel {
|
|
4
|
+
id: string;
|
|
5
|
+
tenantId: string;
|
|
6
|
+
threadId: string;
|
|
7
|
+
revision: string;
|
|
8
|
+
fingerprint: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { z } from 'zod/v3';
|
|
2
|
+
/** Public presentation only. Every command revalidates permission and execution admission. */
|
|
3
|
+
export declare const threadControlActionsSchema: z.ZodObject<{
|
|
4
|
+
canPause: z.ZodBoolean;
|
|
5
|
+
canResume: z.ZodBoolean;
|
|
6
|
+
canTerminate: z.ZodBoolean;
|
|
7
|
+
canSend: z.ZodBoolean;
|
|
8
|
+
canQueue: z.ZodBoolean;
|
|
9
|
+
canRetry: z.ZodBoolean;
|
|
10
|
+
canRespond: z.ZodBoolean;
|
|
11
|
+
}, "strict", z.ZodTypeAny, {
|
|
12
|
+
canPause?: boolean;
|
|
13
|
+
canResume?: boolean;
|
|
14
|
+
canTerminate?: boolean;
|
|
15
|
+
canSend?: boolean;
|
|
16
|
+
canQueue?: boolean;
|
|
17
|
+
canRetry?: boolean;
|
|
18
|
+
canRespond?: boolean;
|
|
19
|
+
}, {
|
|
20
|
+
canPause?: boolean;
|
|
21
|
+
canResume?: boolean;
|
|
22
|
+
canTerminate?: boolean;
|
|
23
|
+
canSend?: boolean;
|
|
24
|
+
canQueue?: boolean;
|
|
25
|
+
canRetry?: boolean;
|
|
26
|
+
canRespond?: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
export declare const threadControlViewSchema: z.ZodObject<{
|
|
29
|
+
version: z.ZodLiteral<1>;
|
|
30
|
+
threadId: z.ZodString;
|
|
31
|
+
runId: z.ZodNullable<z.ZodString>;
|
|
32
|
+
revision: z.ZodString;
|
|
33
|
+
state: z.ZodEnum<["idle", "running", "pausing", "paused", "stopping", "settling", "input_required", "confirming", "completed", "stopped", "failed"]>;
|
|
34
|
+
actions: z.ZodObject<{
|
|
35
|
+
canPause: z.ZodBoolean;
|
|
36
|
+
canResume: z.ZodBoolean;
|
|
37
|
+
canTerminate: z.ZodBoolean;
|
|
38
|
+
canSend: z.ZodBoolean;
|
|
39
|
+
canQueue: z.ZodBoolean;
|
|
40
|
+
canRetry: z.ZodBoolean;
|
|
41
|
+
canRespond: z.ZodBoolean;
|
|
42
|
+
}, "strict", z.ZodTypeAny, {
|
|
43
|
+
canPause?: boolean;
|
|
44
|
+
canResume?: boolean;
|
|
45
|
+
canTerminate?: boolean;
|
|
46
|
+
canSend?: boolean;
|
|
47
|
+
canQueue?: boolean;
|
|
48
|
+
canRetry?: boolean;
|
|
49
|
+
canRespond?: boolean;
|
|
50
|
+
}, {
|
|
51
|
+
canPause?: boolean;
|
|
52
|
+
canResume?: boolean;
|
|
53
|
+
canTerminate?: boolean;
|
|
54
|
+
canSend?: boolean;
|
|
55
|
+
canQueue?: boolean;
|
|
56
|
+
canRetry?: boolean;
|
|
57
|
+
canRespond?: boolean;
|
|
58
|
+
}>;
|
|
59
|
+
pauseId: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, "strict", z.ZodTypeAny, {
|
|
61
|
+
version?: 1;
|
|
62
|
+
revision?: string;
|
|
63
|
+
threadId?: string;
|
|
64
|
+
runId?: string;
|
|
65
|
+
state?: "idle" | "completed" | "failed" | "pausing" | "paused" | "running" | "stopping" | "input_required" | "settling" | "confirming" | "stopped";
|
|
66
|
+
actions?: {
|
|
67
|
+
canPause?: boolean;
|
|
68
|
+
canResume?: boolean;
|
|
69
|
+
canTerminate?: boolean;
|
|
70
|
+
canSend?: boolean;
|
|
71
|
+
canQueue?: boolean;
|
|
72
|
+
canRetry?: boolean;
|
|
73
|
+
canRespond?: boolean;
|
|
74
|
+
};
|
|
75
|
+
pauseId?: string;
|
|
76
|
+
}, {
|
|
77
|
+
version?: 1;
|
|
78
|
+
revision?: string;
|
|
79
|
+
threadId?: string;
|
|
80
|
+
runId?: string;
|
|
81
|
+
state?: "idle" | "completed" | "failed" | "pausing" | "paused" | "running" | "stopping" | "input_required" | "settling" | "confirming" | "stopped";
|
|
82
|
+
actions?: {
|
|
83
|
+
canPause?: boolean;
|
|
84
|
+
canResume?: boolean;
|
|
85
|
+
canTerminate?: boolean;
|
|
86
|
+
canSend?: boolean;
|
|
87
|
+
canQueue?: boolean;
|
|
88
|
+
canRetry?: boolean;
|
|
89
|
+
canRespond?: boolean;
|
|
90
|
+
};
|
|
91
|
+
pauseId?: string;
|
|
92
|
+
}>;
|
|
93
|
+
export type ThreadControlView = Omit<Required<z.output<typeof threadControlViewSchema>>, 'actions' | 'pauseId'> & {
|
|
94
|
+
actions: ThreadControlActions;
|
|
95
|
+
pauseId?: string;
|
|
96
|
+
};
|
|
97
|
+
export type ThreadControlActions = Required<z.output<typeof threadControlActionsSchema>>;
|
package/src/api-key.model.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
|
|
2
|
-
import { SecretTokenBindingType, TEnterpriseH5TokenScope } from './secret-token.model';
|
|
2
|
+
import { SecretTokenBindingType, TEnterpriseH5TokenScope, TClientSecretGrantSource } from './secret-token.model';
|
|
3
3
|
import { IUser } from './user.model';
|
|
4
4
|
/**
|
|
5
5
|
* Represents an API key used for authentication and authorization.
|
|
@@ -107,6 +107,8 @@ export interface IApiPrincipal extends IUser {
|
|
|
107
107
|
clientSecretExpiresAt?: Date;
|
|
108
108
|
/** Exact enterprise H5 channel carried by an enterprise client secret. */
|
|
109
109
|
enterpriseH5Scope?: TEnterpriseH5TokenScope | null;
|
|
110
|
+
/** Original authorization source for live checks; resourceScope separately limits the accessible resources. */
|
|
111
|
+
grantSource?: TClientSecretGrantSource | null;
|
|
110
112
|
/**
|
|
111
113
|
* Resource owner / key creator. Used for audit and ownership metadata.
|
|
112
114
|
*/
|
|
@@ -100,7 +100,7 @@ export interface FileContentEditorRegistration extends ContentEditorMetadata {
|
|
|
100
100
|
kind: 'file';
|
|
101
101
|
concurrency: 'versioned';
|
|
102
102
|
}
|
|
103
|
-
export type ContentEditorRegistration = TextContentEditorRegistration | FileContentEditorRegistration;
|
|
103
|
+
export type ContentEditorRegistration = TextContentEditorRegistration | FileContentEditorRegistration | import('./content-resource.model').ResourceContentEditorRegistration;
|
|
104
104
|
/**
|
|
105
105
|
* Resolve an authorized resource to its registered editor, without opening UI.
|
|
106
106
|
* Send the returned navigation through workbench.navigation.open in the same
|
|
@@ -121,6 +121,8 @@ export interface ContentEditorOpenRequest {
|
|
|
121
121
|
/** Omit for a platform text document; resource providers are reauthorized server-side. */
|
|
122
122
|
providerKey?: string;
|
|
123
123
|
resourceId: string;
|
|
124
|
+
/** Explicit choice, accepted only if the model and edit protocol are compatible. */
|
|
125
|
+
editorKey?: string;
|
|
124
126
|
}
|
|
125
127
|
export interface ContentEditorResolveResult {
|
|
126
128
|
success: true;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { I18nObject } from './i18n.model';
|
|
2
|
+
export type ContentAction = 'rename' | 'move' | 'trash' | 'restore' | 'duplicate';
|
|
3
|
+
export type ContentSourceLocation = {
|
|
4
|
+
kind: 'file';
|
|
5
|
+
path: string;
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'bundle';
|
|
8
|
+
rootPath: string;
|
|
9
|
+
entryPath: string;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'managed';
|
|
12
|
+
} | {
|
|
13
|
+
kind: 'external';
|
|
14
|
+
connectionRef: string;
|
|
15
|
+
externalResourceId: string;
|
|
16
|
+
};
|
|
17
|
+
/** Semantic types are open identifiers; model/protocol compatibility determines editability. */
|
|
18
|
+
export interface ContentModelIdentity {
|
|
19
|
+
typeId: string;
|
|
20
|
+
modelId: string;
|
|
21
|
+
schemaVersion: string;
|
|
22
|
+
editProtocol: {
|
|
23
|
+
id: string;
|
|
24
|
+
version: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface ContentTypeImplementation {
|
|
28
|
+
/** False when creation uses a dedicated workflow (e.g. page creation or file upload).
|
|
29
|
+
* The implementation remains discoverable and its resources can still be indexed. */
|
|
30
|
+
creatable?: boolean;
|
|
31
|
+
typeId: string;
|
|
32
|
+
title: I18nObject;
|
|
33
|
+
implementationKey: string;
|
|
34
|
+
implementationTitle: I18nObject;
|
|
35
|
+
/** Optional provider-owned creation presets. IDs are validated again on the server. */
|
|
36
|
+
templates?: Array<{
|
|
37
|
+
id: string;
|
|
38
|
+
title: I18nObject;
|
|
39
|
+
description?: I18nObject;
|
|
40
|
+
}>;
|
|
41
|
+
modelId: string;
|
|
42
|
+
schemaVersion: string;
|
|
43
|
+
defaultEditorKey: string;
|
|
44
|
+
}
|
|
45
|
+
export interface ContentResourceSnapshot extends ContentModelIdentity {
|
|
46
|
+
/** Opt in only when all Project readers may read the source even without this provider.
|
|
47
|
+
* Resources with additional native ACLs must omit this field and fail closed offline. */
|
|
48
|
+
offlineAccess?: 'project';
|
|
49
|
+
sourceSync?: {
|
|
50
|
+
status: 'synced' | 'pending' | 'failed';
|
|
51
|
+
revision?: string;
|
|
52
|
+
};
|
|
53
|
+
/** Safe structural preview, never HTML, credentials or viewer-dependent query data. */
|
|
54
|
+
preview?: {
|
|
55
|
+
kind: 'outline';
|
|
56
|
+
revision: string;
|
|
57
|
+
lines: string[];
|
|
58
|
+
};
|
|
59
|
+
projectId: string;
|
|
60
|
+
title: string;
|
|
61
|
+
revision: string;
|
|
62
|
+
updatedAt: string;
|
|
63
|
+
deleted: boolean;
|
|
64
|
+
source: ContentSourceLocation;
|
|
65
|
+
/** Internal Project files represented by this resource. Library scanners suppress
|
|
66
|
+
* duplicate entries; this is presentation metadata, never a file access grant.
|
|
67
|
+
* Exported deliverables may remain independent and should not be listed here. */
|
|
68
|
+
containedPaths?: Array<{
|
|
69
|
+
path: string;
|
|
70
|
+
recursive: boolean;
|
|
71
|
+
}>;
|
|
72
|
+
defaultEditorKey: string;
|
|
73
|
+
allowedActions: ContentAction[];
|
|
74
|
+
}
|
|
75
|
+
export interface ContentCatalogItem extends ContentResourceSnapshot {
|
|
76
|
+
availability?: 'available' | 'provider-unavailable';
|
|
77
|
+
contentId: string;
|
|
78
|
+
resourceRef: {
|
|
79
|
+
providerKey: string;
|
|
80
|
+
resourceId: string;
|
|
81
|
+
};
|
|
82
|
+
canWrite: boolean;
|
|
83
|
+
bindingRevision: number;
|
|
84
|
+
}
|
|
85
|
+
/** Provider-owned, revision-bound public text only. Never include credentials, query
|
|
86
|
+
* payloads, live query results or executable markup in this shared search projection. */
|
|
87
|
+
export interface ContentSearchProjection {
|
|
88
|
+
revision: string;
|
|
89
|
+
sections: Array<{
|
|
90
|
+
anchor: {
|
|
91
|
+
kind: string;
|
|
92
|
+
id: string;
|
|
93
|
+
};
|
|
94
|
+
text: string;
|
|
95
|
+
}>;
|
|
96
|
+
}
|
|
97
|
+
/** A resource editor never owns a second copy of the resource's write protocol. */
|
|
98
|
+
export interface ResourceContentEditorRegistration {
|
|
99
|
+
kind: 'resource';
|
|
100
|
+
key: string;
|
|
101
|
+
protocolVersion: 2;
|
|
102
|
+
title: string;
|
|
103
|
+
view: {
|
|
104
|
+
providerKey: string;
|
|
105
|
+
viewKey: string;
|
|
106
|
+
entry: string;
|
|
107
|
+
};
|
|
108
|
+
supports: Array<ContentModelIdentity & {
|
|
109
|
+
access: Array<'view' | 'edit'>;
|
|
110
|
+
}>;
|
|
111
|
+
}
|
|
112
|
+
export declare const CONTENT_CATALOG_PROVIDER = "platform.content.catalog";
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export type ShellState = 'pending' | 'running' | 'cancel_requested' | 'succeeded' | 'failed' | 'cancelled' | 'timed_out' | 'rejected' | 'unknown';
|
|
2
|
+
export interface ShellExecutionEvidence {
|
|
3
|
+
version: 1;
|
|
4
|
+
generation: string;
|
|
5
|
+
state: 'exited' | 'not_started';
|
|
6
|
+
coverage: 'descendants';
|
|
7
|
+
}
|
|
2
8
|
export interface ShellSettings {
|
|
3
9
|
name: string;
|
|
4
10
|
shell: '/bin/zsh' | '/bin/bash';
|
|
@@ -79,6 +85,7 @@ export interface ShellOutputReport extends WireBase {
|
|
|
79
85
|
data: string;
|
|
80
86
|
}
|
|
81
87
|
export interface ShellStateReport extends WireBase {
|
|
88
|
+
completion?: ShellExecutionEvidence;
|
|
82
89
|
type: 'state';
|
|
83
90
|
state: ShellState;
|
|
84
91
|
seq: number;
|
|
@@ -111,6 +118,7 @@ export interface IDesktopShellGrant extends ShellScope {
|
|
|
111
118
|
expiresAt: Date;
|
|
112
119
|
}
|
|
113
120
|
export interface IDesktopShellOperation extends ShellScope {
|
|
121
|
+
completion?: ShellExecutionEvidence | null;
|
|
114
122
|
id: string;
|
|
115
123
|
deviceId: string;
|
|
116
124
|
grantId: string;
|