@hualinge/relay-api-server-contracts 0.1.3

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.
Files changed (99) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +58 -0
  3. package/dist/auth.d.ts +152 -0
  4. package/dist/auth.d.ts.map +1 -0
  5. package/dist/auth.js +16 -0
  6. package/dist/auth.js.map +1 -0
  7. package/dist/catalog.d.ts +21 -0
  8. package/dist/catalog.d.ts.map +1 -0
  9. package/dist/catalog.js +2 -0
  10. package/dist/catalog.js.map +1 -0
  11. package/dist/evidence.d.ts +109 -0
  12. package/dist/evidence.d.ts.map +1 -0
  13. package/dist/evidence.js +2 -0
  14. package/dist/evidence.js.map +1 -0
  15. package/dist/identity.d.ts +8 -0
  16. package/dist/identity.d.ts.map +1 -0
  17. package/dist/identity.js +2 -0
  18. package/dist/identity.js.map +1 -0
  19. package/dist/index.d.ts +17 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +2 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/metrics.d.ts +33 -0
  24. package/dist/metrics.d.ts.map +1 -0
  25. package/dist/metrics.js +9 -0
  26. package/dist/metrics.js.map +1 -0
  27. package/dist/runtime-env.d.ts +14 -0
  28. package/dist/runtime-env.d.ts.map +1 -0
  29. package/dist/runtime-env.js +2 -0
  30. package/dist/runtime-env.js.map +1 -0
  31. package/dist/scheduler.d.ts +162 -0
  32. package/dist/scheduler.d.ts.map +1 -0
  33. package/dist/scheduler.js +2 -0
  34. package/dist/scheduler.js.map +1 -0
  35. package/dist/storage/authorization-types.d.ts +86 -0
  36. package/dist/storage/authorization-types.d.ts.map +1 -0
  37. package/dist/storage/authorization-types.js +2 -0
  38. package/dist/storage/authorization-types.js.map +1 -0
  39. package/dist/storage/backlog-types.d.ts +21 -0
  40. package/dist/storage/backlog-types.d.ts.map +1 -0
  41. package/dist/storage/backlog-types.js +2 -0
  42. package/dist/storage/backlog-types.js.map +1 -0
  43. package/dist/storage/draft-types.d.ts +22 -0
  44. package/dist/storage/draft-types.d.ts.map +1 -0
  45. package/dist/storage/draft-types.js +2 -0
  46. package/dist/storage/draft-types.js.map +1 -0
  47. package/dist/storage/index.d.ts +79 -0
  48. package/dist/storage/index.d.ts.map +1 -0
  49. package/dist/storage/index.js +15 -0
  50. package/dist/storage/index.js.map +1 -0
  51. package/dist/storage/invocation-record-types.d.ts +44 -0
  52. package/dist/storage/invocation-record-types.d.ts.map +1 -0
  53. package/dist/storage/invocation-record-types.js +2 -0
  54. package/dist/storage/invocation-record-types.js.map +1 -0
  55. package/dist/storage/memory-kv-types.d.ts +11 -0
  56. package/dist/storage/memory-kv-types.d.ts.map +1 -0
  57. package/dist/storage/memory-kv-types.js +2 -0
  58. package/dist/storage/memory-kv-types.js.map +1 -0
  59. package/dist/storage/message-types.d.ts +103 -0
  60. package/dist/storage/message-types.d.ts.map +1 -0
  61. package/dist/storage/message-types.js +9 -0
  62. package/dist/storage/message-types.js.map +1 -0
  63. package/dist/storage/pending-request-types.d.ts +17 -0
  64. package/dist/storage/pending-request-types.d.ts.map +1 -0
  65. package/dist/storage/pending-request-types.js +2 -0
  66. package/dist/storage/pending-request-types.js.map +1 -0
  67. package/dist/storage/push-subscription-types.d.ts +18 -0
  68. package/dist/storage/push-subscription-types.d.ts.map +1 -0
  69. package/dist/storage/push-subscription-types.js +2 -0
  70. package/dist/storage/push-subscription-types.js.map +1 -0
  71. package/dist/storage/read-state-types.d.ts +19 -0
  72. package/dist/storage/read-state-types.d.ts.map +1 -0
  73. package/dist/storage/read-state-types.js +2 -0
  74. package/dist/storage/read-state-types.js.map +1 -0
  75. package/dist/storage/session-chain-types.d.ts +21 -0
  76. package/dist/storage/session-chain-types.d.ts.map +1 -0
  77. package/dist/storage/session-chain-types.js +2 -0
  78. package/dist/storage/session-chain-types.js.map +1 -0
  79. package/dist/storage/summary-types.d.ts +9 -0
  80. package/dist/storage/summary-types.d.ts.map +1 -0
  81. package/dist/storage/summary-types.js +2 -0
  82. package/dist/storage/summary-types.js.map +1 -0
  83. package/dist/storage/task-types.d.ts +11 -0
  84. package/dist/storage/task-types.d.ts.map +1 -0
  85. package/dist/storage/task-types.js +2 -0
  86. package/dist/storage/task-types.js.map +1 -0
  87. package/dist/storage/thread-types.d.ts +135 -0
  88. package/dist/storage/thread-types.d.ts.map +1 -0
  89. package/dist/storage/thread-types.js +12 -0
  90. package/dist/storage/thread-types.js.map +1 -0
  91. package/dist/storage/workflow-sop-types.d.ts +12 -0
  92. package/dist/storage/workflow-sop-types.d.ts.map +1 -0
  93. package/dist/storage/workflow-sop-types.js +9 -0
  94. package/dist/storage/workflow-sop-types.js.map +1 -0
  95. package/dist/telemetry-provider.d.ts +54 -0
  96. package/dist/telemetry-provider.d.ts.map +1 -0
  97. package/dist/telemetry-provider.js +7 -0
  98. package/dist/telemetry-provider.js.map +1 -0
  99. package/package.json +76 -0
