lingxios 1.0.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/README.md +54 -0
- package/db/schema.sql +306 -0
- package/dist/src/app/artifacts.d.ts +8 -0
- package/dist/src/app/artifacts.js +114 -0
- package/dist/src/app/artifacts.js.map +1 -0
- package/dist/src/app/doctor.d.ts +22 -0
- package/dist/src/app/doctor.js +44 -0
- package/dist/src/app/doctor.js.map +1 -0
- package/dist/src/app/index.d.ts +123 -0
- package/dist/src/app/index.js +291 -0
- package/dist/src/app/index.js.map +1 -0
- package/dist/src/app/input.d.ts +22 -0
- package/dist/src/app/input.js +60 -0
- package/dist/src/app/input.js.map +1 -0
- package/dist/src/app/recover-wait.d.ts +5 -0
- package/dist/src/app/recover-wait.js +59 -0
- package/dist/src/app/recover-wait.js.map +1 -0
- package/dist/src/app/resources.d.ts +5 -0
- package/dist/src/app/resources.js +9 -0
- package/dist/src/app/resources.js.map +1 -0
- package/dist/src/app/storage.d.ts +2 -0
- package/dist/src/app/storage.js +41 -0
- package/dist/src/app/storage.js.map +1 -0
- package/dist/src/cli/doctor.d.ts +2 -0
- package/dist/src/cli/doctor.js +20 -0
- package/dist/src/cli/doctor.js.map +1 -0
- package/dist/src/cli/eval.d.ts +2 -0
- package/dist/src/cli/eval.js +44 -0
- package/dist/src/cli/eval.js.map +1 -0
- package/dist/src/config.d.ts +22 -0
- package/dist/src/config.js +56 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/context/attachments.d.ts +10 -0
- package/dist/src/context/attachments.js +18 -0
- package/dist/src/context/attachments.js.map +1 -0
- package/dist/src/context/document-text.d.ts +1 -0
- package/dist/src/context/document-text.js +29 -0
- package/dist/src/context/document-text.js.map +1 -0
- package/dist/src/context/document-worker.d.ts +1 -0
- package/dist/src/context/document-worker.js +62 -0
- package/dist/src/context/document-worker.js.map +1 -0
- package/dist/src/context/evidence.d.ts +19 -0
- package/dist/src/context/evidence.js +37 -0
- package/dist/src/context/evidence.js.map +1 -0
- package/dist/src/context/request.d.ts +21 -0
- package/dist/src/context/request.js +32 -0
- package/dist/src/context/request.js.map +1 -0
- package/dist/src/context/research-evidence.d.ts +4 -0
- package/dist/src/context/research-evidence.js +24 -0
- package/dist/src/context/research-evidence.js.map +1 -0
- package/dist/src/context/resource-checks.d.ts +7 -0
- package/dist/src/context/resource-checks.js +15 -0
- package/dist/src/context/resource-checks.js.map +1 -0
- package/dist/src/context/task-contract.d.ts +11 -0
- package/dist/src/context/task-contract.js +23 -0
- package/dist/src/context/task-contract.js.map +1 -0
- package/dist/src/context/text.d.ts +2 -0
- package/dist/src/context/text.js +7 -0
- package/dist/src/context/text.js.map +1 -0
- package/dist/src/control-plane/http-server.d.ts +22 -0
- package/dist/src/control-plane/http-server.js +196 -0
- package/dist/src/control-plane/http-server.js.map +1 -0
- package/dist/src/control-plane/memory-store.d.ts +71 -0
- package/dist/src/control-plane/memory-store.js +389 -0
- package/dist/src/control-plane/memory-store.js.map +1 -0
- package/dist/src/control-plane/pg-store.d.ts +62 -0
- package/dist/src/control-plane/pg-store.js +386 -0
- package/dist/src/control-plane/pg-store.js.map +1 -0
- package/dist/src/control-plane/service.d.ts +52 -0
- package/dist/src/control-plane/service.js +630 -0
- package/dist/src/control-plane/service.js.map +1 -0
- package/dist/src/control-plane/stores.d.ts +184 -0
- package/dist/src/control-plane/stores.js +19 -0
- package/dist/src/control-plane/stores.js.map +1 -0
- package/dist/src/errors.d.ts +66 -0
- package/dist/src/errors.js +102 -0
- package/dist/src/errors.js.map +1 -0
- package/dist/src/eval/calibration.d.ts +16 -0
- package/dist/src/eval/calibration.js +28 -0
- package/dist/src/eval/calibration.js.map +1 -0
- package/dist/src/eval/index.d.ts +40 -0
- package/dist/src/eval/index.js +40 -0
- package/dist/src/eval/index.js.map +1 -0
- package/dist/src/eval/review.d.ts +20 -0
- package/dist/src/eval/review.js +49 -0
- package/dist/src/eval/review.js.map +1 -0
- package/dist/src/host/http-client.d.ts +48 -0
- package/dist/src/host/http-client.js +127 -0
- package/dist/src/host/http-client.js.map +1 -0
- package/dist/src/host/port.d.ts +26 -0
- package/dist/src/host/port.js +2 -0
- package/dist/src/host/port.js.map +1 -0
- package/dist/src/index.d.ts +17 -0
- package/dist/src/index.js +9 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/integrations/lingxiloop/actions.d.ts +25 -0
- package/dist/src/integrations/lingxiloop/actions.js +77 -0
- package/dist/src/integrations/lingxiloop/actions.js.map +1 -0
- package/dist/src/integrations/lingxiloop/app.d.ts +167 -0
- package/dist/src/integrations/lingxiloop/app.js +434 -0
- package/dist/src/integrations/lingxiloop/app.js.map +1 -0
- package/dist/src/integrations/lingxiloop/approvals.d.ts +148 -0
- package/dist/src/integrations/lingxiloop/approvals.js +540 -0
- package/dist/src/integrations/lingxiloop/approvals.js.map +1 -0
- package/dist/src/integrations/lingxiloop/attachments.d.ts +8 -0
- package/dist/src/integrations/lingxiloop/attachments.js +38 -0
- package/dist/src/integrations/lingxiloop/attachments.js.map +1 -0
- package/dist/src/integrations/lingxiloop/calendar-approvals.d.ts +21 -0
- package/dist/src/integrations/lingxiloop/calendar-approvals.js +126 -0
- package/dist/src/integrations/lingxiloop/calendar-approvals.js.map +1 -0
- package/dist/src/integrations/lingxiloop/calendar-writes.d.ts +15 -0
- package/dist/src/integrations/lingxiloop/calendar-writes.js +79 -0
- package/dist/src/integrations/lingxiloop/calendar-writes.js.map +1 -0
- package/dist/src/integrations/lingxiloop/calendar.d.ts +19 -0
- package/dist/src/integrations/lingxiloop/calendar.js +43 -0
- package/dist/src/integrations/lingxiloop/calendar.js.map +1 -0
- package/dist/src/integrations/lingxiloop/canvas-events.d.ts +7 -0
- package/dist/src/integrations/lingxiloop/canvas-events.js +53 -0
- package/dist/src/integrations/lingxiloop/canvas-events.js.map +1 -0
- package/dist/src/integrations/lingxiloop/canvas-summary.d.ts +5 -0
- package/dist/src/integrations/lingxiloop/canvas-summary.js +52 -0
- package/dist/src/integrations/lingxiloop/canvas-summary.js.map +1 -0
- package/dist/src/integrations/lingxiloop/canvas-work-report.d.ts +12 -0
- package/dist/src/integrations/lingxiloop/canvas-work-report.js +120 -0
- package/dist/src/integrations/lingxiloop/canvas-work-report.js.map +1 -0
- package/dist/src/integrations/lingxiloop/canvas-work.d.ts +11 -0
- package/dist/src/integrations/lingxiloop/canvas-work.js +306 -0
- package/dist/src/integrations/lingxiloop/canvas-work.js.map +1 -0
- package/dist/src/integrations/lingxiloop/canvas.d.ts +12 -0
- package/dist/src/integrations/lingxiloop/canvas.js +79 -0
- package/dist/src/integrations/lingxiloop/canvas.js.map +1 -0
- package/dist/src/integrations/lingxiloop/chat.d.ts +11 -0
- package/dist/src/integrations/lingxiloop/chat.js +46 -0
- package/dist/src/integrations/lingxiloop/chat.js.map +1 -0
- package/dist/src/integrations/lingxiloop/document-approvals.d.ts +21 -0
- package/dist/src/integrations/lingxiloop/document-approvals.js +75 -0
- package/dist/src/integrations/lingxiloop/document-approvals.js.map +1 -0
- package/dist/src/integrations/lingxiloop/document-content.d.ts +80 -0
- package/dist/src/integrations/lingxiloop/document-content.js +195 -0
- package/dist/src/integrations/lingxiloop/document-content.js.map +1 -0
- package/dist/src/integrations/lingxiloop/document-writes.d.ts +8 -0
- package/dist/src/integrations/lingxiloop/document-writes.js +49 -0
- package/dist/src/integrations/lingxiloop/document-writes.js.map +1 -0
- package/dist/src/integrations/lingxiloop/documents.d.ts +22 -0
- package/dist/src/integrations/lingxiloop/documents.js +38 -0
- package/dist/src/integrations/lingxiloop/documents.js.map +1 -0
- package/dist/src/integrations/lingxiloop/event-outbox.d.ts +5 -0
- package/dist/src/integrations/lingxiloop/event-outbox.js +47 -0
- package/dist/src/integrations/lingxiloop/event-outbox.js.map +1 -0
- package/dist/src/integrations/lingxiloop/index.d.ts +3 -0
- package/dist/src/integrations/lingxiloop/index.js +3 -0
- package/dist/src/integrations/lingxiloop/index.js.map +1 -0
- package/dist/src/integrations/lingxiloop/learning-attempts.d.ts +13 -0
- package/dist/src/integrations/lingxiloop/learning-attempts.js +58 -0
- package/dist/src/integrations/lingxiloop/learning-attempts.js.map +1 -0
- package/dist/src/integrations/lingxiloop/learning-evaluation.d.ts +8 -0
- package/dist/src/integrations/lingxiloop/learning-evaluation.js +64 -0
- package/dist/src/integrations/lingxiloop/learning-evaluation.js.map +1 -0
- package/dist/src/integrations/lingxiloop/learning-evidence.d.ts +7 -0
- package/dist/src/integrations/lingxiloop/learning-evidence.js +88 -0
- package/dist/src/integrations/lingxiloop/learning-evidence.js.map +1 -0
- package/dist/src/integrations/lingxiloop/learning-missions.d.ts +18 -0
- package/dist/src/integrations/lingxiloop/learning-missions.js +95 -0
- package/dist/src/integrations/lingxiloop/learning-missions.js.map +1 -0
- package/dist/src/integrations/lingxiloop/learning.d.ts +22 -0
- package/dist/src/integrations/lingxiloop/learning.js +150 -0
- package/dist/src/integrations/lingxiloop/learning.js.map +1 -0
- package/dist/src/integrations/lingxiloop/memory.d.ts +14 -0
- package/dist/src/integrations/lingxiloop/memory.js +133 -0
- package/dist/src/integrations/lingxiloop/memory.js.map +1 -0
- package/dist/src/integrations/lingxiloop/polls.d.ts +9 -0
- package/dist/src/integrations/lingxiloop/polls.js +47 -0
- package/dist/src/integrations/lingxiloop/polls.js.map +1 -0
- package/dist/src/integrations/lingxiloop/presentations.d.ts +11 -0
- package/dist/src/integrations/lingxiloop/presentations.js +34 -0
- package/dist/src/integrations/lingxiloop/presentations.js.map +1 -0
- package/dist/src/integrations/lingxiloop/questionnaire.d.ts +21 -0
- package/dist/src/integrations/lingxiloop/questionnaire.js +57 -0
- package/dist/src/integrations/lingxiloop/questionnaire.js.map +1 -0
- package/dist/src/integrations/lingxiloop/research.d.ts +19 -0
- package/dist/src/integrations/lingxiloop/research.js +20 -0
- package/dist/src/integrations/lingxiloop/research.js.map +1 -0
- package/dist/src/integrations/lingxiloop/routines.d.ts +91 -0
- package/dist/src/integrations/lingxiloop/routines.js +198 -0
- package/dist/src/integrations/lingxiloop/routines.js.map +1 -0
- package/dist/src/integrations/lingxiloop/service-contracts.d.ts +1045 -0
- package/dist/src/integrations/lingxiloop/service-contracts.js +2 -0
- package/dist/src/integrations/lingxiloop/service-contracts.js.map +1 -0
- package/dist/src/integrations/lingxiloop/teacher-context.d.ts +32 -0
- package/dist/src/integrations/lingxiloop/teacher-context.js +25 -0
- package/dist/src/integrations/lingxiloop/teacher-context.js.map +1 -0
- package/dist/src/integrations/lingxiloop/teacher-digest.d.ts +13 -0
- package/dist/src/integrations/lingxiloop/teacher-digest.js +152 -0
- package/dist/src/integrations/lingxiloop/teacher-digest.js.map +1 -0
- package/dist/src/integrations/lingxiloop/teacher-preview.d.ts +22 -0
- package/dist/src/integrations/lingxiloop/teacher-preview.js +41 -0
- package/dist/src/integrations/lingxiloop/teacher-preview.js.map +1 -0
- package/dist/src/integrations/lingxiloop/teacher.d.ts +24 -0
- package/dist/src/integrations/lingxiloop/teacher.js +224 -0
- package/dist/src/integrations/lingxiloop/teacher.js.map +1 -0
- package/dist/src/kernel/manager.d.ts +52 -0
- package/dist/src/kernel/manager.js +407 -0
- package/dist/src/kernel/manager.js.map +1 -0
- package/dist/src/logging.d.ts +21 -0
- package/dist/src/logging.js +54 -0
- package/dist/src/logging.js.map +1 -0
- package/dist/src/memory/evidence.d.ts +6 -0
- package/dist/src/memory/evidence.js +43 -0
- package/dist/src/memory/evidence.js.map +1 -0
- package/dist/src/memory/processor.d.ts +3 -0
- package/dist/src/memory/processor.js +66 -0
- package/dist/src/memory/processor.js.map +1 -0
- package/dist/src/memory/semantic.d.ts +19 -0
- package/dist/src/memory/semantic.js +93 -0
- package/dist/src/memory/semantic.js.map +1 -0
- package/dist/src/memory/store.d.ts +20 -0
- package/dist/src/memory/store.js +34 -0
- package/dist/src/memory/store.js.map +1 -0
- package/dist/src/memory/synthesis.d.ts +24 -0
- package/dist/src/memory/synthesis.js +138 -0
- package/dist/src/memory/synthesis.js.map +1 -0
- package/dist/src/metrics.d.ts +43 -0
- package/dist/src/metrics.js +130 -0
- package/dist/src/metrics.js.map +1 -0
- package/dist/src/model/driver.d.ts +60 -0
- package/dist/src/model/driver.js +2 -0
- package/dist/src/model/driver.js.map +1 -0
- package/dist/src/model/embeddings.d.ts +24 -0
- package/dist/src/model/embeddings.js +97 -0
- package/dist/src/model/embeddings.js.map +1 -0
- package/dist/src/model/openai.d.ts +45 -0
- package/dist/src/model/openai.js +340 -0
- package/dist/src/model/openai.js.map +1 -0
- package/dist/src/outcome/assessment.d.ts +16 -0
- package/dist/src/outcome/assessment.js +45 -0
- package/dist/src/outcome/assessment.js.map +1 -0
- package/dist/src/outcome/content-check.d.ts +19 -0
- package/dist/src/outcome/content-check.js +44 -0
- package/dist/src/outcome/content-check.js.map +1 -0
- package/dist/src/outcome/envelope.d.ts +34 -0
- package/dist/src/outcome/envelope.js +42 -0
- package/dist/src/outcome/envelope.js.map +1 -0
- package/dist/src/protocol/constants.d.ts +25 -0
- package/dist/src/protocol/constants.js +26 -0
- package/dist/src/protocol/constants.js.map +1 -0
- package/dist/src/protocol/kernel-wire.d.ts +74 -0
- package/dist/src/protocol/kernel-wire.js +2 -0
- package/dist/src/protocol/kernel-wire.js.map +1 -0
- package/dist/src/protocol/outcome.d.ts +16 -0
- package/dist/src/protocol/outcome.js +14 -0
- package/dist/src/protocol/outcome.js.map +1 -0
- package/dist/src/protocol/types.d.ts +266 -0
- package/dist/src/protocol/types.js +19 -0
- package/dist/src/protocol/types.js.map +1 -0
- package/dist/src/research/address.d.ts +2 -0
- package/dist/src/research/address.js +32 -0
- package/dist/src/research/address.js.map +1 -0
- package/dist/src/research/fetch.d.ts +7 -0
- package/dist/src/research/fetch.js +83 -0
- package/dist/src/research/fetch.js.map +1 -0
- package/dist/src/research/index.d.ts +26 -0
- package/dist/src/research/index.js +109 -0
- package/dist/src/research/index.js.map +1 -0
- package/dist/src/runtime/compaction.d.ts +41 -0
- package/dist/src/runtime/compaction.js +86 -0
- package/dist/src/runtime/compaction.js.map +1 -0
- package/dist/src/runtime/corrections.d.ts +20 -0
- package/dist/src/runtime/corrections.js +27 -0
- package/dist/src/runtime/corrections.js.map +1 -0
- package/dist/src/runtime/policy.d.ts +42 -0
- package/dist/src/runtime/policy.js +91 -0
- package/dist/src/runtime/policy.js.map +1 -0
- package/dist/src/runtime/resource-refresh.d.ts +8 -0
- package/dist/src/runtime/resource-refresh.js +37 -0
- package/dist/src/runtime/resource-refresh.js.map +1 -0
- package/dist/src/runtime/runtime.d.ts +51 -0
- package/dist/src/runtime/runtime.js +804 -0
- package/dist/src/runtime/runtime.js.map +1 -0
- package/dist/src/runtime/tool.d.ts +13 -0
- package/dist/src/runtime/tool.js +42 -0
- package/dist/src/runtime/tool.js.map +1 -0
- package/dist/src/ui/index.d.ts +27 -0
- package/dist/src/ui/index.js +54 -0
- package/dist/src/ui/index.js.map +1 -0
- package/dist/src/versions.d.ts +9 -0
- package/dist/src/versions.js +11 -0
- package/dist/src/versions.js.map +1 -0
- package/dist/src/worker/index.d.ts +3 -0
- package/dist/src/worker/index.js +57 -0
- package/dist/src/worker/index.js.map +1 -0
- package/dist/src/worker/main.d.ts +2 -0
- package/dist/src/worker/main.js +9 -0
- package/dist/src/worker/main.js.map +1 -0
- package/dist/src/worker/worker.d.ts +45 -0
- package/dist/src/worker/worker.js +154 -0
- package/dist/src/worker/worker.js.map +1 -0
- package/kernel/runner.py +507 -0
- package/package.json +83 -0
|
@@ -0,0 +1,1045 @@
|
|
|
1
|
+
import type { SqlQueryable } from '../../control-plane/pg-store.js';
|
|
2
|
+
/** Native domain callbacks declare pg's complete result shape; the injected resource is pg-compatible. */
|
|
3
|
+
export interface NativeQueryable {
|
|
4
|
+
query<T extends Record<string, unknown> = Record<string, unknown>>(text: string, params?: readonly unknown[]): Promise<{
|
|
5
|
+
rows: T[];
|
|
6
|
+
rowCount: number | null;
|
|
7
|
+
command: string;
|
|
8
|
+
oid: number;
|
|
9
|
+
fields: {
|
|
10
|
+
name: string;
|
|
11
|
+
tableID: number;
|
|
12
|
+
columnID: number;
|
|
13
|
+
dataTypeID: number;
|
|
14
|
+
dataTypeSize: number;
|
|
15
|
+
dataTypeModifier: number;
|
|
16
|
+
format: string;
|
|
17
|
+
}[];
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
type NativeTransaction = <T>(work: (db: NativeQueryable) => Promise<T>) => Promise<T>;
|
|
21
|
+
export interface NativeCanvasAssignmentRow {
|
|
22
|
+
id: string;
|
|
23
|
+
canvas_id: string;
|
|
24
|
+
agent_id: string;
|
|
25
|
+
assignment: string;
|
|
26
|
+
color: string;
|
|
27
|
+
status: 'queued' | 'blocked' | 'working' | 'waiting' | 'completed' | 'failed' | 'cancelled';
|
|
28
|
+
work_x: number | string;
|
|
29
|
+
work_y: number | string;
|
|
30
|
+
work_width: number | string;
|
|
31
|
+
work_height: number | string;
|
|
32
|
+
active_frame_id: string | null;
|
|
33
|
+
cursor_x: number | string | null;
|
|
34
|
+
cursor_y: number | string | null;
|
|
35
|
+
work_id: string | null;
|
|
36
|
+
result: string | null;
|
|
37
|
+
error: string | null;
|
|
38
|
+
started_at: string | null;
|
|
39
|
+
completed_at: string | null;
|
|
40
|
+
updated_at: string;
|
|
41
|
+
execution_role: 'specialist' | 'verifier';
|
|
42
|
+
verifies_assignment_id: string | null;
|
|
43
|
+
progress_fingerprint: string | null;
|
|
44
|
+
no_progress_count: number | string | null;
|
|
45
|
+
}
|
|
46
|
+
export interface NativeCanvasChanged {
|
|
47
|
+
type: 'canvas.changed';
|
|
48
|
+
kind: 'assignment.updated' | 'workspace.updated' | 'activity.created';
|
|
49
|
+
companyId: string;
|
|
50
|
+
canvasId: string;
|
|
51
|
+
workspaceId: string;
|
|
52
|
+
conversationId: string;
|
|
53
|
+
timestamp: string;
|
|
54
|
+
assignment?: unknown;
|
|
55
|
+
workspace?: unknown;
|
|
56
|
+
activity?: unknown;
|
|
57
|
+
}
|
|
58
|
+
type NativeProjectStatus = 'CREATED' | 'DRAFT' | 'ACTIVE' | 'COURSE_ENDED' | 'READ_ONLY' | 'TRANSFER_PENDING' | 'RETENTION' | 'ARCHIVED' | 'DELETED';
|
|
59
|
+
interface NativeLifecycleInfrastructure {
|
|
60
|
+
transaction: NativeTransaction;
|
|
61
|
+
auditInTransaction(db: NativeQueryable, input: {
|
|
62
|
+
kind: string;
|
|
63
|
+
userId?: string;
|
|
64
|
+
companyId: string;
|
|
65
|
+
detail: Record<string, unknown>;
|
|
66
|
+
}): Promise<void>;
|
|
67
|
+
projectLifecycleProjection(db: NativeQueryable, input: {
|
|
68
|
+
companyId: string;
|
|
69
|
+
projectId: string;
|
|
70
|
+
status: NativeProjectStatus;
|
|
71
|
+
}): Promise<void>;
|
|
72
|
+
}
|
|
73
|
+
interface TeacherReportingScope {
|
|
74
|
+
companyId: string;
|
|
75
|
+
projectId: string;
|
|
76
|
+
courseId: string;
|
|
77
|
+
teacherUserId?: string;
|
|
78
|
+
}
|
|
79
|
+
/** Structural signatures of existing LingxiLoop exports, reference 020b9295. */
|
|
80
|
+
export interface NativeWork {
|
|
81
|
+
id: string;
|
|
82
|
+
fence: number;
|
|
83
|
+
homeEpoch?: number;
|
|
84
|
+
companyId: string;
|
|
85
|
+
authorizationUserId?: string;
|
|
86
|
+
agentId: string;
|
|
87
|
+
channelId: string;
|
|
88
|
+
threadRootClientMsgNo?: string;
|
|
89
|
+
triggerClientMsgNo: string;
|
|
90
|
+
reason: 'message' | 'resume' | 'routine' | 'handoff';
|
|
91
|
+
executionRole: 'coordinator' | 'specialist' | 'verifier' | 'reporter';
|
|
92
|
+
lane: 'learner' | 'approval' | 'collaboration' | 'background';
|
|
93
|
+
leaseToken: string;
|
|
94
|
+
}
|
|
95
|
+
export interface KnowledgeServices {
|
|
96
|
+
listKnowledgeSourcesForAgent(work: NativeWork): Promise<unknown[]>;
|
|
97
|
+
addKnowledgeText(work: NativeWork, input: {
|
|
98
|
+
title: string;
|
|
99
|
+
text: string;
|
|
100
|
+
idempotencyKey: string;
|
|
101
|
+
}): Promise<{
|
|
102
|
+
id: string;
|
|
103
|
+
status: string;
|
|
104
|
+
}>;
|
|
105
|
+
addKnowledgeUrl(work: NativeWork, input: {
|
|
106
|
+
title: string;
|
|
107
|
+
url: string;
|
|
108
|
+
idempotencyKey: string;
|
|
109
|
+
}): Promise<{
|
|
110
|
+
id: string;
|
|
111
|
+
status: string;
|
|
112
|
+
}>;
|
|
113
|
+
addKnowledgeFile(work: NativeWork, input: {
|
|
114
|
+
title: string;
|
|
115
|
+
storageKey: string;
|
|
116
|
+
mime: string;
|
|
117
|
+
size: number;
|
|
118
|
+
idempotencyKey: string;
|
|
119
|
+
}): Promise<{
|
|
120
|
+
id: string;
|
|
121
|
+
status: string;
|
|
122
|
+
}>;
|
|
123
|
+
retryKnowledgeSourceForAgent(work: NativeWork, sourceId: string): Promise<{
|
|
124
|
+
status: string;
|
|
125
|
+
}>;
|
|
126
|
+
setKnowledgeSourceEnabled(work: NativeWork, sourceId: string, enabled: boolean): Promise<{
|
|
127
|
+
enabled: boolean;
|
|
128
|
+
}>;
|
|
129
|
+
deleteKnowledgeSourceForAgent(work: NativeWork, sourceId: string): Promise<{
|
|
130
|
+
deleted: boolean;
|
|
131
|
+
}>;
|
|
132
|
+
}
|
|
133
|
+
export interface NativeMessage {
|
|
134
|
+
clientMsgNo: string;
|
|
135
|
+
messageSeq: number;
|
|
136
|
+
channelId: string;
|
|
137
|
+
channelType: number;
|
|
138
|
+
fromUid: string;
|
|
139
|
+
payload: {
|
|
140
|
+
version: 1;
|
|
141
|
+
kind: string;
|
|
142
|
+
body?: string;
|
|
143
|
+
replyToClientMsgNo?: string;
|
|
144
|
+
refs?: {
|
|
145
|
+
agentId?: unknown;
|
|
146
|
+
};
|
|
147
|
+
data?: Record<string, unknown>;
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
export interface NativeTextMessage {
|
|
151
|
+
version: 1;
|
|
152
|
+
kind: 'text';
|
|
153
|
+
clientMsgNo: string;
|
|
154
|
+
body: string;
|
|
155
|
+
replyToClientMsgNo?: string;
|
|
156
|
+
refs: Record<string, string | string[]>;
|
|
157
|
+
data?: Record<string, unknown>;
|
|
158
|
+
}
|
|
159
|
+
export interface NativeDocument {
|
|
160
|
+
id: string;
|
|
161
|
+
title: string;
|
|
162
|
+
createdBy: string;
|
|
163
|
+
conversationId: string | null;
|
|
164
|
+
createdAt: string;
|
|
165
|
+
updatedAt: string;
|
|
166
|
+
}
|
|
167
|
+
export type NativeDocumentEdit = {
|
|
168
|
+
kind: 'append';
|
|
169
|
+
text: string;
|
|
170
|
+
} | {
|
|
171
|
+
kind: 'replace';
|
|
172
|
+
find: string;
|
|
173
|
+
replace: string;
|
|
174
|
+
} | {
|
|
175
|
+
kind: 'insertParagraph';
|
|
176
|
+
at: 'start' | 'end';
|
|
177
|
+
text: string;
|
|
178
|
+
} | {
|
|
179
|
+
kind: 'replaceBlock';
|
|
180
|
+
anchorText: string;
|
|
181
|
+
text: string;
|
|
182
|
+
} | {
|
|
183
|
+
kind: 'image';
|
|
184
|
+
src: string;
|
|
185
|
+
alt: string | null;
|
|
186
|
+
placement: {
|
|
187
|
+
mode: 'start' | 'end';
|
|
188
|
+
} | {
|
|
189
|
+
mode: 'replace' | 'after' | 'before';
|
|
190
|
+
anchorText: string;
|
|
191
|
+
};
|
|
192
|
+
} | {
|
|
193
|
+
kind: 'imageDelete';
|
|
194
|
+
match: {
|
|
195
|
+
by: 'src';
|
|
196
|
+
src: string;
|
|
197
|
+
} | {
|
|
198
|
+
by: 'src-contains';
|
|
199
|
+
substring: string;
|
|
200
|
+
} | {
|
|
201
|
+
by: 'alt';
|
|
202
|
+
alt: string;
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
export interface NativeDocumentEditResult {
|
|
206
|
+
replaced: number;
|
|
207
|
+
imagePlaced: 'absolute' | 'anchor' | 'anchor-missed' | null;
|
|
208
|
+
imagesDeleted: number;
|
|
209
|
+
blocksReplaced: number;
|
|
210
|
+
}
|
|
211
|
+
export interface NativeDocumentChanged {
|
|
212
|
+
type: 'doc.changed';
|
|
213
|
+
kind: 'document.created' | 'document.updated' | 'document.deleted';
|
|
214
|
+
companyId: string;
|
|
215
|
+
workspaceId: string;
|
|
216
|
+
documentId: string;
|
|
217
|
+
actorId: string;
|
|
218
|
+
}
|
|
219
|
+
export interface NativeDocumentUpdate {
|
|
220
|
+
type: 'doc.update';
|
|
221
|
+
companyId: string;
|
|
222
|
+
documentId: string;
|
|
223
|
+
updateB64: string;
|
|
224
|
+
originId: string;
|
|
225
|
+
authorId: string;
|
|
226
|
+
}
|
|
227
|
+
type DocumentScope = {
|
|
228
|
+
companyId: string;
|
|
229
|
+
projectId: string;
|
|
230
|
+
userId: string;
|
|
231
|
+
};
|
|
232
|
+
interface NativeDocumentEditor {
|
|
233
|
+
readText(documentId: string, companyId: string): Promise<string>;
|
|
234
|
+
applyEdit(documentId: string, companyId: string, agentId: string, operations: NativeDocumentEdit[]): Promise<NativeDocumentEditResult>;
|
|
235
|
+
}
|
|
236
|
+
export interface NativeDocumentContent {
|
|
237
|
+
DocumentsApplication: new (db: NativeQueryable, events: {
|
|
238
|
+
publish(event: NativeDocumentChanged): Promise<void>;
|
|
239
|
+
}, editor: NativeDocumentEditor) => {
|
|
240
|
+
createForAgent(scope: DocumentScope, input: {
|
|
241
|
+
id?: string;
|
|
242
|
+
title: string;
|
|
243
|
+
body: string;
|
|
244
|
+
}): Promise<{
|
|
245
|
+
document: NativeDocument;
|
|
246
|
+
replayed: boolean;
|
|
247
|
+
}>;
|
|
248
|
+
readForAgent(scope: DocumentScope, documentId: string): Promise<NativeDocument & {
|
|
249
|
+
body: string;
|
|
250
|
+
}>;
|
|
251
|
+
editForAgent(scope: DocumentScope, documentId: string, operations: NativeDocumentEdit[]): Promise<NativeDocumentEditResult>;
|
|
252
|
+
deleteForAgent(scope: DocumentScope, documentId: string): Promise<{
|
|
253
|
+
ok: true;
|
|
254
|
+
}>;
|
|
255
|
+
};
|
|
256
|
+
createDocumentCollaborationApplication(dependencies: {
|
|
257
|
+
transaction: NativeTransaction;
|
|
258
|
+
instanceId: string;
|
|
259
|
+
bus: {
|
|
260
|
+
publish(event: NativeDocumentUpdate | {
|
|
261
|
+
type: 'doc.awareness';
|
|
262
|
+
companyId: string;
|
|
263
|
+
documentId: string;
|
|
264
|
+
updateB64: string;
|
|
265
|
+
originId: string;
|
|
266
|
+
}): Promise<void>;
|
|
267
|
+
subscribe(listener: (event: unknown) => void): Promise<void>;
|
|
268
|
+
};
|
|
269
|
+
imageStorage: {
|
|
270
|
+
normalizeKey(value: string | null | undefined): string | null;
|
|
271
|
+
keyFromPublicUrl(value: string | null | undefined): string | null;
|
|
272
|
+
signedUrlExpiresSoon(url: string, withinSeconds?: number): boolean;
|
|
273
|
+
publicUrl(key: string): Promise<string>;
|
|
274
|
+
};
|
|
275
|
+
}): {
|
|
276
|
+
readDocumentText: NativeDocumentEditor['readText'];
|
|
277
|
+
applyAgentEdit: NativeDocumentEditor['applyEdit'];
|
|
278
|
+
};
|
|
279
|
+
normalizeStorageKey(value: string): string | null;
|
|
280
|
+
storageKeyFromPublicUrl(value: string): string | null;
|
|
281
|
+
signedUrlExpiresSoon(url: string, withinSeconds?: number): boolean;
|
|
282
|
+
storage: {
|
|
283
|
+
publicUrl(key: string): Promise<string>;
|
|
284
|
+
};
|
|
285
|
+
CH_DOC_UPDATE: string;
|
|
286
|
+
publish(channel: string, event: NativeDocumentUpdate): Promise<void>;
|
|
287
|
+
}
|
|
288
|
+
export interface NativeCalendarPatch {
|
|
289
|
+
title?: string;
|
|
290
|
+
kind?: 'personal' | 'agent_task';
|
|
291
|
+
description?: string | null;
|
|
292
|
+
assigneeId?: string | null;
|
|
293
|
+
targetConversationId?: string | null;
|
|
294
|
+
agentPrompt?: string | null;
|
|
295
|
+
startAt?: Date;
|
|
296
|
+
endAt?: Date | null;
|
|
297
|
+
allDay?: boolean;
|
|
298
|
+
recurrence?: {
|
|
299
|
+
freq: 'daily' | 'weekly' | 'monthly' | 'yearly';
|
|
300
|
+
interval: number;
|
|
301
|
+
byweekday?: number[];
|
|
302
|
+
until?: string | null;
|
|
303
|
+
count?: number | null;
|
|
304
|
+
} | null;
|
|
305
|
+
status?: 'active' | 'paused' | 'done' | 'cancelled';
|
|
306
|
+
reminderMinutesBefore?: number | null;
|
|
307
|
+
reminderChannel?: 'toast' | 'email' | 'both' | null;
|
|
308
|
+
isPrivate?: boolean;
|
|
309
|
+
}
|
|
310
|
+
export interface NativeCalendarChanged {
|
|
311
|
+
type: 'calendar.changed';
|
|
312
|
+
kind: 'event.created' | 'event.updated' | 'event.deleted' | 'event.dispatched';
|
|
313
|
+
eventId: string;
|
|
314
|
+
companyId: string;
|
|
315
|
+
workspaceId: string;
|
|
316
|
+
actorId: string | null;
|
|
317
|
+
}
|
|
318
|
+
export type NativeCalendarCreate = NativeCalendarPatch & {
|
|
319
|
+
title: string;
|
|
320
|
+
kind: 'personal' | 'agent_task';
|
|
321
|
+
startAt: Date;
|
|
322
|
+
allDay: boolean;
|
|
323
|
+
status: 'active' | 'paused' | 'done' | 'cancelled';
|
|
324
|
+
isPrivate: boolean;
|
|
325
|
+
};
|
|
326
|
+
export interface LingxiLoopServices {
|
|
327
|
+
calendar?: {
|
|
328
|
+
calendarApplication: {
|
|
329
|
+
list(scope: {
|
|
330
|
+
companyId: string;
|
|
331
|
+
projectId: string;
|
|
332
|
+
userId: string;
|
|
333
|
+
}, range: {
|
|
334
|
+
from?: Date;
|
|
335
|
+
to?: Date;
|
|
336
|
+
}): Promise<{
|
|
337
|
+
id: string;
|
|
338
|
+
title: string;
|
|
339
|
+
startAt: string;
|
|
340
|
+
}[]>;
|
|
341
|
+
get(scope: {
|
|
342
|
+
companyId: string;
|
|
343
|
+
projectId: string;
|
|
344
|
+
userId: string;
|
|
345
|
+
}, eventId: string): Promise<{
|
|
346
|
+
id: string;
|
|
347
|
+
title: string;
|
|
348
|
+
startAt: string;
|
|
349
|
+
}>;
|
|
350
|
+
};
|
|
351
|
+
listCalendarEventsQuerySchema: {
|
|
352
|
+
parse(value: unknown): {
|
|
353
|
+
from?: Date;
|
|
354
|
+
to?: Date;
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
writes?: {
|
|
358
|
+
CalendarApplication: new (db: NativeQueryable, events: {
|
|
359
|
+
publish(event: NativeCalendarChanged): Promise<void>;
|
|
360
|
+
}, dispatcher: {
|
|
361
|
+
dispatch(): Promise<never>;
|
|
362
|
+
}) => {
|
|
363
|
+
get(scope: {
|
|
364
|
+
companyId: string;
|
|
365
|
+
projectId: string;
|
|
366
|
+
userId: string;
|
|
367
|
+
}, eventId: string): Promise<{
|
|
368
|
+
id: string;
|
|
369
|
+
title: string;
|
|
370
|
+
startAt: string;
|
|
371
|
+
}>;
|
|
372
|
+
update(scope: {
|
|
373
|
+
companyId: string;
|
|
374
|
+
projectId: string;
|
|
375
|
+
userId: string;
|
|
376
|
+
}, eventId: string, patch: NativeCalendarPatch): Promise<{
|
|
377
|
+
id: string;
|
|
378
|
+
title: string;
|
|
379
|
+
startAt: string;
|
|
380
|
+
}>;
|
|
381
|
+
create(scope: {
|
|
382
|
+
companyId: string;
|
|
383
|
+
projectId: string;
|
|
384
|
+
userId: string;
|
|
385
|
+
}, input: NativeCalendarCreate, options?: {
|
|
386
|
+
eventId?: string;
|
|
387
|
+
replayExisting?: boolean;
|
|
388
|
+
}): Promise<{
|
|
389
|
+
id: string;
|
|
390
|
+
title: string;
|
|
391
|
+
startAt: string;
|
|
392
|
+
}>;
|
|
393
|
+
delete(scope: {
|
|
394
|
+
companyId: string;
|
|
395
|
+
projectId: string;
|
|
396
|
+
userId: string;
|
|
397
|
+
}, eventId: string): Promise<{
|
|
398
|
+
ok: true;
|
|
399
|
+
}>;
|
|
400
|
+
};
|
|
401
|
+
updateCalendarEventRequestSchema: {
|
|
402
|
+
parse(value: unknown): NativeCalendarPatch;
|
|
403
|
+
};
|
|
404
|
+
createCalendarEventRequestSchema: {
|
|
405
|
+
parse(value: unknown): NativeCalendarCreate;
|
|
406
|
+
};
|
|
407
|
+
createPermissionService(db: SqlQueryable, options?: {
|
|
408
|
+
lockDependencies?: boolean;
|
|
409
|
+
}): LingxiLoopServices['permissionService'];
|
|
410
|
+
CH_CALENDAR_EVENTS: string;
|
|
411
|
+
publish(channel: string, event: NativeCalendarChanged): Promise<void>;
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
documents?: {
|
|
415
|
+
listAgentDocuments(scope: {
|
|
416
|
+
companyId: string;
|
|
417
|
+
projectId: string;
|
|
418
|
+
}): Promise<NativeDocument[]>;
|
|
419
|
+
readAgentDocument(scope: {
|
|
420
|
+
companyId: string;
|
|
421
|
+
projectId: string;
|
|
422
|
+
userId: string;
|
|
423
|
+
}, documentId: string): Promise<NativeDocument & {
|
|
424
|
+
body: string;
|
|
425
|
+
}>;
|
|
426
|
+
writes?: {
|
|
427
|
+
content?: NativeDocumentContent;
|
|
428
|
+
createPermissionService(db: SqlQueryable, options?: {
|
|
429
|
+
lockDependencies?: boolean;
|
|
430
|
+
}): LingxiLoopServices['permissionService'];
|
|
431
|
+
renameDocument(db: SqlQueryable, companyId: string, projectId: string, documentId: string, title: string): Promise<boolean>;
|
|
432
|
+
renameDocumentRequestSchema: {
|
|
433
|
+
parse(input: unknown): {
|
|
434
|
+
title: string;
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
CH_DOCS: string;
|
|
438
|
+
publish(channel: string, event: NativeDocumentChanged): Promise<void>;
|
|
439
|
+
};
|
|
440
|
+
};
|
|
441
|
+
teacher?: {
|
|
442
|
+
requireLearningCourseRole(db: import('../../control-plane/pg-store.js').SqlQueryable, input: {
|
|
443
|
+
companyId: string;
|
|
444
|
+
courseId: string;
|
|
445
|
+
userId: string;
|
|
446
|
+
role: 'teacher';
|
|
447
|
+
}): Promise<void>;
|
|
448
|
+
setLearningCourseMembershipRecord?(db: import('../../control-plane/pg-store.js').SqlQueryable, input: {
|
|
449
|
+
companyId: string;
|
|
450
|
+
courseId: string;
|
|
451
|
+
userId: string;
|
|
452
|
+
role: 'teacher';
|
|
453
|
+
enabled: boolean;
|
|
454
|
+
}): Promise<string>;
|
|
455
|
+
enqueueLearningEffect?(db: import('../../control-plane/pg-store.js').SqlQueryable, input: {
|
|
456
|
+
companyId: string;
|
|
457
|
+
courseId: string;
|
|
458
|
+
kind: 'teacher_room.sync';
|
|
459
|
+
}): Promise<void>;
|
|
460
|
+
setLearningObjectiveStatus(db: SqlQueryable, input: {
|
|
461
|
+
companyId: string;
|
|
462
|
+
courseId: string;
|
|
463
|
+
objectiveId: string;
|
|
464
|
+
teacherId: string;
|
|
465
|
+
status: 'PUBLISHED' | 'ARCHIVED';
|
|
466
|
+
}): Promise<void>;
|
|
467
|
+
publishLearningActivity(transaction: NativeTransaction, input: {
|
|
468
|
+
companyId: string;
|
|
469
|
+
courseId: string;
|
|
470
|
+
activityId: string;
|
|
471
|
+
teacherId: string;
|
|
472
|
+
}): Promise<void>;
|
|
473
|
+
closeLearningActivity(db: SqlQueryable, input: {
|
|
474
|
+
companyId: string;
|
|
475
|
+
courseId: string;
|
|
476
|
+
activityId: string;
|
|
477
|
+
teacherId: string;
|
|
478
|
+
}): Promise<void>;
|
|
479
|
+
reviewLearningEvaluation(db: SqlQueryable, transaction: NativeTransaction, metric: (name: 'learning.state.changed' | 'learning.evaluation.proposed', labels?: Record<string, string>) => void, input: {
|
|
480
|
+
companyId: string;
|
|
481
|
+
courseId: string;
|
|
482
|
+
evaluationId: string;
|
|
483
|
+
teacherId: string;
|
|
484
|
+
decision: 'accept' | 'reject';
|
|
485
|
+
reason: string;
|
|
486
|
+
}): Promise<void>;
|
|
487
|
+
inc(name: 'learning.state.changed' | 'learning.evaluation.proposed' | 'learning.teacher_agent.summary_generated' | 'learning.teacher_agent.learner_drilldown' | 'learning.teacher_agent.evidence_accessed' | 'learning.teacher_agent.digest_configured', labels?: Record<string, string>): void;
|
|
488
|
+
projectLifecycleProjection(db: SqlQueryable, input: {
|
|
489
|
+
companyId: string;
|
|
490
|
+
projectId: string;
|
|
491
|
+
status: NativeProjectStatus;
|
|
492
|
+
}): Promise<void>;
|
|
493
|
+
ProjectLifecycleApplication: new (infrastructure: NativeLifecycleInfrastructure) => {
|
|
494
|
+
executeInTransaction(db: SqlQueryable, input: {
|
|
495
|
+
actorUserId: string;
|
|
496
|
+
companyId: string;
|
|
497
|
+
projectId: string;
|
|
498
|
+
command: 'END' | 'ENTER_READ_ONLY' | 'ARCHIVE';
|
|
499
|
+
}): Promise<{
|
|
500
|
+
ok: true;
|
|
501
|
+
status: string;
|
|
502
|
+
applied: boolean;
|
|
503
|
+
}>;
|
|
504
|
+
};
|
|
505
|
+
createLearningObjectives(db: SqlQueryable, transaction: NativeTransaction, input: {
|
|
506
|
+
companyId: string;
|
|
507
|
+
courseId: string;
|
|
508
|
+
actorId: string;
|
|
509
|
+
actorKind: 'teacher';
|
|
510
|
+
objectives: {
|
|
511
|
+
title: string;
|
|
512
|
+
successCriteria: string;
|
|
513
|
+
targetLevel: number;
|
|
514
|
+
prerequisiteIds: string[];
|
|
515
|
+
}[];
|
|
516
|
+
}): Promise<unknown>;
|
|
517
|
+
createLearningActivity(db: SqlQueryable, transaction: NativeTransaction, input: {
|
|
518
|
+
companyId: string;
|
|
519
|
+
courseId: string;
|
|
520
|
+
actorId: string;
|
|
521
|
+
actorKind: 'teacher';
|
|
522
|
+
title: string;
|
|
523
|
+
instructions: string;
|
|
524
|
+
type: 'LESSON' | 'PRACTICE' | 'ASSESSMENT' | 'PROJECT' | 'REVIEW';
|
|
525
|
+
evaluationMode: 'AGENT_FORMATIVE' | 'TEACHER_REQUIRED';
|
|
526
|
+
targetLevel: number;
|
|
527
|
+
rubric: unknown[];
|
|
528
|
+
objectiveIds: string[];
|
|
529
|
+
dueAt?: string;
|
|
530
|
+
}): Promise<unknown>;
|
|
531
|
+
updateTeacherCourseMetadata(db: SqlQueryable, input: {
|
|
532
|
+
companyId: string;
|
|
533
|
+
courseId: string;
|
|
534
|
+
title?: string;
|
|
535
|
+
description?: string;
|
|
536
|
+
}): Promise<unknown>;
|
|
537
|
+
setLearningCourseMembership(db: SqlQueryable, transaction: NativeTransaction, input: {
|
|
538
|
+
companyId: string;
|
|
539
|
+
courseId: string;
|
|
540
|
+
managerId: string;
|
|
541
|
+
userId: string;
|
|
542
|
+
role: 'learner';
|
|
543
|
+
enabled: boolean;
|
|
544
|
+
}): Promise<void>;
|
|
545
|
+
bindLearningCourseRoom(db: SqlQueryable, input: {
|
|
546
|
+
companyId: string;
|
|
547
|
+
courseId: string;
|
|
548
|
+
managerId: string;
|
|
549
|
+
conversationId: string;
|
|
550
|
+
enabled: boolean;
|
|
551
|
+
purpose?: 'lab' | 'discussion';
|
|
552
|
+
}): Promise<void>;
|
|
553
|
+
findTeacherObjectiveApprovalTarget(db: SqlQueryable, companyId: string, courseId: string, id: string): Promise<{
|
|
554
|
+
status: string;
|
|
555
|
+
updatedAt: unknown;
|
|
556
|
+
label: string | null;
|
|
557
|
+
} | undefined>;
|
|
558
|
+
findTeacherActivityApprovalTarget(db: SqlQueryable, companyId: string, courseId: string, id: string): Promise<{
|
|
559
|
+
status: string;
|
|
560
|
+
updatedAt: unknown;
|
|
561
|
+
label: string | null;
|
|
562
|
+
} | undefined>;
|
|
563
|
+
findTeacherCourseApprovalTarget(db: SqlQueryable, companyId: string, courseId: string): Promise<{
|
|
564
|
+
status: string;
|
|
565
|
+
updatedAt: unknown;
|
|
566
|
+
label: string | null;
|
|
567
|
+
} | undefined>;
|
|
568
|
+
findTeacherMembershipApprovalTarget(db: SqlQueryable, companyId: string, courseId: string, id: string): Promise<{
|
|
569
|
+
enabled: boolean;
|
|
570
|
+
label: string | null;
|
|
571
|
+
}>;
|
|
572
|
+
findTeacherEvaluationApprovalTarget(db: SqlQueryable, companyId: string, courseId: string, id: string): Promise<{
|
|
573
|
+
status: string;
|
|
574
|
+
label: string | null;
|
|
575
|
+
} | undefined>;
|
|
576
|
+
assertTeacherApprovalFresh?(input: {
|
|
577
|
+
channelId: string;
|
|
578
|
+
companyId: string;
|
|
579
|
+
action: string;
|
|
580
|
+
preview: Record<string, unknown>;
|
|
581
|
+
}, db?: import('../../control-plane/pg-store.js').SqlQueryable): Promise<void>;
|
|
582
|
+
loadTeacherOverviewRows(db: SqlQueryable, scope: TeacherReportingScope, windowDays: number): Promise<{
|
|
583
|
+
distribution: Record<string, unknown>[];
|
|
584
|
+
missions: Record<string, unknown>[];
|
|
585
|
+
activity: Record<string, unknown>[];
|
|
586
|
+
attention: Record<string, unknown>[];
|
|
587
|
+
coverage: Record<string, unknown>[];
|
|
588
|
+
}>;
|
|
589
|
+
listTeacherLearnerRows(db: SqlQueryable, scope: TeacherReportingScope, attentionOnly: boolean): Promise<Record<string, unknown>[]>;
|
|
590
|
+
findTeacherLearner(db: SqlQueryable, scope: TeacherReportingScope, learnerId: string): Promise<Record<string, unknown> | undefined>;
|
|
591
|
+
loadTeacherLearnerDetailRows(db: SqlQueryable, scope: TeacherReportingScope, learnerId: string): Promise<{
|
|
592
|
+
states: Record<string, unknown>[];
|
|
593
|
+
missions: Record<string, unknown>[];
|
|
594
|
+
attempts: Record<string, unknown>[];
|
|
595
|
+
}>;
|
|
596
|
+
findTeacherAttemptDetail(db: SqlQueryable, scope: TeacherReportingScope, attemptId: string): Promise<Record<string, unknown> | undefined>;
|
|
597
|
+
listTeacherObjectives(db: SqlQueryable, scope: TeacherReportingScope): Promise<Record<string, unknown>[]>;
|
|
598
|
+
listTeacherActivities(db: SqlQueryable, scope: TeacherReportingScope): Promise<Record<string, unknown>[]>;
|
|
599
|
+
listTeacherReviews(db: SqlQueryable, scope: TeacherReportingScope): Promise<Record<string, unknown>[]>;
|
|
600
|
+
listTeacherBindableRooms(db: SqlQueryable, scope: TeacherReportingScope): Promise<Record<string, unknown>[]>;
|
|
601
|
+
auditInTransaction(db: SqlQueryable, input: {
|
|
602
|
+
kind: string;
|
|
603
|
+
userId?: string;
|
|
604
|
+
companyId: string;
|
|
605
|
+
detail: Record<string, unknown>;
|
|
606
|
+
}): Promise<void>;
|
|
607
|
+
findTeacherScopeBinding(db: import('../../control-plane/pg-store.js').SqlQueryable, companyId: string, agentId: string, channelId: string): Promise<{
|
|
608
|
+
company_id: string;
|
|
609
|
+
project_id: string;
|
|
610
|
+
course_id: string;
|
|
611
|
+
course_title: string;
|
|
612
|
+
course_status: string;
|
|
613
|
+
room_id: string;
|
|
614
|
+
room_status: string;
|
|
615
|
+
agent_id: string;
|
|
616
|
+
agent_name: string;
|
|
617
|
+
has_teacher: boolean;
|
|
618
|
+
} | undefined>;
|
|
619
|
+
findTeacherTurnCounts(db: import('../../control-plane/pg-store.js').SqlQueryable, companyId: string, projectId: string): Promise<{
|
|
620
|
+
learners: number;
|
|
621
|
+
objectives: number;
|
|
622
|
+
activities: number;
|
|
623
|
+
pending_reviews: number;
|
|
624
|
+
}>;
|
|
625
|
+
};
|
|
626
|
+
canvas?: {
|
|
627
|
+
orchestration?: {
|
|
628
|
+
CH_CANVAS: string;
|
|
629
|
+
publish(channel: string, event: NativeCanvasChanged): Promise<void>;
|
|
630
|
+
toAssignment(row: NativeCanvasAssignmentRow, dependencies?: string[]): unknown;
|
|
631
|
+
insertAgentWorkspace(db: SqlQueryable, input: {
|
|
632
|
+
id: string;
|
|
633
|
+
companyId: string;
|
|
634
|
+
title: string;
|
|
635
|
+
conversationId: string;
|
|
636
|
+
triggerClientMsgNo: string;
|
|
637
|
+
goal: string;
|
|
638
|
+
initiatorAgentId: string;
|
|
639
|
+
authorizationUserId: string | null;
|
|
640
|
+
}): Promise<{
|
|
641
|
+
id: string;
|
|
642
|
+
project_id: string | null;
|
|
643
|
+
status: string;
|
|
644
|
+
} | null>;
|
|
645
|
+
createPermissionService(db: SqlQueryable, options?: {
|
|
646
|
+
lockDependencies?: boolean;
|
|
647
|
+
}): {
|
|
648
|
+
assertCan(input: Parameters<LingxiLoopServices['permissionService']['assertCan']>[0]): Promise<unknown>;
|
|
649
|
+
};
|
|
650
|
+
assertCanvasDependencyDAG(members: Array<{
|
|
651
|
+
agentId: string;
|
|
652
|
+
assignment: string;
|
|
653
|
+
dependsOnAgentIds?: string[];
|
|
654
|
+
}>, existingAgentIds?: Set<string>): void;
|
|
655
|
+
canvasAgentColor(agentId: string, used: ReadonlySet<string>): string;
|
|
656
|
+
canvasWorkArea(index: number): {
|
|
657
|
+
x: number;
|
|
658
|
+
y: number;
|
|
659
|
+
width: number;
|
|
660
|
+
height: number;
|
|
661
|
+
};
|
|
662
|
+
createEvidenceRecordInTransaction(db: NativeQueryable, input: {
|
|
663
|
+
id: string;
|
|
664
|
+
companyId: string;
|
|
665
|
+
projectId: string;
|
|
666
|
+
level: 'L1' | 'L2';
|
|
667
|
+
derivation: 'OBSERVED';
|
|
668
|
+
kind: string;
|
|
669
|
+
data: {
|
|
670
|
+
[key: string]: string;
|
|
671
|
+
};
|
|
672
|
+
createdBy: {
|
|
673
|
+
type: 'SYSTEM';
|
|
674
|
+
} | {
|
|
675
|
+
type: 'AGENT';
|
|
676
|
+
id: string;
|
|
677
|
+
};
|
|
678
|
+
}): Promise<unknown>;
|
|
679
|
+
createEvidenceWithLinksInTransaction(db: NativeQueryable, input: {
|
|
680
|
+
id: string;
|
|
681
|
+
companyId: string;
|
|
682
|
+
projectId: string;
|
|
683
|
+
level: 'L2';
|
|
684
|
+
derivation: 'OBSERVED';
|
|
685
|
+
kind: string;
|
|
686
|
+
data: {
|
|
687
|
+
[key: string]: string;
|
|
688
|
+
};
|
|
689
|
+
createdBy: {
|
|
690
|
+
type: 'AGENT';
|
|
691
|
+
id: string;
|
|
692
|
+
};
|
|
693
|
+
}, links: Array<{
|
|
694
|
+
relation: 'DERIVED_FROM';
|
|
695
|
+
targetLevel: 'L1';
|
|
696
|
+
targetKind: 'EVIDENCE_RECORD';
|
|
697
|
+
targetId: string;
|
|
698
|
+
}>): Promise<unknown>;
|
|
699
|
+
};
|
|
700
|
+
addCanvasComment(input: {
|
|
701
|
+
companyId: string;
|
|
702
|
+
actorId: string;
|
|
703
|
+
actorKind: 'agent';
|
|
704
|
+
canvasId: string;
|
|
705
|
+
frameId?: string;
|
|
706
|
+
body: string;
|
|
707
|
+
}): Promise<unknown>;
|
|
708
|
+
canvasCommentRequestSchema: {
|
|
709
|
+
parse(input: unknown): {
|
|
710
|
+
canvasId: string;
|
|
711
|
+
frameId?: string | null;
|
|
712
|
+
body: string;
|
|
713
|
+
};
|
|
714
|
+
};
|
|
715
|
+
listCanvasAvailableAgents(companyId: string): Promise<Array<{
|
|
716
|
+
id: string;
|
|
717
|
+
name: string;
|
|
718
|
+
role: string;
|
|
719
|
+
status: string;
|
|
720
|
+
}>>;
|
|
721
|
+
getConversationCanvas(companyId: string, conversationId: string, actorId: string): Promise<unknown>;
|
|
722
|
+
createCanvasFrame(input: {
|
|
723
|
+
companyId: string;
|
|
724
|
+
actorId: string;
|
|
725
|
+
actorKind: 'agent';
|
|
726
|
+
idempotencyKey: string;
|
|
727
|
+
canvasId: string;
|
|
728
|
+
frame: Record<string, unknown>;
|
|
729
|
+
}): Promise<unknown>;
|
|
730
|
+
deleteCanvasFrame(input: {
|
|
731
|
+
companyId: string;
|
|
732
|
+
actorId: string;
|
|
733
|
+
actorKind: 'agent';
|
|
734
|
+
frameId: string;
|
|
735
|
+
}): Promise<unknown>;
|
|
736
|
+
appendCanvasFrameContent(input: {
|
|
737
|
+
companyId: string;
|
|
738
|
+
actorId: string;
|
|
739
|
+
actorKind: 'agent';
|
|
740
|
+
frameId: string;
|
|
741
|
+
content: string;
|
|
742
|
+
}): Promise<unknown>;
|
|
743
|
+
updateCanvasFrame(input: {
|
|
744
|
+
companyId: string;
|
|
745
|
+
actorId: string;
|
|
746
|
+
actorKind: 'agent';
|
|
747
|
+
frameId: string;
|
|
748
|
+
patch: Record<string, unknown>;
|
|
749
|
+
}): Promise<unknown>;
|
|
750
|
+
canvasFrameUpdateRequestSchema: {
|
|
751
|
+
parse(input: unknown): Record<string, unknown>;
|
|
752
|
+
};
|
|
753
|
+
canvasFrameCreateRequestSchema: {
|
|
754
|
+
parse(input: unknown): Record<string, unknown>;
|
|
755
|
+
};
|
|
756
|
+
};
|
|
757
|
+
learning?: {
|
|
758
|
+
createPermissionService(db: SqlQueryable, options?: {
|
|
759
|
+
lockDependencies?: boolean;
|
|
760
|
+
}): {
|
|
761
|
+
assertCan(input: Parameters<LingxiLoopServices['permissionService']['assertCan']>[0]): Promise<unknown>;
|
|
762
|
+
};
|
|
763
|
+
learningScoreBreakdownSchema: {
|
|
764
|
+
parse(input: unknown): {
|
|
765
|
+
label: string;
|
|
766
|
+
score: number;
|
|
767
|
+
weight: number;
|
|
768
|
+
note?: string;
|
|
769
|
+
}[];
|
|
770
|
+
};
|
|
771
|
+
proposeLearningEvaluation(db: SqlQueryable, transaction: NativeTransaction, metric: (name: 'learning.state.changed' | 'learning.evaluation.proposed', labels?: Record<string, string>) => void, input: {
|
|
772
|
+
companyId: string;
|
|
773
|
+
channelId: string;
|
|
774
|
+
agentId: string;
|
|
775
|
+
attemptId: string;
|
|
776
|
+
demonstratedLevel: number;
|
|
777
|
+
confidence: number;
|
|
778
|
+
rubricResults: {
|
|
779
|
+
label: string;
|
|
780
|
+
score: number;
|
|
781
|
+
weight: number;
|
|
782
|
+
note?: string;
|
|
783
|
+
}[];
|
|
784
|
+
feedback?: string;
|
|
785
|
+
sourceEvidenceId?: string;
|
|
786
|
+
verifierEvidenceId?: string;
|
|
787
|
+
}): Promise<{
|
|
788
|
+
evaluationId: string;
|
|
789
|
+
status: 'ACCEPTED' | 'PENDING';
|
|
790
|
+
decisions: unknown[];
|
|
791
|
+
}>;
|
|
792
|
+
findLearningDocumentEvidence(db: SqlQueryable, input: {
|
|
793
|
+
companyId: string;
|
|
794
|
+
projectId: string;
|
|
795
|
+
documentId: string;
|
|
796
|
+
}): Promise<{
|
|
797
|
+
id: string;
|
|
798
|
+
revision: number;
|
|
799
|
+
authorId: string;
|
|
800
|
+
} | null>;
|
|
801
|
+
findLearningCanvasEvidence(db: SqlQueryable, input: {
|
|
802
|
+
companyId: string;
|
|
803
|
+
projectId: string;
|
|
804
|
+
frameId: string;
|
|
805
|
+
}): Promise<{
|
|
806
|
+
id: string;
|
|
807
|
+
revision: number;
|
|
808
|
+
authorId: string;
|
|
809
|
+
} | null>;
|
|
810
|
+
recordLearningAttempt(db: SqlQueryable, transaction: NativeTransaction, infrastructure: {
|
|
811
|
+
syncMessages(input: {
|
|
812
|
+
channelId: string;
|
|
813
|
+
channelType: number;
|
|
814
|
+
limit: number;
|
|
815
|
+
loginUid: string;
|
|
816
|
+
}): Promise<{
|
|
817
|
+
clientMsgNo: string;
|
|
818
|
+
fromUid: string;
|
|
819
|
+
authoredByAgent: boolean;
|
|
820
|
+
}[]>;
|
|
821
|
+
metric(name: string, labels?: Record<string, string>): void;
|
|
822
|
+
}, input: {
|
|
823
|
+
companyId: string;
|
|
824
|
+
channelId: string;
|
|
825
|
+
agentId: string;
|
|
826
|
+
activityId?: string;
|
|
827
|
+
missionStepId?: string;
|
|
828
|
+
evidenceClientMsgNos?: string[];
|
|
829
|
+
documentIds?: string[];
|
|
830
|
+
canvasFrameIds?: string[];
|
|
831
|
+
assistance?: 'NONE' | 'HINT' | 'GUIDED';
|
|
832
|
+
}): Promise<{
|
|
833
|
+
id: string;
|
|
834
|
+
learnerId: string;
|
|
835
|
+
}>;
|
|
836
|
+
createKnowledgeUnits(input: {
|
|
837
|
+
companyId: string;
|
|
838
|
+
projectId: string;
|
|
839
|
+
actorId: string;
|
|
840
|
+
actorKind: 'agent';
|
|
841
|
+
knowledgeUnits: {
|
|
842
|
+
title: string;
|
|
843
|
+
successCriteria: string;
|
|
844
|
+
targetLevel?: number;
|
|
845
|
+
prerequisiteKnowledgeUnitIds?: string[];
|
|
846
|
+
}[];
|
|
847
|
+
}): Promise<unknown>;
|
|
848
|
+
draftActivity(input: {
|
|
849
|
+
companyId: string;
|
|
850
|
+
projectId: string;
|
|
851
|
+
actorId: string;
|
|
852
|
+
actorKind: 'agent';
|
|
853
|
+
title: string;
|
|
854
|
+
instructions: string;
|
|
855
|
+
kind: 'LESSON' | 'PRACTICE' | 'ASSESSMENT' | 'PROJECT' | 'REVIEW';
|
|
856
|
+
evaluationMode?: 'AGENT_FORMATIVE' | 'TEACHER_REQUIRED';
|
|
857
|
+
targetLevel?: number;
|
|
858
|
+
rubric?: unknown[];
|
|
859
|
+
knowledgeUnitIds?: string[];
|
|
860
|
+
dueAt?: string;
|
|
861
|
+
}): Promise<unknown>;
|
|
862
|
+
findLearningRoomState(db: SqlQueryable, scope: {
|
|
863
|
+
companyId: string;
|
|
864
|
+
channelId: string;
|
|
865
|
+
}): Promise<{
|
|
866
|
+
companyId: string;
|
|
867
|
+
projectId: string;
|
|
868
|
+
purpose: 'study' | 'lab' | 'discussion';
|
|
869
|
+
courseId?: string;
|
|
870
|
+
} | null>;
|
|
871
|
+
findEligibleLearningMissionCoordinator(db: SqlQueryable, input: {
|
|
872
|
+
companyId: string;
|
|
873
|
+
projectId: string;
|
|
874
|
+
channelId: string;
|
|
875
|
+
preferredPreset: string;
|
|
876
|
+
currentAgentId: string;
|
|
877
|
+
}): Promise<string | null>;
|
|
878
|
+
upsertLearningMission(db: SqlQueryable, input: {
|
|
879
|
+
id: string;
|
|
880
|
+
companyId: string;
|
|
881
|
+
projectId: string;
|
|
882
|
+
learnerId: string;
|
|
883
|
+
channelId: string;
|
|
884
|
+
triggerClientMsgNo: string;
|
|
885
|
+
goal: string;
|
|
886
|
+
successCriteria: string;
|
|
887
|
+
kind: 'STUDY' | 'RESEARCH' | 'PROJECT';
|
|
888
|
+
coordinatorAgentId: string;
|
|
889
|
+
createdBy: string;
|
|
890
|
+
}): Promise<{
|
|
891
|
+
id: string;
|
|
892
|
+
inserted: boolean;
|
|
893
|
+
}>;
|
|
894
|
+
findLearningMission(db: SqlQueryable, companyId: string, projectId: string, missionId: string): Promise<{
|
|
895
|
+
id: string;
|
|
896
|
+
projectId: string;
|
|
897
|
+
learnerId: string;
|
|
898
|
+
conversationId: string;
|
|
899
|
+
triggerClientMsgNo: string;
|
|
900
|
+
goal: string;
|
|
901
|
+
successCriteria: string;
|
|
902
|
+
kind: 'STUDY' | 'RESEARCH' | 'PROJECT';
|
|
903
|
+
coordinatorAgentId: string;
|
|
904
|
+
status: string;
|
|
905
|
+
} | null>;
|
|
906
|
+
inc(name: 'learning.mission.created' | 'learning.mission.deduplicated' | 'learning.attempt.accepted' | 'learning.state.changed' | 'learning.evaluation.proposed', labels?: Record<string, string>): void;
|
|
907
|
+
updateMissionStep(work: {
|
|
908
|
+
companyId: string;
|
|
909
|
+
channelId: string;
|
|
910
|
+
}, input: {
|
|
911
|
+
missionId: string;
|
|
912
|
+
stepId: string;
|
|
913
|
+
status: 'OPEN' | 'IN_PROGRESS' | 'COMPLETED' | 'CANCELLED';
|
|
914
|
+
outcome?: string;
|
|
915
|
+
sourceEvidenceId?: string;
|
|
916
|
+
attemptId?: string;
|
|
917
|
+
}): Promise<unknown>;
|
|
918
|
+
addMissionSteps(work: {
|
|
919
|
+
companyId: string;
|
|
920
|
+
channelId: string;
|
|
921
|
+
}, missionId: string, steps: {
|
|
922
|
+
kind: 'LEARN' | 'PRACTICE' | 'CHECK' | 'REFLECT';
|
|
923
|
+
description: string;
|
|
924
|
+
successCriteria: string;
|
|
925
|
+
knowledgeUnitId?: string;
|
|
926
|
+
}[]): Promise<unknown>;
|
|
927
|
+
finishMissionPlanning(work: {
|
|
928
|
+
companyId: string;
|
|
929
|
+
channelId: string;
|
|
930
|
+
}, missionId: string): Promise<unknown>;
|
|
931
|
+
completeMission(work: {
|
|
932
|
+
companyId: string;
|
|
933
|
+
channelId: string;
|
|
934
|
+
}, missionId: string): Promise<unknown>;
|
|
935
|
+
loadLearningTurnContext(work: NativeWork, actorId?: string): Promise<{
|
|
936
|
+
project: {
|
|
937
|
+
id: string;
|
|
938
|
+
};
|
|
939
|
+
learnerId?: string;
|
|
940
|
+
activeMission?: unknown;
|
|
941
|
+
knowledgeUnits: unknown[];
|
|
942
|
+
due: unknown[];
|
|
943
|
+
} | null | undefined>;
|
|
944
|
+
getMission(missionId: string, companyId: string, projectId: string, learnerId: string, conversationId: string): Promise<unknown>;
|
|
945
|
+
getActivity(activityId: string, companyId: string, projectId: string): Promise<unknown>;
|
|
946
|
+
};
|
|
947
|
+
advanceAgentReadReceipt?(input: {
|
|
948
|
+
companyId: string;
|
|
949
|
+
channelId: string;
|
|
950
|
+
agentId: string;
|
|
951
|
+
readThroughSeq: number;
|
|
952
|
+
}): Promise<unknown>;
|
|
953
|
+
presentations?: {
|
|
954
|
+
createPresentationForAgent(work: NativeWork, input: {
|
|
955
|
+
idempotencyKey: string;
|
|
956
|
+
requirements: string;
|
|
957
|
+
title?: string | undefined;
|
|
958
|
+
sourceIds?: string[] | undefined;
|
|
959
|
+
targetSlideCount?: number | undefined;
|
|
960
|
+
language?: string | undefined;
|
|
961
|
+
}): Promise<unknown>;
|
|
962
|
+
getPresentationForAgent(work: NativeWork, id: string): Promise<unknown>;
|
|
963
|
+
cancelPresentationForAgent(work: NativeWork, id: string, input: {
|
|
964
|
+
idempotencyKey: string;
|
|
965
|
+
}): Promise<unknown>;
|
|
966
|
+
retryPresentationForAgent(work: NativeWork, id: string, input: {
|
|
967
|
+
idempotencyKey: string;
|
|
968
|
+
}): Promise<unknown>;
|
|
969
|
+
revisePresentationOutlineForAgent(work: NativeWork, id: string, input: {
|
|
970
|
+
idempotencyKey: string;
|
|
971
|
+
expectedRevision: number;
|
|
972
|
+
feedback?: string | undefined;
|
|
973
|
+
targetSlideCount?: number | undefined;
|
|
974
|
+
}): Promise<unknown>;
|
|
975
|
+
revisePresentationForAgent(work: NativeWork, id: string, input: {
|
|
976
|
+
idempotencyKey: string;
|
|
977
|
+
instruction: string;
|
|
978
|
+
scope: 'page' | 'section' | 'deck';
|
|
979
|
+
pageIds?: string[] | undefined;
|
|
980
|
+
sectionIds?: string[] | undefined;
|
|
981
|
+
}): Promise<unknown>;
|
|
982
|
+
createPresentationRequestSchema: {
|
|
983
|
+
parse(input: unknown): Parameters<NonNullable<LingxiLoopServices['presentations']>['createPresentationForAgent']>[1];
|
|
984
|
+
};
|
|
985
|
+
revisePresentationOutlineRequestSchema: {
|
|
986
|
+
parse(input: unknown): Parameters<NonNullable<LingxiLoopServices['presentations']>['revisePresentationOutlineForAgent']>[2];
|
|
987
|
+
};
|
|
988
|
+
revisePresentationRequestSchema: {
|
|
989
|
+
parse(input: unknown): Parameters<NonNullable<LingxiLoopServices['presentations']>['revisePresentationForAgent']>[2];
|
|
990
|
+
};
|
|
991
|
+
};
|
|
992
|
+
pollApplication?: {
|
|
993
|
+
conversationId(companyId: string, messageId: string): Promise<string | null>;
|
|
994
|
+
create(input: {
|
|
995
|
+
companyId: string;
|
|
996
|
+
actorId: string;
|
|
997
|
+
conversationId: string;
|
|
998
|
+
question: string;
|
|
999
|
+
mode: 'single' | 'multi';
|
|
1000
|
+
options: string[];
|
|
1001
|
+
expiresInMinutes?: number | null;
|
|
1002
|
+
idempotencyKey?: string;
|
|
1003
|
+
}): Promise<unknown>;
|
|
1004
|
+
vote(input: {
|
|
1005
|
+
companyId: string;
|
|
1006
|
+
actorId: string;
|
|
1007
|
+
messageId: string;
|
|
1008
|
+
voterKind: 'agent';
|
|
1009
|
+
optionIds: string[];
|
|
1010
|
+
}): Promise<unknown>;
|
|
1011
|
+
close(input: {
|
|
1012
|
+
companyId: string;
|
|
1013
|
+
actorId: string;
|
|
1014
|
+
messageId: string;
|
|
1015
|
+
reason: 'manual';
|
|
1016
|
+
}): Promise<unknown>;
|
|
1017
|
+
show(companyId: string, messageId: string): Promise<unknown>;
|
|
1018
|
+
};
|
|
1019
|
+
knowledge: KnowledgeServices;
|
|
1020
|
+
storage?: {
|
|
1021
|
+
readObjectBounded(key: string, maxBytes: number): Promise<Uint8Array>;
|
|
1022
|
+
};
|
|
1023
|
+
wukongClient(): {
|
|
1024
|
+
syncMessages(channelId: string, channelType: number, limit: number, loginUid: string): Promise<NativeMessage[]>;
|
|
1025
|
+
sendMessage(channelId: string, channelType: number, fromUid: string, payload: NativeTextMessage | (Omit<NativeTextMessage, 'kind'> & {
|
|
1026
|
+
kind: 'questionnaire' | 'learning_mission';
|
|
1027
|
+
})): Promise<{
|
|
1028
|
+
messageId: string;
|
|
1029
|
+
messageSeq: number;
|
|
1030
|
+
}>;
|
|
1031
|
+
};
|
|
1032
|
+
permissionService: {
|
|
1033
|
+
assertCan(request: {
|
|
1034
|
+
actorUserId: string;
|
|
1035
|
+
companyId: string;
|
|
1036
|
+
projectId?: string;
|
|
1037
|
+
action: 'calendar:write' | 'calendar:read' | 'document:write' | 'document:read' | 'document:delete' | 'agent_run:control' | 'agent_memory:read' | 'agent_memory:write' | 'canvas:write' | 'agent_approval:resolve' | 'learning:manage' | 'learning:read' | 'learning:submit' | 'agent:read' | 'conversation:read' | 'conversation:write' | 'knowledge:read' | 'knowledge:write' | 'knowledge:manage' | 'poll:read' | 'poll:create' | 'poll:vote' | 'poll:close';
|
|
1038
|
+
resource: {
|
|
1039
|
+
type: 'calendar_event' | 'document' | 'canvas_frame' | 'canvas' | 'conversation' | 'knowledge_source' | 'poll' | 'approval' | 'project';
|
|
1040
|
+
id: string;
|
|
1041
|
+
};
|
|
1042
|
+
}): Promise<unknown>;
|
|
1043
|
+
};
|
|
1044
|
+
}
|
|
1045
|
+
export {};
|