@opengeni/contracts 1.0.1 → 2.2.0-canary.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/agent-authored-durable-text.d.ts +64 -0
- package/dist/atlassian.d.ts +1 -0
- package/dist/atlassian.js +14 -13
- package/dist/{chunk-Y3MLSLB4.js → chunk-3SIZGL3O.js} +42 -30
- package/dist/chunk-3SIZGL3O.js.map +1 -0
- package/dist/{chunk-JBCIY7QD.js → chunk-7RMTKFJW.js} +45 -22
- package/dist/chunk-7RMTKFJW.js.map +1 -0
- package/dist/{chunk-NX5JNF4L.js → chunk-7ZZ3R27P.js} +9322 -5798
- package/dist/chunk-7ZZ3R27P.js.map +1 -0
- package/dist/{chunk-5UDNP7AO.js → chunk-MRWYRAS5.js} +56 -8
- package/dist/chunk-MRWYRAS5.js.map +1 -0
- package/dist/{chunk-LW7OH6CS.js → chunk-N6GRVXAJ.js} +6 -5
- package/dist/chunk-N6GRVXAJ.js.map +1 -0
- package/dist/{chunk-TZ6YEYN4.js → chunk-NVJMJWLL.js} +3 -1
- package/dist/chunk-NVJMJWLL.js.map +1 -0
- package/dist/chunk-PX3VCKAU.js +29 -0
- package/dist/chunk-PX3VCKAU.js.map +1 -0
- package/dist/{chunk-LSB7GRLG.js → chunk-TXTQIYCV.js} +15 -11
- package/dist/chunk-TXTQIYCV.js.map +1 -0
- package/dist/{chunk-CADSX6UN.js → chunk-Y3KNXVTD.js} +2 -2
- package/dist/chunk-YBW5JSA3.js +251 -0
- package/dist/chunk-YBW5JSA3.js.map +1 -0
- package/dist/company-brain-governed-writes.d.ts +475 -0
- package/dist/company-brain.d.ts +398 -0
- package/dist/company-profile.d.ts +268 -0
- package/dist/connection-authority.d.ts +501 -0
- package/dist/connection-authority.js +364 -0
- package/dist/connection-authority.js.map +1 -0
- package/dist/connector-attachments.d.ts +95 -0
- package/dist/connector-attachments.js +51 -0
- package/dist/connector-attachments.js.map +1 -0
- package/dist/editable-artifact-codec-registry.d.ts +16 -7
- package/dist/editable-artifact-codec-registry.js +18 -8
- package/dist/editable-artifact-committed-transaction.d.ts +2 -2
- package/dist/editable-artifact-committed-transaction.js +2 -2
- package/dist/editable-artifact-live.d.ts +11 -12
- package/dist/editable-artifact-live.js +111 -46
- package/dist/editable-artifact-live.js.map +1 -1
- package/dist/editable-artifact-serialized-commit.d.ts +2 -1
- package/dist/editable-artifact-serialized-commit.js +9 -8
- package/dist/editable-artifact-versions.d.ts +20 -5
- package/dist/editable-artifact-versions.js +23 -5
- package/dist/editable-artifacts.d.ts +2 -0
- package/dist/editable-artifacts.js +51 -39
- package/dist/google-drive.d.ts +1 -0
- package/dist/google-drive.js +14 -13
- package/dist/google-drive.js.map +1 -1
- package/dist/governed-learning-activation.d.ts +154 -0
- package/dist/governed-learning-evaluator.d.ts +152 -0
- package/dist/index.d.ts +12224 -1328
- package/dist/index.js +831 -115
- package/dist/interaction.d.ts +68 -0
- package/dist/knowledge.d.ts +119 -0
- package/dist/organization-membership-lifecycle.d.ts +516 -0
- package/dist/permissions.d.ts +52 -0
- package/dist/personal-github.d.ts +319 -0
- package/dist/personal-github.js +209 -0
- package/dist/personal-github.js.map +1 -0
- package/dist/preference-registry.d.ts +17 -0
- package/dist/remember.d.ts +331 -0
- package/dist/sandbox-file-artifacts.d.ts +56 -0
- package/dist/sandbox-snapshots.d.ts +21 -0
- package/dist/slack-bot-scopes.d.ts +34 -14
- package/dist/slack-bot-scopes.js +5 -1
- package/dist/spreadsheet-artifact-commands.d.ts +2 -3
- package/dist/spreadsheet-artifact-commands.js +4 -2
- package/dist/spreadsheet-artifact-query.js +3 -2
- package/dist/task-notes.d.ts +42 -1
- package/dist/tool-result-spill.d.ts +16 -0
- package/dist/workspace-instruction-policies.d.ts +81 -0
- package/dist/workspace-learning-administration.d.ts +289 -0
- package/package.json +13 -1
- package/src/agent-authored-durable-text.ts +105 -0
- package/src/company-brain-governed-writes.ts +356 -0
- package/src/company-brain.ts +201 -0
- package/src/company-profile.ts +122 -1
- package/src/connection-authority.ts +413 -0
- package/src/connector-attachments.ts +327 -0
- package/src/editable-artifact-codec-registry.ts +55 -17
- package/src/editable-artifact-committed-transaction.ts +44 -31
- package/src/editable-artifact-live.ts +123 -57
- package/src/editable-artifact-serialized-commit.ts +2 -1
- package/src/editable-artifact-versions.ts +26 -5
- package/src/editable-artifacts.ts +2 -0
- package/src/governed-learning-activation.ts +191 -0
- package/src/governed-learning-evaluator.ts +176 -0
- package/src/index.ts +3033 -392
- package/src/interaction.ts +55 -1
- package/src/knowledge.ts +118 -6
- package/src/organization-membership-lifecycle.ts +330 -0
- package/src/permissions.ts +55 -0
- package/src/personal-github.ts +267 -0
- package/src/preference-registry.ts +17 -0
- package/src/remember.ts +242 -0
- package/src/sandbox-file-artifacts.ts +65 -0
- package/src/sandbox-snapshots.ts +78 -0
- package/src/slack-bot-scopes.ts +81 -9
- package/src/spreadsheet-artifact-commands.ts +12 -13
- package/src/task-notes.ts +14 -1
- package/src/tool-result-spill.ts +35 -0
- package/src/workspace-instruction-policies.ts +30 -0
- package/src/workspace-learning-administration.ts +88 -0
- package/dist/chunk-5UDNP7AO.js.map +0 -1
- package/dist/chunk-BVGIYW7D.js +0 -11
- package/dist/chunk-BVGIYW7D.js.map +0 -1
- package/dist/chunk-JBCIY7QD.js.map +0 -1
- package/dist/chunk-LSB7GRLG.js.map +0 -1
- package/dist/chunk-LW7OH6CS.js.map +0 -1
- package/dist/chunk-NX5JNF4L.js.map +0 -1
- package/dist/chunk-TZ6YEYN4.js.map +0 -1
- package/dist/chunk-Y3MLSLB4.js.map +0 -1
- /package/dist/{chunk-CADSX6UN.js.map → chunk-Y3KNXVTD.js.map} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Model-visible overflow of one tool result. Exact bytes live on a workspace File. */
|
|
3
|
+
export declare const TOOL_RESULT_SPILLED_TYPE: "tool_result_spilled";
|
|
4
|
+
export declare const TOOL_RESULT_SPILL_MEDIA_TYPE: "application/json";
|
|
5
|
+
export declare const TOOL_RESULT_SPILL_MOUNT_PATH: "tool-results";
|
|
6
|
+
export declare const ToolResultSpilledReceipt: z.ZodObject<{
|
|
7
|
+
type: z.ZodLiteral<"tool_result_spilled">;
|
|
8
|
+
sandboxPath: z.ZodNullable<z.ZodString>;
|
|
9
|
+
fileId: z.ZodString;
|
|
10
|
+
byteSize: z.ZodNumber;
|
|
11
|
+
mediaType: z.ZodLiteral<"application/json">;
|
|
12
|
+
}, z.core.$strict>;
|
|
13
|
+
export type ToolResultSpilledReceipt = z.infer<typeof ToolResultSpilledReceipt>;
|
|
14
|
+
export declare function isToolResultSpilledReceipt(value: unknown): value is ToolResultSpilledReceipt;
|
|
15
|
+
export declare function toolResultSpillSandboxPath(filename: string): string;
|
|
16
|
+
export declare function toolResultSpillFilename(operationId: string): string;
|
|
@@ -126,6 +126,21 @@ export declare const WorkspaceInstructionPolicyHead: z.ZodObject<{
|
|
|
126
126
|
activatedAt: z.ZodString;
|
|
127
127
|
}, z.core.$strip>;
|
|
128
128
|
export type WorkspaceInstructionPolicyHead = z.infer<typeof WorkspaceInstructionPolicyHead>;
|
|
129
|
+
export declare const WorkspaceInstructionPolicyInactiveHead: z.ZodObject<{
|
|
130
|
+
kind: z.ZodEnum<{
|
|
131
|
+
charter: "charter";
|
|
132
|
+
policy: "policy";
|
|
133
|
+
}>;
|
|
134
|
+
scope: z.ZodEnum<{
|
|
135
|
+
global: "global";
|
|
136
|
+
role: "role";
|
|
137
|
+
}>;
|
|
138
|
+
roleKey: z.ZodNullable<z.ZodString>;
|
|
139
|
+
workspaceId: z.ZodString;
|
|
140
|
+
activationVersion: z.ZodNumber;
|
|
141
|
+
deactivatedAt: z.ZodString;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
export type WorkspaceInstructionPolicyInactiveHead = z.infer<typeof WorkspaceInstructionPolicyInactiveHead>;
|
|
129
144
|
export declare const WorkspaceInstructionPolicySnapshotProvenance: z.ZodObject<{
|
|
130
145
|
source: z.ZodEnum<{
|
|
131
146
|
human: "human";
|
|
@@ -310,6 +325,32 @@ export declare const WorkspaceInstructionPolicyActivationEvent: z.ZodObject<{
|
|
|
310
325
|
createdAt: z.ZodString;
|
|
311
326
|
}, z.core.$strip>;
|
|
312
327
|
export type WorkspaceInstructionPolicyActivationEvent = z.infer<typeof WorkspaceInstructionPolicyActivationEvent>;
|
|
328
|
+
export declare const WorkspaceInstructionPolicyDeactivationEvent: z.ZodObject<{
|
|
329
|
+
kind: z.ZodEnum<{
|
|
330
|
+
charter: "charter";
|
|
331
|
+
policy: "policy";
|
|
332
|
+
}>;
|
|
333
|
+
scope: z.ZodEnum<{
|
|
334
|
+
global: "global";
|
|
335
|
+
role: "role";
|
|
336
|
+
}>;
|
|
337
|
+
roleKey: z.ZodNullable<z.ZodString>;
|
|
338
|
+
id: z.ZodString;
|
|
339
|
+
operationId: z.ZodString;
|
|
340
|
+
accountId: z.ZodString;
|
|
341
|
+
workspaceId: z.ZodString;
|
|
342
|
+
type: z.ZodLiteral<"automatic_deactivate">;
|
|
343
|
+
activationVersion: z.ZodNumber;
|
|
344
|
+
oldRevision: z.ZodObject<{
|
|
345
|
+
id: z.ZodString;
|
|
346
|
+
revision: z.ZodNumber;
|
|
347
|
+
contentHash: z.ZodString;
|
|
348
|
+
}, z.core.$strip>;
|
|
349
|
+
actorSubjectId: z.ZodString;
|
|
350
|
+
reason: z.ZodString;
|
|
351
|
+
createdAt: z.ZodString;
|
|
352
|
+
}, z.core.$strip>;
|
|
353
|
+
export type WorkspaceInstructionPolicyDeactivationEvent = z.infer<typeof WorkspaceInstructionPolicyDeactivationEvent>;
|
|
313
354
|
export declare const CreateWorkspaceInstructionPolicyDraftRequest: z.ZodObject<{
|
|
314
355
|
operationId: z.ZodOptional<z.ZodString>;
|
|
315
356
|
kind: z.ZodEnum<{
|
|
@@ -398,6 +439,21 @@ export declare const WorkspaceInstructionPolicyListResponse: z.ZodObject<{
|
|
|
398
439
|
activationVersion: z.ZodNumber;
|
|
399
440
|
activatedAt: z.ZodString;
|
|
400
441
|
}, z.core.$strip>>;
|
|
442
|
+
inactiveHeads: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
443
|
+
kind: z.ZodEnum<{
|
|
444
|
+
charter: "charter";
|
|
445
|
+
policy: "policy";
|
|
446
|
+
}>;
|
|
447
|
+
scope: z.ZodEnum<{
|
|
448
|
+
global: "global";
|
|
449
|
+
role: "role";
|
|
450
|
+
}>;
|
|
451
|
+
roleKey: z.ZodNullable<z.ZodString>;
|
|
452
|
+
workspaceId: z.ZodString;
|
|
453
|
+
activationVersion: z.ZodNumber;
|
|
454
|
+
deactivatedAt: z.ZodString;
|
|
455
|
+
}, z.core.$strip>>>;
|
|
456
|
+
inactiveHeadsTruncated: z.ZodDefault<z.ZodBoolean>;
|
|
401
457
|
activationEvents: z.ZodArray<z.ZodObject<{
|
|
402
458
|
kind: z.ZodEnum<{
|
|
403
459
|
charter: "charter";
|
|
@@ -431,6 +487,31 @@ export declare const WorkspaceInstructionPolicyListResponse: z.ZodObject<{
|
|
|
431
487
|
reason: z.ZodString;
|
|
432
488
|
createdAt: z.ZodString;
|
|
433
489
|
}, z.core.$strip>>;
|
|
490
|
+
deactivationEvents: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
491
|
+
kind: z.ZodEnum<{
|
|
492
|
+
charter: "charter";
|
|
493
|
+
policy: "policy";
|
|
494
|
+
}>;
|
|
495
|
+
scope: z.ZodEnum<{
|
|
496
|
+
global: "global";
|
|
497
|
+
role: "role";
|
|
498
|
+
}>;
|
|
499
|
+
roleKey: z.ZodNullable<z.ZodString>;
|
|
500
|
+
id: z.ZodString;
|
|
501
|
+
operationId: z.ZodString;
|
|
502
|
+
accountId: z.ZodString;
|
|
503
|
+
workspaceId: z.ZodString;
|
|
504
|
+
type: z.ZodLiteral<"automatic_deactivate">;
|
|
505
|
+
activationVersion: z.ZodNumber;
|
|
506
|
+
oldRevision: z.ZodObject<{
|
|
507
|
+
id: z.ZodString;
|
|
508
|
+
revision: z.ZodNumber;
|
|
509
|
+
contentHash: z.ZodString;
|
|
510
|
+
}, z.core.$strip>;
|
|
511
|
+
actorSubjectId: z.ZodString;
|
|
512
|
+
reason: z.ZodString;
|
|
513
|
+
createdAt: z.ZodString;
|
|
514
|
+
}, z.core.$strip>>>;
|
|
434
515
|
nextAfterRevision: z.ZodNullable<z.ZodNumber>;
|
|
435
516
|
}, z.core.$strip>;
|
|
436
517
|
export type WorkspaceInstructionPolicyListResponse = z.infer<typeof WorkspaceInstructionPolicyListResponse>;
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const WORKSPACE_LEARNING_HISTORY_MAX_ITEMS = 100;
|
|
3
|
+
export declare const WorkspaceLearningPolicyHistoryQuery: z.ZodObject<{
|
|
4
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type WorkspaceLearningPolicyHistoryQuery = z.infer<typeof WorkspaceLearningPolicyHistoryQuery>;
|
|
7
|
+
export declare const CreateWorkspaceLearningPolicyRevisionRequest: z.ZodObject<{
|
|
8
|
+
operationId: z.ZodOptional<z.ZodString>;
|
|
9
|
+
workspaceMode: z.ZodEnum<{
|
|
10
|
+
automatic: "automatic";
|
|
11
|
+
off: "off";
|
|
12
|
+
suggest: "suggest";
|
|
13
|
+
}>;
|
|
14
|
+
sourceOverrides: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
15
|
+
kind: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
16
|
+
id: z.ZodString;
|
|
17
|
+
mode: z.ZodEnum<{
|
|
18
|
+
automatic: "automatic";
|
|
19
|
+
inherit: "inherit";
|
|
20
|
+
off: "off";
|
|
21
|
+
suggest: "suggest";
|
|
22
|
+
}>;
|
|
23
|
+
}, z.core.$strip>>>>;
|
|
24
|
+
supersedesRevisionId: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
export type CreateWorkspaceLearningPolicyRevisionRequest = z.infer<typeof CreateWorkspaceLearningPolicyRevisionRequest>;
|
|
27
|
+
export declare const ActivateWorkspaceLearningPolicyRevisionRequest: z.ZodObject<{
|
|
28
|
+
operationId: z.ZodOptional<z.ZodString>;
|
|
29
|
+
expectedCurrentRevisionId: z.ZodNullable<z.ZodString>;
|
|
30
|
+
expectedActivationVersion: z.ZodNumber;
|
|
31
|
+
reason: z.ZodString;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
export type ActivateWorkspaceLearningPolicyRevisionRequest = z.infer<typeof ActivateWorkspaceLearningPolicyRevisionRequest>;
|
|
34
|
+
export declare const RollbackWorkspaceLearningPolicyRevisionRequest: z.ZodObject<{
|
|
35
|
+
operationId: z.ZodOptional<z.ZodString>;
|
|
36
|
+
expectedActivationVersion: z.ZodNumber;
|
|
37
|
+
reason: z.ZodString;
|
|
38
|
+
targetRevisionId: z.ZodString;
|
|
39
|
+
expectedCurrentRevisionId: z.ZodString;
|
|
40
|
+
}, z.core.$strict>;
|
|
41
|
+
export type RollbackWorkspaceLearningPolicyRevisionRequest = z.infer<typeof RollbackWorkspaceLearningPolicyRevisionRequest>;
|
|
42
|
+
export declare const WorkspaceLearningPolicyMutationResponse: z.ZodObject<{
|
|
43
|
+
head: z.ZodObject<{
|
|
44
|
+
accountId: z.ZodString;
|
|
45
|
+
workspaceId: z.ZodString;
|
|
46
|
+
revisionId: z.ZodString;
|
|
47
|
+
revision: z.ZodNumber;
|
|
48
|
+
policyHash: z.ZodString;
|
|
49
|
+
activationVersion: z.ZodNumber;
|
|
50
|
+
activatedAt: z.ZodString;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
event: z.ZodObject<{
|
|
53
|
+
id: z.ZodString;
|
|
54
|
+
operationId: z.ZodString;
|
|
55
|
+
accountId: z.ZodString;
|
|
56
|
+
workspaceId: z.ZodString;
|
|
57
|
+
type: z.ZodEnum<{
|
|
58
|
+
activate: "activate";
|
|
59
|
+
rollback: "rollback";
|
|
60
|
+
}>;
|
|
61
|
+
activationVersion: z.ZodNumber;
|
|
62
|
+
oldRevision: z.ZodNullable<z.ZodObject<{
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
revision: z.ZodNumber;
|
|
65
|
+
policyHash: z.ZodString;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
|
+
newRevision: z.ZodObject<{
|
|
68
|
+
id: z.ZodString;
|
|
69
|
+
revision: z.ZodNumber;
|
|
70
|
+
policyHash: z.ZodString;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
actorSubjectId: z.ZodString;
|
|
73
|
+
reason: z.ZodString;
|
|
74
|
+
createdAt: z.ZodString;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
}, z.core.$strict>;
|
|
77
|
+
export type WorkspaceLearningPolicyMutationResponse = z.infer<typeof WorkspaceLearningPolicyMutationResponse>;
|
|
78
|
+
export declare const UndoGovernedLearningActivationHttpRequest: z.ZodObject<{
|
|
79
|
+
operationId: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, z.core.$strict>;
|
|
81
|
+
export type UndoGovernedLearningActivationHttpRequest = z.infer<typeof UndoGovernedLearningActivationHttpRequest>;
|
|
82
|
+
export declare const WorkspaceLearningHistoryResponse: z.ZodObject<{
|
|
83
|
+
head: z.ZodNullable<z.ZodObject<{
|
|
84
|
+
accountId: z.ZodString;
|
|
85
|
+
workspaceId: z.ZodString;
|
|
86
|
+
revisionId: z.ZodString;
|
|
87
|
+
revision: z.ZodNumber;
|
|
88
|
+
policyHash: z.ZodString;
|
|
89
|
+
activationVersion: z.ZodNumber;
|
|
90
|
+
activatedAt: z.ZodString;
|
|
91
|
+
}, z.core.$strip>>;
|
|
92
|
+
revisions: z.ZodArray<z.ZodObject<{
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
revision: z.ZodNumber;
|
|
95
|
+
policyHash: z.ZodString;
|
|
96
|
+
operationId: z.ZodString;
|
|
97
|
+
accountId: z.ZodString;
|
|
98
|
+
workspaceId: z.ZodString;
|
|
99
|
+
workspaceMode: z.ZodEnum<{
|
|
100
|
+
automatic: "automatic";
|
|
101
|
+
off: "off";
|
|
102
|
+
suggest: "suggest";
|
|
103
|
+
}>;
|
|
104
|
+
sourceOverrides: z.ZodArray<z.ZodObject<{
|
|
105
|
+
kind: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
106
|
+
id: z.ZodString;
|
|
107
|
+
mode: z.ZodEnum<{
|
|
108
|
+
automatic: "automatic";
|
|
109
|
+
off: "off";
|
|
110
|
+
suggest: "suggest";
|
|
111
|
+
}>;
|
|
112
|
+
}, z.core.$strip>>;
|
|
113
|
+
supersedesRevisionId: z.ZodNullable<z.ZodString>;
|
|
114
|
+
createdBySubjectId: z.ZodString;
|
|
115
|
+
createdAt: z.ZodString;
|
|
116
|
+
}, z.core.$strip>>;
|
|
117
|
+
policyEvents: z.ZodArray<z.ZodObject<{
|
|
118
|
+
id: z.ZodString;
|
|
119
|
+
operationId: z.ZodString;
|
|
120
|
+
accountId: z.ZodString;
|
|
121
|
+
workspaceId: z.ZodString;
|
|
122
|
+
type: z.ZodEnum<{
|
|
123
|
+
activate: "activate";
|
|
124
|
+
rollback: "rollback";
|
|
125
|
+
}>;
|
|
126
|
+
activationVersion: z.ZodNumber;
|
|
127
|
+
oldRevision: z.ZodNullable<z.ZodObject<{
|
|
128
|
+
id: z.ZodString;
|
|
129
|
+
revision: z.ZodNumber;
|
|
130
|
+
policyHash: z.ZodString;
|
|
131
|
+
}, z.core.$strip>>;
|
|
132
|
+
newRevision: z.ZodObject<{
|
|
133
|
+
id: z.ZodString;
|
|
134
|
+
revision: z.ZodNumber;
|
|
135
|
+
policyHash: z.ZodString;
|
|
136
|
+
}, z.core.$strip>;
|
|
137
|
+
actorSubjectId: z.ZodString;
|
|
138
|
+
reason: z.ZodString;
|
|
139
|
+
createdAt: z.ZodString;
|
|
140
|
+
}, z.core.$strip>>;
|
|
141
|
+
decisions: z.ZodArray<z.ZodObject<{
|
|
142
|
+
id: z.ZodString;
|
|
143
|
+
operationId: z.ZodString;
|
|
144
|
+
inputHash: z.ZodString;
|
|
145
|
+
accountId: z.ZodString;
|
|
146
|
+
workspaceId: z.ZodString;
|
|
147
|
+
sessionId: z.ZodString;
|
|
148
|
+
turnId: z.ZodString;
|
|
149
|
+
attemptId: z.ZodString;
|
|
150
|
+
executionGeneration: z.ZodNumber;
|
|
151
|
+
initiatingHumanSubjectId: z.ZodString;
|
|
152
|
+
policySnapshotId: z.ZodString;
|
|
153
|
+
policySnapshotHash: z.ZodString;
|
|
154
|
+
policyRevisionId: z.ZodNullable<z.ZodString>;
|
|
155
|
+
policyActivationVersion: z.ZodNumber;
|
|
156
|
+
sourceKind: z.ZodEnum<{
|
|
157
|
+
"scoped-knowledge-evidence": "scoped-knowledge-evidence";
|
|
158
|
+
"task-note": "task-note";
|
|
159
|
+
}>;
|
|
160
|
+
sourceId: z.ZodString;
|
|
161
|
+
proposalId: z.ZodString;
|
|
162
|
+
proposalInputHash: z.ZodString;
|
|
163
|
+
proposalContentHash: z.ZodString;
|
|
164
|
+
claimId: z.ZodString;
|
|
165
|
+
claimInputHash: z.ZodString;
|
|
166
|
+
evidenceId: z.ZodString;
|
|
167
|
+
evidenceInputHash: z.ZodString;
|
|
168
|
+
evidenceContentHash: z.ZodString;
|
|
169
|
+
evidenceAuthorityHash: z.ZodString;
|
|
170
|
+
reviewRevision: z.ZodNumber;
|
|
171
|
+
reviewState: z.ZodEnum<{
|
|
172
|
+
approved: "approved";
|
|
173
|
+
proposed: "proposed";
|
|
174
|
+
rejected: "rejected";
|
|
175
|
+
revoked: "revoked";
|
|
176
|
+
}>;
|
|
177
|
+
effectiveMode: z.ZodEnum<{
|
|
178
|
+
automatic: "automatic";
|
|
179
|
+
off: "off";
|
|
180
|
+
suggest: "suggest";
|
|
181
|
+
}>;
|
|
182
|
+
confidenceBps: z.ZodNumber;
|
|
183
|
+
conflictCount: z.ZodNumber;
|
|
184
|
+
outcome: z.ZodEnum<{
|
|
185
|
+
automatic: "automatic";
|
|
186
|
+
confidence: "confidence";
|
|
187
|
+
conflict: "conflict";
|
|
188
|
+
off: "off";
|
|
189
|
+
revoked: "revoked";
|
|
190
|
+
stale: "stale";
|
|
191
|
+
suggest: "suggest";
|
|
192
|
+
}>;
|
|
193
|
+
reasons: z.ZodArray<z.ZodEnum<{
|
|
194
|
+
confidence_below_floor: "confidence_below_floor";
|
|
195
|
+
evidence_conflict: "evidence_conflict";
|
|
196
|
+
evidence_revoked: "evidence_revoked";
|
|
197
|
+
policy_automatic: "policy_automatic";
|
|
198
|
+
policy_off: "policy_off";
|
|
199
|
+
policy_suggest: "policy_suggest";
|
|
200
|
+
proposal_stale: "proposal_stale";
|
|
201
|
+
}>>;
|
|
202
|
+
automaticEligible: z.ZodBoolean;
|
|
203
|
+
confidenceFloorBps: z.ZodLiteral<8500>;
|
|
204
|
+
createdAt: z.ZodString;
|
|
205
|
+
}, z.core.$strict>>;
|
|
206
|
+
activations: z.ZodArray<z.ZodObject<{
|
|
207
|
+
destination: z.ZodEnum<{
|
|
208
|
+
instruction_policy: "instruction_policy";
|
|
209
|
+
preference: "preference";
|
|
210
|
+
}>;
|
|
211
|
+
destinationProposalId: z.ZodString;
|
|
212
|
+
destinationRevisionId: z.ZodString;
|
|
213
|
+
destinationOldRevisionId: z.ZodNullable<z.ZodString>;
|
|
214
|
+
destinationOldContentHash: z.ZodNullable<z.ZodString>;
|
|
215
|
+
destinationOldVersion: z.ZodNumber;
|
|
216
|
+
destinationNewContentHash: z.ZodString;
|
|
217
|
+
destinationNewVersion: z.ZodNumber;
|
|
218
|
+
destinationEventId: z.ZodString;
|
|
219
|
+
id: z.ZodString;
|
|
220
|
+
operationId: z.ZodString;
|
|
221
|
+
inputHash: z.ZodString;
|
|
222
|
+
accountId: z.ZodString;
|
|
223
|
+
workspaceId: z.ZodString;
|
|
224
|
+
decisionReceiptId: z.ZodString;
|
|
225
|
+
initiatingHumanSubjectId: z.ZodString;
|
|
226
|
+
serviceActorSubjectId: z.ZodString;
|
|
227
|
+
policyRevisionId: z.ZodString;
|
|
228
|
+
policyHash: z.ZodString;
|
|
229
|
+
policyActivationVersion: z.ZodNumber;
|
|
230
|
+
sourceKind: z.ZodEnum<{
|
|
231
|
+
"scoped-knowledge-evidence": "scoped-knowledge-evidence";
|
|
232
|
+
"task-note": "task-note";
|
|
233
|
+
}>;
|
|
234
|
+
sourceId: z.ZodString;
|
|
235
|
+
sourceAuthorityHash: z.ZodString;
|
|
236
|
+
proposalId: z.ZodString;
|
|
237
|
+
claimId: z.ZodString;
|
|
238
|
+
evidenceId: z.ZodString;
|
|
239
|
+
knowledgePreviousReviewId: z.ZodString;
|
|
240
|
+
knowledgePreviousReviewRevision: z.ZodNumber;
|
|
241
|
+
knowledgeApprovalReviewId: z.ZodString;
|
|
242
|
+
knowledgeApprovalReviewRevision: z.ZodNumber;
|
|
243
|
+
knowledgeApprovalInputHash: z.ZodString;
|
|
244
|
+
outcome: z.ZodLiteral<"activated">;
|
|
245
|
+
effectiveAt: z.ZodString;
|
|
246
|
+
authorityKind: z.ZodEnum<{
|
|
247
|
+
automatic: "automatic";
|
|
248
|
+
human_confirmed: "human_confirmed";
|
|
249
|
+
}>;
|
|
250
|
+
humanInputRequestId: z.ZodNullable<z.ZodString>;
|
|
251
|
+
rollback: z.ZodObject<{
|
|
252
|
+
supported: z.ZodLiteral<true>;
|
|
253
|
+
mechanism: z.ZodLiteral<"exact_head_and_latest_review">;
|
|
254
|
+
}, z.core.$strict>;
|
|
255
|
+
createdAt: z.ZodString;
|
|
256
|
+
}, z.core.$strict>>;
|
|
257
|
+
undos: z.ZodArray<z.ZodObject<{
|
|
258
|
+
id: z.ZodString;
|
|
259
|
+
operationId: z.ZodString;
|
|
260
|
+
inputHash: z.ZodString;
|
|
261
|
+
accountId: z.ZodString;
|
|
262
|
+
workspaceId: z.ZodString;
|
|
263
|
+
activationReceiptId: z.ZodString;
|
|
264
|
+
initiatingHumanSubjectId: z.ZodString;
|
|
265
|
+
serviceActorSubjectId: z.ZodString;
|
|
266
|
+
destination: z.ZodEnum<{
|
|
267
|
+
instruction_policy: "instruction_policy";
|
|
268
|
+
preference: "preference";
|
|
269
|
+
}>;
|
|
270
|
+
knowledgeApprovalReviewId: z.ZodString;
|
|
271
|
+
knowledgeRevocationReviewId: z.ZodString;
|
|
272
|
+
knowledgeRevocationReviewRevision: z.ZodNumber;
|
|
273
|
+
knowledgeRevocationInputHash: z.ZodString;
|
|
274
|
+
destinationActivatedRevisionId: z.ZodString;
|
|
275
|
+
destinationRestoredRevisionId: z.ZodNullable<z.ZodString>;
|
|
276
|
+
destinationActivatedContentHash: z.ZodString;
|
|
277
|
+
destinationRestoredContentHash: z.ZodNullable<z.ZodString>;
|
|
278
|
+
destinationOldVersion: z.ZodNumber;
|
|
279
|
+
destinationNewVersion: z.ZodNumber;
|
|
280
|
+
destinationEventId: z.ZodString;
|
|
281
|
+
outcome: z.ZodLiteral<"undone">;
|
|
282
|
+
superseded: z.ZodLiteral<false>;
|
|
283
|
+
effectiveAt: z.ZodString;
|
|
284
|
+
createdAt: z.ZodString;
|
|
285
|
+
}, z.core.$strict>>;
|
|
286
|
+
truncated: z.ZodBoolean;
|
|
287
|
+
effectiveBoundary: z.ZodLiteral<"next_accepted_attempt">;
|
|
288
|
+
}, z.core.$strict>;
|
|
289
|
+
export type WorkspaceLearningHistoryResponse = z.infer<typeof WorkspaceLearningHistoryResponse>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeni/contracts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.2.0-canary.0",
|
|
4
4
|
"description": "Shared zod schemas and wire-contract types for the OpenGeni API.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -30,6 +30,10 @@
|
|
|
30
30
|
"types": "./dist/google-drive.d.ts",
|
|
31
31
|
"import": "./dist/google-drive.js"
|
|
32
32
|
},
|
|
33
|
+
"./personal-github": {
|
|
34
|
+
"types": "./dist/personal-github.d.ts",
|
|
35
|
+
"import": "./dist/personal-github.js"
|
|
36
|
+
},
|
|
33
37
|
"./atlassian": {
|
|
34
38
|
"types": "./dist/atlassian.d.ts",
|
|
35
39
|
"import": "./dist/atlassian.js"
|
|
@@ -38,6 +42,14 @@
|
|
|
38
42
|
"types": "./dist/connector-destinations.d.ts",
|
|
39
43
|
"import": "./dist/connector-destinations.js"
|
|
40
44
|
},
|
|
45
|
+
"./connector-attachments": {
|
|
46
|
+
"types": "./dist/connector-attachments.d.ts",
|
|
47
|
+
"import": "./dist/connector-attachments.js"
|
|
48
|
+
},
|
|
49
|
+
"./connection-authority": {
|
|
50
|
+
"types": "./dist/connection-authority.d.ts",
|
|
51
|
+
"import": "./dist/connection-authority.js"
|
|
52
|
+
},
|
|
41
53
|
"./video-generation": {
|
|
42
54
|
"types": "./dist/video-generation.d.ts",
|
|
43
55
|
"import": "./dist/video-generation.js"
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Budgets and authoring style for durable text an **agent** writes on a user's
|
|
3
|
+
* behalf.
|
|
4
|
+
*
|
|
5
|
+
* The budget follows the cost, and the cost differs per destination:
|
|
6
|
+
*
|
|
7
|
+
* - A workspace instruction policy is composed verbatim into the prompt of
|
|
8
|
+
* every session it applies to, for as long as it stays active. A global
|
|
9
|
+
* charter or global policy applies to every session in the workspace; a role
|
|
10
|
+
* policy applies to every session bound to that role. At most three entries
|
|
11
|
+
* compose at once (charter, global policy, matching role policy), so the
|
|
12
|
+
* standing ceiling this budget implies is three times the per-entry cap.
|
|
13
|
+
* - A preference is cheaper and in a different way: only its short title and
|
|
14
|
+
* description descriptors are prompt-composed, while the full content is
|
|
15
|
+
* retrieved on demand behind the exact attempt's retrieval handle. Its length
|
|
16
|
+
* is therefore retrieval cost, not standing prompt cost, which is why it gets
|
|
17
|
+
* more room rather than less.
|
|
18
|
+
* - A company profile is the largest always-on surface: every field is
|
|
19
|
+
* mandatory prompt context in every session across the whole organization.
|
|
20
|
+
* - Knowledge is retrieval evidence and never joins the always-composed prefix.
|
|
21
|
+
*
|
|
22
|
+
* These caps deliberately bind only agent-authored writes. The human-facing
|
|
23
|
+
* limits (`WORKSPACE_INSTRUCTION_POLICY_CONTENT_MAX_CHARS`,
|
|
24
|
+
* `PREFERENCE_REGISTRY_CONTENT_MAX_CHARS`, `COMPANY_PROFILE_SCALAR_MAX_CHARS`,
|
|
25
|
+
* `COMPANY_PROFILE_ENTRY_MAX_CHARS`, `COMPANY_PROFILE_CONTENT_MAX_UTF8_BYTES`)
|
|
26
|
+
* are unchanged: a person editing in the UI is making a deliberate, visible
|
|
27
|
+
* choice, and lowering their limit would reject text they already typed.
|
|
28
|
+
* Existing stored revisions are never rewritten; only new agent writes are
|
|
29
|
+
* bounded.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/** One imperative rule, in 1-3 sentences, fits comfortably under this. */
|
|
33
|
+
export const AGENT_AUTHORED_INSTRUCTION_POLICY_CONTENT_MAX_CHARS = 600;
|
|
34
|
+
|
|
35
|
+
/** Retrieved on demand rather than always composed, so a little more room. */
|
|
36
|
+
export const AGENT_AUTHORED_PREFERENCE_CONTENT_MAX_CHARS = 1_200;
|
|
37
|
+
|
|
38
|
+
/** `identity` and `mission`: a couple of sentences, not a positioning document. */
|
|
39
|
+
export const AGENT_AUTHORED_COMPANY_PROFILE_SCALAR_MAX_CHARS = 400;
|
|
40
|
+
|
|
41
|
+
/** One product, customer, goal, or constraint: a phrase or a single sentence. */
|
|
42
|
+
export const AGENT_AUTHORED_COMPANY_PROFILE_ENTRY_MAX_CHARS = 200;
|
|
43
|
+
|
|
44
|
+
/** Whole canonical profile, mandatory in every session across the organization. */
|
|
45
|
+
export const AGENT_AUTHORED_COMPANY_PROFILE_CONTENT_MAX_UTF8_BYTES = 4_096;
|
|
46
|
+
|
|
47
|
+
export const AGENT_AUTHORED_INSTRUCTION_POLICY_CONTENT_TOO_LONG_MESSAGE =
|
|
48
|
+
"A workspace rule is composed verbatim into the prompt of every session it applies to (every session " +
|
|
49
|
+
"for a global charter or policy, every session bound to the role for a role policy), for as long as it " +
|
|
50
|
+
`stays active. Keep it under ${AGENT_AUTHORED_INSTRUCTION_POLICY_CONTENT_MAX_CHARS} characters: one rule, ` +
|
|
51
|
+
"imperative, no numbered procedure. Split unrelated rules into separate entries.";
|
|
52
|
+
|
|
53
|
+
export const AGENT_AUTHORED_PREFERENCE_CONTENT_TOO_LONG_MESSAGE =
|
|
54
|
+
"A workspace preference is durable Company Brain content that agents retrieve on demand, so its length is " +
|
|
55
|
+
"retrieval cost rather than standing prompt cost: only its short title and description are composed into " +
|
|
56
|
+
`every session prompt. Keep it under ${AGENT_AUTHORED_PREFERENCE_CONTENT_MAX_CHARS} characters: state the ` +
|
|
57
|
+
"preference plainly, no numbered procedure and no examples. Put procedure in a Document or Skill and " +
|
|
58
|
+
"reference it instead.";
|
|
59
|
+
|
|
60
|
+
export const AGENT_AUTHORED_COMPANY_PROFILE_TOO_LONG_MESSAGE =
|
|
61
|
+
"Every company-profile field is mandatory prompt context in every session across the organization. Keep " +
|
|
62
|
+
`identity and mission under ${AGENT_AUTHORED_COMPANY_PROFILE_SCALAR_MAX_CHARS} characters each, each list ` +
|
|
63
|
+
`entry under ${AGENT_AUTHORED_COMPANY_PROFILE_ENTRY_MAX_CHARS}, and the whole profile under ` +
|
|
64
|
+
`${AGENT_AUTHORED_COMPANY_PROFILE_CONTENT_MAX_UTF8_BYTES} UTF-8 bytes: one concise statement per field, no ` +
|
|
65
|
+
"numbered procedure and no marketing copy. Longer source material belongs in organization Documents and is " +
|
|
66
|
+
"retrieved as evidence.";
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Lane-agnostic guidance for the one `remember` content field, whose schema
|
|
70
|
+
* bound has to admit the widest lane. Without it an over-long rule would be
|
|
71
|
+
* refused with a generic "expected length <= 4000" that points at the wrong
|
|
72
|
+
* number entirely.
|
|
73
|
+
*/
|
|
74
|
+
export const AGENT_AUTHORED_REMEMBER_CONTENT_TOO_LONG_MESSAGE =
|
|
75
|
+
"Remembered content is bounded by where it lands: a mandatory workspace rule at most " +
|
|
76
|
+
`${AGENT_AUTHORED_INSTRUCTION_POLICY_CONTENT_MAX_CHARS} characters because it is composed into every ` +
|
|
77
|
+
`session prompt it applies to, a preference at most ${AGENT_AUTHORED_PREFERENCE_CONTENT_MAX_CHARS}, a ` +
|
|
78
|
+
"Knowledge fact at most 4000. Write one imperative statement in 1-3 sentences, split unrelated entries, and " +
|
|
79
|
+
"keep procedure in a Document or Skill that the entry references.";
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The shape rule the model reads on every tool that authors a durable *rule or
|
|
83
|
+
* preference*. Deliberately not reused for the company profile, which is a
|
|
84
|
+
* descriptive profile rather than an instruction and needs its own wording.
|
|
85
|
+
*/
|
|
86
|
+
export const AGENT_AUTHORED_DURABLE_TEXT_STYLE =
|
|
87
|
+
"Durable text is prompt cost, not a place to be thorough: write one imperative statement in 1-3 sentences, " +
|
|
88
|
+
"with no numbered steps, no examples, no rationale and no restating of defaults. Prefer several small entries " +
|
|
89
|
+
"over one long one, and keep procedure in a Document or Skill that the rule references instead of inlining it.";
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Actionable over-budget message including the text the caller actually sent,
|
|
93
|
+
* so the model can see how far over it is instead of guessing.
|
|
94
|
+
*/
|
|
95
|
+
export function agentAuthoredDurableTextTooLongMessage(input: {
|
|
96
|
+
kind: "instruction_policy" | "preference";
|
|
97
|
+
actualChars: number;
|
|
98
|
+
}): string {
|
|
99
|
+
const subject = input.kind === "instruction_policy" ? "This rule is" : "This preference is";
|
|
100
|
+
const limit =
|
|
101
|
+
input.kind === "instruction_policy"
|
|
102
|
+
? AGENT_AUTHORED_INSTRUCTION_POLICY_CONTENT_TOO_LONG_MESSAGE
|
|
103
|
+
: AGENT_AUTHORED_PREFERENCE_CONTENT_TOO_LONG_MESSAGE;
|
|
104
|
+
return `${subject} ${input.actualChars} characters. ${limit}`;
|
|
105
|
+
}
|