@@ -0,0 +1,162 @@
1
+ export type RunOutcome = 'SKIP_NO_SIGNAL' | 'SKIP_DISABLED' | 'SKIP_OVERLAP' | 'SKIP_GLOBAL_PAUSE' | 'SKIP_TASK_OVERRIDE' | 'SKIP_SELF_ECHO' | 'SKIP_MISSED_WINDOW' | 'RUN_DELIVERED' | 'RUN_FAILED';
2
+ export interface RunLedgerRow {
3
+ task_id: string;
4
+ subject_key: string;
5
+ outcome: RunOutcome;
6
+ signal_summary: string | null;
7
+ duration_ms: number;
8
+ started_at: string;
9
+ assigned_agent_id: string | null;
10
+ error_summary: string | null;
11
+ task_snapshot_json?: string | null;
12
+ }
13
+ export interface RunLedgerRecord extends RunLedgerRow {
14
+ id: number;
15
+ task_snapshot_json: string | null;
16
+ }
17
+ export interface RunLedgerQuery {
18
+ limit: number;
19
+ cursor?: number;
20
+ taskId?: string;
21
+ threadId?: string;
22
+ outcome?: RunOutcome;
23
+ since?: string;
24
+ until?: string;
25
+ }
26
+ export interface RunStats {
27
+ total: number;
28
+ delivered: number;
29
+ failed: number;
30
+ skipped: number;
31
+ }
32
+ export interface RunLedgerPort {
33
+ record(row: RunLedgerRow): void;
34
+ query(taskId: string, limit: number): RunLedgerRow[];
35
+ queryBySubject(taskId: string, subjectKey: string, limit: number): RunLedgerRow[];
36
+ queryAll(query: RunLedgerQuery): RunLedgerRecord[];
37
+ getById(id: number): RunLedgerRecord | null;
38
+ deleteById(id: number): boolean;
39
+ stats(taskId: string): RunStats;
40
+ }
41
+ export interface GlobalControl {
42
+ enabled: boolean;
43
+ reason: string | null;
44
+ updatedBy: string;
45
+ updatedAt: string;
46
+ }
47
+ export interface TaskOverride {
48
+ taskId: string;
49
+ enabled: boolean;
50
+ updatedBy: string;
51
+ updatedAt: string;
52
+ }
53
+ export interface GlobalControlPort {
54
+ getGlobalEnabled(): boolean;
55
+ getGlobalState(): GlobalControl;
56
+ setGlobalEnabled(enabled: boolean, reason: string | null, updatedBy: string): void;
57
+ getTaskOverride(taskId: string): TaskOverride | null;
58
+ setTaskOverride(taskId: string, enabled: boolean, updatedBy: string): void;
59
+ removeTaskOverride(taskId: string): boolean;
60
+ listOverrides(): TaskOverride[];
61
+ }
62
+ export interface EmissionRecord {
63
+ originTaskId: string;
64
+ threadId: string;
65
+ messageId: string;
66
+ suppressionMs: number;
67
+ }
68
+ export interface EmissionRow {
69
+ emissionId: string;
70
+ originTaskId: string;
71
+ threadId: string;
72
+ messageId: string;
73
+ suppressionUntil: string;
74
+ createdAt: string;
75
+ }
76
+ export interface EmissionPort {
77
+ record(emission: EmissionRecord): void;
78
+ isSuppressed(taskId: string, threadId: string): boolean;
79
+ cleanup(): number;
80
+ listActive(): EmissionRow[];
81
+ }
82
+ export type DisplayCategory = 'pr' | 'repo' | 'thread' | 'system' | 'external';
83
+ export type SubjectKind = 'pr' | 'repo' | 'thread' | 'external' | 'none';
84
+ export type TriggerSpec = {
85
+ type: 'interval';
86
+ ms: number;
87
+ } | {
88
+ type: 'cron';
89
+ expression: string;
90
+ timezone?: string;
91
+ } | {
92
+ type: 'once';
93
+ fireAt: number;
94
+ };
95
+ export interface PackTemplateDef {
96
+ templateId: string;
97
+ packId: string;
98
+ label: string;
99
+ description: string;
100
+ category: DisplayCategory;
101
+ subjectKind: SubjectKind;
102
+ defaultTrigger: TriggerSpec;
103
+ paramSchema: Record<string, {
104
+ type: string;
105
+ required: boolean;
106
+ description: string;
107
+ }>;
108
+ builtinTemplateRef: string;
109
+ createdAt?: string;
110
+ }
111
+ export interface PackTemplatePort {
112
+ install(def: PackTemplateDef): void;
113
+ get(templateId: string): PackTemplateDef | null;
114
+ uninstall(templateId: string): boolean;
115
+ listByPack(packId: string): PackTemplateDef[];
116
+ listAll(): PackTemplateDef[];
117
+ }
118
+ export interface TaskDisplayMeta {
119
+ label: string;
120
+ category: DisplayCategory;
121
+ description?: string;
122
+ subjectKind?: SubjectKind;
123
+ }
124
+ export interface DynamicTaskDef {
125
+ id: string;
126
+ templateId: string;
127
+ trigger: TriggerSpec;
128
+ params: Record<string, unknown>;
129
+ display: TaskDisplayMeta;
130
+ deliveryThreadId: string | null;
131
+ enabled: boolean;
132
+ createdBy: string;
133
+ createdAt: string;
134
+ }
135
+ export interface DynamicTaskPort {
136
+ insert(def: DynamicTaskDef): void;
137
+ getAll(): DynamicTaskDef[];
138
+ getById(id: string): DynamicTaskDef | null;
139
+ remove(id: string): boolean;
140
+ setEnabled(id: string, enabled: boolean): boolean;
141
+ update(id: string, def: Pick<DynamicTaskDef, 'trigger' | 'params' | 'display' | 'deliveryThreadId' | 'enabled'>): boolean;
142
+ removeByThreadId(threadId: string): DynamicTaskDef[];
143
+ }
144
+ export interface SchedulerPersistence {
145
+ ledger: RunLedgerPort;
146
+ globalControlStore: GlobalControlPort;
147
+ emissionStore: EmissionPort;
148
+ packTemplateStore: PackTemplatePort;
149
+ dynamicTaskStore: DynamicTaskPort;
150
+ close?(): void | Promise<void>;
151
+ }
152
+ export interface SchedulerProviderInput {
153
+ sqlitePath?: string;
154
+ }
155
+ export interface SchedulerProvider {
156
+ readonly id: string;
157
+ readonly displayName?: string;
158
+ createSchedulerPersistence(input: SchedulerProviderInput): SchedulerPersistence | Promise<SchedulerPersistence>;
159
+ bootstrap?(): Promise<void>;
160
+ shutdown?(): Promise<void>;
161
+ }
162
+ //# sourceMappingURL=scheduler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../src/scheduler.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAClB,gBAAgB,GAChB,eAAe,GACf,cAAc,GACd,mBAAmB,GACnB,oBAAoB,GACpB,gBAAgB,GAChB,oBAAoB,GACpB,eAAe,GACf,YAAY,CAAC;AAEjB,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,UAAU,CAAC;IACpB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MA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@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=scheduler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduler.js","sourceRoot":"","sources":["../src/scheduler.ts"],"names":[],"mappings":""}
@@ -0,0 +1,86 @@
1
+ import type { AgentId, AuthorizationAuditEntry, AuthorizationRule, RespondScope } from '@openjiuwen/relay-shared';
2
+ export type { AuthorizationAuditEntry, AuthorizationRule };
3
+ export interface CreateAuditInput {
4
+ readonly requestId: string;
5
+ readonly invocationId: string;
6
+ readonly agentId: AgentId;
7
+ readonly threadId: string;
8
+ readonly action: string;
9
+ readonly reason: string;
10
+ readonly decision: 'allow' | 'deny' | 'pending';
11
+ readonly scope?: RespondScope;
12
+ readonly decidedBy?: string;
13
+ readonly matchedRuleId?: string;
14
+ }
15
+ export interface IAuthorizationAuditStore {
16
+ append(input: CreateAuditInput): AuthorizationAuditEntry | Promise<AuthorizationAuditEntry>;
17
+ list(filter?: {
18
+ agentId?: AgentId;
19
+ threadId?: string;
20
+ limit?: number;
21
+ }): AuthorizationAuditEntry[] | Promise<AuthorizationAuditEntry[]>;
22
+ }
23
+ export interface IAuthorizationRuleStore {
24
+ add(rule: Omit<AuthorizationRule, 'id' | 'createdAt'>): AuthorizationRule | Promise<AuthorizationRule>;
25
+ remove(ruleId: string): boolean | Promise<boolean>;
26
+ match(agentId: AgentId, action: string, threadId: string): AuthorizationRule | null | Promise<AuthorizationRule | null>;
27
+ list(filter?: {
28
+ agentId?: AgentId;
29
+ threadId?: string;
30
+ }): AuthorizationRule[] | Promise<AuthorizationRule[]>;
31
+ }
32
+ export type ApprovalDecision = 'allow' | 'deny' | 'pending';
33
+ export type ApprovalScope = 'once' | 'thread' | 'global';
34
+ export type ApprovalSource = 'user' | 'rule';
35
+ export interface ApprovalRecordInput {
36
+ requestId: string;
37
+ invocationId: string;
38
+ agentId: AgentId;
39
+ threadId: string;
40
+ threadTitle?: string | null;
41
+ action: string;
42
+ operationSummary?: string | null;
43
+ decision: ApprovalDecision;
44
+ approvalSource: ApprovalSource;
45
+ requestedAt: number;
46
+ decidedAt?: number | null;
47
+ scope?: ApprovalScope | null;
48
+ decidedBy?: string | null;
49
+ matchedRuleId?: string | null;
50
+ }
51
+ export interface SecurityApprovalRecord extends ApprovalRecordInput {
52
+ id: string;
53
+ approvalLabel: string;
54
+ }
55
+ export interface SecurityApprovalRecordSettings {
56
+ autoCleanupEnabled: boolean;
57
+ retentionDays: number;
58
+ }
59
+ export interface ListApprovalRecordsQuery {
60
+ limit?: number;
61
+ offset?: number;
62
+ threadQuery?: string;
63
+ includeRuleMatched?: boolean;
64
+ }
65
+ export interface SecurityApprovalRecordsResponse {
66
+ records: SecurityApprovalRecord[];
67
+ pageInfo: {
68
+ hasMore: boolean;
69
+ nextOffset?: number;
70
+ };
71
+ totalCount: number;
72
+ retention: {
73
+ autoCleanupEnabled: boolean;
74
+ retentionDays: number | null;
75
+ };
76
+ }
77
+ export interface IApprovalRecordStore {
78
+ record(input: ApprovalRecordInput): SecurityApprovalRecord | Promise<SecurityApprovalRecord>;
79
+ list(query?: ListApprovalRecordsQuery): SecurityApprovalRecordsResponse | Promise<SecurityApprovalRecordsResponse>;
80
+ getSettings(): SecurityApprovalRecordSettings | Promise<SecurityApprovalRecordSettings>;
81
+ updateSettings(input: {
82
+ autoCleanupEnabled: boolean;
83
+ }): SecurityApprovalRecordSettings | Promise<SecurityApprovalRecordSettings>;
84
+ close(): void;
85
+ }
86
+ //# sourceMappingURL=authorization-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authorization-types.d.ts","sourceRoot":"","sources":["../../src/storage/authorization-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElH,YAAY,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,S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AC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,+BAA+B;IAC9C,OAAO,EAAE,sBAAsB,EAAE,CAAC;IAClC,QAAQ,EAAE;QACR,OAAO,EAAE,OAAO,CAAC;QACjB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE;QACT,kBAAkB,EAAE,OAAO,CAAC;QAC5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;KAC9B,CAAC;CACH;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,KAAK,EAAE,mBAAmB,GAAG,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC7F,IAAI,CAAC,KAAK,CAAC,EAAE,wBAAwB,GAAG,+BAA+B,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAAC;IACnH,WAAW,IAAI,8BAA8B,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;IACxF,cAAc,CAAC,KAAK,EAAE;QAAE,kBAAkB,EAAE,OAAO,CAAA;KAAE,GAAG,8BAA8B,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;IACjI,KAAK,IAAI,IAAI,CAAC;CACf"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=authorization-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authorization-types.js","sourceRoot":"","sources":["../../src/storage/authorization-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import type { AcquireBacklogLeaseInput, AtomicDispatchInput, BacklogItem, CreateBacklogItemInput, DecideBacklogClaimInput, DispatchBacklogItemInput, HeartbeatBacklogLeaseInput, MarkDoneInput, ReclaimBacklogLeaseInput, RefreshBacklogItemInput, ReleaseBacklogLeaseInput, SuggestBacklogClaimInput, UpdateBacklogDispatchProgressInput } from '@openjiuwen/relay-shared';
2
+ export type { AcquireBacklogLeaseInput, AtomicDispatchInput, BacklogItem, CreateBacklogItemInput, DecideBacklogClaimInput, DispatchBacklogItemInput, HeartbeatBacklogLeaseInput, MarkDoneInput, ReclaimBacklogLeaseInput, RefreshBacklogItemInput, ReleaseBacklogLeaseInput, SuggestBacklogClaimInput, UpdateBacklogDispatchProgressInput, };
3
+ export interface IBacklogStore {
4
+ create(input: CreateBacklogItemInput): BacklogItem | Promise<BacklogItem>;
5
+ refreshMetadata(itemId: string, input: RefreshBacklogItemInput): BacklogItem | null | Promise<BacklogItem | null>;
6
+ get(itemId: string, userId?: string): BacklogItem | null | Promise<BacklogItem | null>;
7
+ listByUser(userId: string): BacklogItem[] | Promise<BacklogItem[]>;
8
+ suggestClaim(itemId: string, input: SuggestBacklogClaimInput): BacklogItem | null | Promise<BacklogItem | null>;
9
+ decideClaim(itemId: string, input: DecideBacklogClaimInput): BacklogItem | null | Promise<BacklogItem | null>;
10
+ updateDispatchProgress(itemId: string, input: UpdateBacklogDispatchProgressInput): BacklogItem | null | Promise<BacklogItem | null>;
11
+ markDispatched(itemId: string, input: DispatchBacklogItemInput): BacklogItem | null | Promise<BacklogItem | null>;
12
+ markDone(itemId: string, input: MarkDoneInput): BacklogItem | null | Promise<BacklogItem | null>;
13
+ acquireLease(itemId: string, input: AcquireBacklogLeaseInput): BacklogItem | null | Promise<BacklogItem | null>;
14
+ heartbeatLease(itemId: string, input: HeartbeatBacklogLeaseInput): BacklogItem | null | Promise<BacklogItem | null>;
15
+ releaseLease(itemId: string, input: ReleaseBacklogLeaseInput): BacklogItem | null | Promise<BacklogItem | null>;
16
+ reclaimExpiredLease(itemId: string, input: ReclaimBacklogLeaseInput): BacklogItem | null | Promise<BacklogItem | null>;
17
+ tryAcquireDispatchLock?(itemId: string, ttlMs?: number): Promise<string | false>;
18
+ releaseDispatchLock?(itemId: string, token: string): Promise<void>;
19
+ atomicDispatch?(itemId: string, input: AtomicDispatchInput): BacklogItem | null | Promise<BacklogItem | null>;
20
+ }
21
+ //# sourceMappingURL=backlog-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backlog-types.d.ts","sourceRoot":"","sources":["../../src/storage/backlog-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACnB,WAAW,EACX,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,aAAa,EACb,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,kCAAkC,EACnC,MAAM,0BAA0B,CAAC;AAElC,YAAY,EACV,wBAAwB,EACxB,mBAAmB,EACnB,WAAW,EACX,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,aAAa,EACb,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,kCAAkC,GACnC,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,KAAK,EAAE,sBAAsB,GAAG,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1E,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,uBAAuB,GAAG,WAAW,GAAG,IAAI,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAClH,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACvF,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACnE,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,wBAAwB,GAAG,WAAW,GAAG,IAAI,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAChH,WAAW,CAAC,MAAM,EAAE,MAAM,EAA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,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB,GAAG,WAAW,GAAG,IAAI,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAC/G"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=backlog-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backlog-types.js","sourceRoot":"","sources":["../../src/storage/backlog-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ import type { AgentId, TaskRunPersistExtra } from '@openjiuwen/relay-shared';
2
+ export interface DraftRecord {
3
+ userId: string;
4
+ threadId: string;
5
+ invocationId: string;
6
+ agentId: AgentId;
7
+ content: string;
8
+ toolEvents?: unknown[];
9
+ thinking?: string;
10
+ taskRuns?: TaskRunPersistExtra;
11
+ /** 用户手动停止 — 持久化到 Redis,刷新后仍显示停止态 */
12
+ userStopped?: boolean;
13
+ updatedAt: number;
14
+ }
15
+ export interface IDraftStore {
16
+ upsert(draft: DraftRecord): void | Promise<void>;
17
+ touch(userId: string, threadId: string, invocationId: string): void | Promise<void>;
18
+ getByThread(userId: string, threadId: string): DraftRecord[] | Promise<DraftRecord[]>;
19
+ delete(userId: string, threadId: string, invocationId: string): void | Promise<void>;
20
+ deleteByThread(userId: string, threadId: string): void | Promise<void>;
21
+ }
22
+ //# sourceMappingURL=draft-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draft-types.d.ts","sourceRoot":"","sources":["../../src/storage/draft-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE7E,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,oCAAoC;IACpC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpF,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACtF,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrF,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=draft-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draft-types.js","sourceRoot":"","sources":["../../src/storage/draft-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Storage Plugin API — the contract that third-party storage providers implement.
3
+ *
4
+ * Parallel to auth.ts: external packages implement OfficeClawStorageProvider,
5
+ * export it, and the runtime loads + registers it via env var.
6
+ *
7
+ * Design constraints:
8
+ * - Provider ID is a runtime string, never an enum/union.
9
+ * - Provider creates store instances; the platform passes options (TTL, callbacks).
10
+ * - No silent fallback: if a provider fails to create a store, the platform fails fast.
11
+ */
12
+ import type { IAuthorizationAuditStore, IAuthorizationRuleStore } from './authorization-types.js';
13
+ import type { IApprovalRecordStore } from './authorization-types.js';
14
+ import type { IBacklogStore } from './backlog-types.js';
15
+ import type { IDraftStore } from './draft-types.js';
16
+ import type { IInvocationRecordStore } from './invocation-record-types.js';
17
+ import type { IMemoryStore } from './memory-kv-types.js';
18
+ import type { IMessageStore, StoredMessage } from './message-types.js';
19
+ import type { IPendingRequestStore } from './pending-request-types.js';
20
+ import type { IPushSubscriptionStore } from './push-subscription-types.js';
21
+ import type { IThreadReadStateStore } from './read-state-types.js';
22
+ import type { ISessionChainStore } from './session-chain-types.js';
23
+ import type { ISummaryStore } from './summary-types.js';
24
+ import type { ITaskStore } from './task-types.js';
25
+ import type { IThreadStore } from './thread-types.js';
26
+ import type { IWorkflowSopStore } from './workflow-sop-types.js';
27
+ export interface CreateMessageStoreOptions {
28
+ onAppend?: (msg: Pick<StoredMessage, 'id' | 'threadId' | 'timestamp' | 'content'>) => void;
29
+ ttlSeconds?: number;
30
+ }
31
+ export interface CreateThreadStoreOptions {
32
+ ttlSeconds?: number;
33
+ }
34
+ export interface CreateStoreOptions {
35
+ ttlSeconds?: number;
36
+ }
37
+ export interface CreateApprovalRecordStoreOptions {
38
+ storagePath?: string;
39
+ }
40
+ export interface OfficeClawStorageProvider {
41
+ readonly id: string;
42
+ readonly displayName?: string;
43
+ createMessageStore(options?: CreateMessageStoreOptions): IMessageStore | Promise<IMessageStore>;
44
+ createThreadStore(options?: CreateThreadStoreOptions): IThreadStore | Promise<IThreadStore>;
45
+ createTaskStore(options?: CreateStoreOptions): ITaskStore | Promise<ITaskStore>;
46
+ createBacklogStore(options?: CreateStoreOptions): IBacklogStore | Promise<IBacklogStore>;
47
+ createSummaryStore(options?: CreateStoreOptions): ISummaryStore | Promise<ISummaryStore>;
48
+ createMemoryStore(options?: CreateStoreOptions): IMemoryStore | Promise<IMemoryStore>;
49
+ createDraftStore(options?: CreateStoreOptions): IDraftStore | Promise<IDraftStore>;
50
+ createSessionChainStore(options?: CreateStoreOptions): ISessionChainStore | Promise<ISessionChainStore>;
51
+ createInvocationRecordStore(options?: CreateStoreOptions): IInvocationRecordStore | Promise<IInvocationRecordStore>;
52
+ createPendingRequestStore(options?: CreateStoreOptions): IPendingRequestStore | Promise<IPendingRequestStore>;
53
+ createAuthorizationRuleStore(options?: CreateStoreOptions): IAuthorizationRuleStore | Promise<IAuthorizationRuleStore>;
54
+ createAuthorizationAuditStore(options?: CreateStoreOptions): IAuthorizationAuditStore | Promise<IAuthorizationAuditStore>;
55
+ createApprovalRecordStore?(options?: CreateApprovalRecordStoreOptions): IApprovalRecordStore | Promise<IApprovalRecordStore>;
56
+ createPushSubscriptionStore(options?: CreateStoreOptions): IPushSubscriptionStore | Promise<IPushSubscriptionStore>;
57
+ createReadStateStore(options?: CreateStoreOptions): IThreadReadStateStore | Promise<IThreadReadStateStore>;
58
+ createWorkflowSopStore(options?: CreateStoreOptions): IWorkflowSopStore | Promise<IWorkflowSopStore>;
59
+ bootstrap?(): Promise<void>;
60
+ shutdown?(): Promise<void>;
61
+ }
62
+ export type { ApprovalDecision, ApprovalRecordInput, ApprovalScope, ApprovalSource, CreateAuditInput, IAuthorizationAuditStore, IAuthorizationRuleStore, IApprovalRecordStore, ListApprovalRecordsQuery, SecurityApprovalRecord, SecurityApprovalRecordSettings, SecurityApprovalRecordsResponse, } from './authorization-types.js';
63
+ export type { IBacklogStore } from './backlog-types.js';
64
+ export type { DraftRecord, IDraftStore } from './draft-types.js';
65
+ export type { CreateInvocationInput, CreateResult, IInvocationRecordStore, InvocationRecord, InvocationStatus, UpdateInvocationInput, } from './invocation-record-types.js';
66
+ export type { IMemoryStore } from './memory-kv-types.js';
67
+ export { MAX_KEYS_PER_THREAD } from './memory-kv-types.js';
68
+ export type { AppendMessageInput, IMessageStore, MessageMetadata, StoredMessage, StoredToolEvent, TokenUsage, } from './message-types.js';
69
+ export type { CreatePendingInput, IPendingRequestStore } from './pending-request-types.js';
70
+ export type { IPushSubscriptionStore, PushSubscriptionRecord } from './push-subscription-types.js';
71
+ export type { IThreadReadStateStore, ThreadReadState, ThreadUnreadSummary } from './read-state-types.js';
72
+ export type { CreateSessionInput, ISessionChainStore, SessionRecordPatch } from './session-chain-types.js';
73
+ export type { ISummaryStore } from './summary-types.js';
74
+ export type { ITaskStore } from './task-types.js';
75
+ export type { BootcampPhase, BootcampStateV1, ConnectorHubStateV1, IThreadStore, MentionActionabilityMode, MentionRoutingSuppressionReason, Thread, ThreadMemoryV1, ThreadMentionRoutingFeedback, ThreadMentionRoutingFeedbackItem, ThreadParticipantActivity, ThreadRoutingPolicyV1, ThreadRoutingRule, ThreadRoutingScope, VotingStateV1, } from './thread-types.js';
76
+ export { DEFAULT_THREAD_ID } from './thread-types.js';
77
+ export type { IWorkflowSopStore } from './workflow-sop-types.js';
78
+ export { VersionConflictError } from './workflow-sop-types.js';
79
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAClG,OAAO,KAAK,EAKV,oBAAoB,EAKrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;A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aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,wBAAwB,EACxB,+BAA+B,EAC/B,MAAM,EACN,cAAc,EACd,4BAA4B,EAC5B,gCAAgC,EAChC,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Storage Plugin API — the contract that third-party storage providers implement.
3
+ *
4
+ * Parallel to auth.ts: external packages implement OfficeClawStorageProvider,
5
+ * export it, and the runtime loads + registers it via env var.
6
+ *
7
+ * Design constraints:
8
+ * - Provider ID is a runtime string, never an enum/union.
9
+ * - Provider creates store instances; the platform passes options (TTL, callbacks).
10
+ * - No silent fallback: if a provider fails to create a store, the platform fails fast.
11
+ */
12
+ export { MAX_KEYS_PER_THREAD } from './memory-kv-types.js';
13
+ export { DEFAULT_THREAD_ID } from './thread-types.js';
14
+ export { VersionConflictError } from './workflow-sop-types.js';
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAiHH,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAgC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { AgentId } from '@openjiuwen/relay-shared';
2
+ import type { TokenUsage } from './message-types.js';
3
+ export type InvocationStatus = 'queued' | 'running' | 'succeeded' | 'failed' | 'canceled';
4
+ export interface InvocationRecord {
5
+ id: string;
6
+ threadId: string;
7
+ userId: string;
8
+ userMessageId: string | null;
9
+ targetAgents: AgentId[];
10
+ intent: 'execute' | 'ideate';
11
+ status: InvocationStatus;
12
+ idempotencyKey: string;
13
+ error?: string;
14
+ usageByCat?: Record<string, TokenUsage>;
15
+ usageRecordedAt?: number;
16
+ createdAt: number;
17
+ updatedAt: number;
18
+ }
19
+ export interface CreateInvocationInput {
20
+ threadId: string;
21
+ userId: string;
22
+ targetAgents: AgentId[];
23
+ intent: 'execute' | 'ideate';
24
+ idempotencyKey: string;
25
+ }
26
+ export interface CreateResult {
27
+ outcome: 'created' | 'duplicate';
28
+ invocationId: string;
29
+ }
30
+ export interface UpdateInvocationInput {
31
+ status?: InvocationStatus;
32
+ userMessageId?: string | null;
33
+ error?: string;
34
+ expectedStatus?: InvocationStatus;
35
+ usageByCat?: Record<string, TokenUsage>;
36
+ }
37
+ export interface IInvocationRecordStore {
38
+ create(input: CreateInvocationInput): CreateResult | Promise<CreateResult>;
39
+ get(id: string): InvocationRecord | null | Promise<InvocationRecord | null>;
40
+ update(id: string, input: UpdateInvocationInput): InvocationRecord | null | Promise<InvocationRecord | null>;
41
+ getByIdempotencyKey(threadId: string, userId: string, key: string): InvocationRecord | null | Promise<InvocationRecord | null>;
42
+ scanAll?(): Promise<InvocationRecord[]>;
43
+ }
44
+ //# sourceMappingURL=invocation-record-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invocation-record-types.d.ts","sourceRoot":"","sources":["../../src/storage/invocation-record-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE1F,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX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AC;IAC5E,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,qBAAqB,GAAG,gBAAgB,GAAG,IAAI,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IAC7G,mBAAmB,CACjB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,GACV,gBAAgB,GAAG,IAAI,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IAC9D,OAAO,CAAC,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;CACzC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=invocation-record-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invocation-record-types.js","sourceRoot":"","sources":["../../src/storage/invocation-record-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import type { MemoryEntry, MemoryInput } from '@openjiuwen/relay-shared';
2
+ export type { MemoryEntry, MemoryInput };
3
+ export declare const MAX_KEYS_PER_THREAD = 50;
4
+ export interface IMemoryStore {
5
+ set(input: MemoryInput): MemoryEntry | Promise<MemoryEntry>;
6
+ get(threadId: string, key: string): MemoryEntry | null | Promise<MemoryEntry | null>;
7
+ list(threadId: string): MemoryEntry[] | Promise<MemoryEntry[]>;
8
+ delete(threadId: string, key: string): boolean | Promise<boolean>;
9
+ deleteThread(threadId: string): number | Promise<number>;
10
+ }
11
+ //# sourceMappingURL=memory-kv-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-kv-types.d.ts","sourceRoot":"","sources":["../../src/storage/memory-kv-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEzE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;AAEzC,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC5D,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACrF,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAC/D,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAClE,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC1D"}
@@ -0,0 +1,2 @@
1
+ export const MAX_KEYS_PER_THREAD = 50;
2
+ //# sourceMappingURL=memory-kv-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-kv-types.js","sourceRoot":"","sources":["../../src/storage/memory-kv-types.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC"}