@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
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 OfficeClaw Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # @openjiuwen/relay-api-server-contracts
2
+
3
+ Plugin contracts for OfficeClaw extensions. Auth is the first extension point.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add @openjiuwen/relay-api-server-contracts
9
+ ```
10
+
11
+ ## Auth Provider Contract
12
+
13
+ ```ts
14
+ import type { AuthProvider } from '@openjiuwen/relay-api-server-contracts/auth';
15
+
16
+ const myProvider: AuthProvider = {
17
+ id: 'my-provider',
18
+ displayName: 'My Provider',
19
+ presentation: {
20
+ mode: 'form',
21
+ fields: [
22
+ { name: 'username', label: 'Username', type: 'text', required: true },
23
+ { name: 'password', label: 'Password', type: 'password', required: true },
24
+ ],
25
+ submitLabel: 'Sign In',
26
+ },
27
+ async authenticate(input) {
28
+ // Your authentication logic
29
+ return {
30
+ success: true,
31
+ principal: {
32
+ userId: input.credentials.username as string,
33
+ displayName: 'User',
34
+ expiresAt: null,
35
+ },
36
+ };
37
+ },
38
+ };
39
+
40
+ export default myProvider;
41
+ ```
42
+
43
+ ## Runtime Wiring
44
+
45
+ Install your auth provider package into the app, then point the auth runtime at it:
46
+
47
+ ```bash
48
+ CAT_CAFE_AUTH_PROVIDER=my-provider
49
+ CAT_CAFE_AUTH_PROVIDER_MODULES=@examples/my-auth-provider
50
+ ```
51
+
52
+ The platform will:
53
+
54
+ 1. import the module listed in `CAT_CAFE_AUTH_PROVIDER_MODULES`
55
+ 2. collect exported auth providers
56
+ 3. activate the provider whose `id` matches `CAT_CAFE_AUTH_PROVIDER`
57
+
58
+ See [Build an Auth Provider](../../docs/guides/build-auth-provider.md) for the full walkthrough.
package/dist/auth.d.ts ADDED
@@ -0,0 +1,152 @@
1
+ /**
2
+ * Auth Plugin API — the contract that third-party auth providers implement.
3
+ *
4
+ * Java analogy:
5
+ * - This file is the `interface AuthProvider` jar.
6
+ * - Third-party packages implement this interface and export an object.
7
+ * - The main project installs the package, sets `.env`, and the runtime loads it.
8
+ *
9
+ * Design constraints (F140):
10
+ * - Provider ID is a runtime string, never an enum/union.
11
+ * - Provider only converts credentials → identity. No session, no middleware, no business logic.
12
+ * - postLoginInit is provider-declared, platform-triggered, failure does not roll back auth.
13
+ * - providerState is opaque to the platform — only the provider interprets it.
14
+ */
15
+ export type AuthPresentationMode = 'auto' | 'form' | 'redirect';
16
+ export interface AuthFieldOption {
17
+ value: string;
18
+ label: string;
19
+ }
20
+ export interface AuthFieldSchema {
21
+ name: string;
22
+ label: string;
23
+ type: 'text' | 'password' | 'select';
24
+ required?: boolean;
25
+ placeholder?: string;
26
+ options?: AuthFieldOption[];
27
+ }
28
+ export interface AuthPresentation {
29
+ /** How the frontend should handle login for this provider. */
30
+ mode: AuthPresentationMode;
31
+ /** Form fields (only meaningful when mode is 'form'). */
32
+ fields: AuthFieldSchema[];
33
+ /** Label for the submit button. */
34
+ submitLabel?: string;
35
+ /** Human-readable description shown on the login page. */
36
+ description?: string;
37
+ /** Redirect URL (only meaningful when mode is 'redirect'). */
38
+ redirectUrl?: string;
39
+ }
40
+ /**
41
+ * What a provider returns after successful authentication.
42
+ * The platform takes this and issues an internal session.
43
+ */
44
+ export interface ExternalPrincipal {
45
+ /** User identifier, unique within this provider's namespace. */
46
+ userId: string;
47
+ /** Display name for the user (shown in UI viewer/profile). */
48
+ displayName?: string;
49
+ /** When the provider's credential expires. null = never. */
50
+ expiresAt: Date | null;
51
+ /** Opaque provider-owned data. Stored in session, only the provider reads it. */
52
+ providerState?: unknown;
53
+ }
54
+ export interface AuthenticateInput {
55
+ /** Credentials submitted by the user (form fields, callback params, etc.). */
56
+ credentials: Record<string, unknown>;
57
+ }
58
+ export interface AuthenticateResult {
59
+ success: true;
60
+ principal: ExternalPrincipal;
61
+ }
62
+ export interface AuthenticateFailure {
63
+ success: false;
64
+ message: string;
65
+ /** If true, the frontend should show a promotion-code / invite-code field. */
66
+ needCode?: boolean;
67
+ }
68
+ export type AuthenticateOutcome = AuthenticateResult | AuthenticateFailure;
69
+ /**
70
+ * Session info passed to provider hooks (refresh, logout, postLoginInit).
71
+ * The provider can read its own providerState from here.
72
+ */
73
+ export interface AuthSessionInfo {
74
+ sessionId: string;
75
+ userId: string;
76
+ providerId: string;
77
+ providerState: unknown;
78
+ expiresAt: Date | null;
79
+ }
80
+ export interface ProtocolCredentialResult {
81
+ baseUrl: string;
82
+ apiKey: string;
83
+ defaultHeaders: Record<string, string>;
84
+ }
85
+ /**
86
+ * The contract that every auth provider must satisfy.
87
+ *
88
+ * Required: id, displayName, presentation, authenticate.
89
+ * Optional: bootstrap, handleCallback, refresh, logout, restoreSession, postLoginInit, getPublicConfig, resolveProtocolCredential.
90
+ */
91
+ export interface AuthProvider {
92
+ /** Unique provider identifier (runtime string, never hardcoded in platform). */
93
+ readonly id: string;
94
+ /** Human-readable name shown in logs and admin UI. */
95
+ readonly displayName: string;
96
+ /** Tells the frontend how to render the login experience. */
97
+ readonly presentation: AuthPresentation;
98
+ /**
99
+ * Called once at startup. Use for provider-level initialization
100
+ * (e.g., validate config, warm up connections).
101
+ */
102
+ bootstrap?(): Promise<void>;
103
+ /**
104
+ * Core: convert credentials into an identity.
105
+ * Must NOT perform business side-effects (MaaS init, model refresh, etc.).
106
+ */
107
+ authenticate(input: AuthenticateInput): Promise<AuthenticateOutcome>;
108
+ /**
109
+ * Handle OAuth/redirect callback (for redirect-mode providers).
110
+ * Called when the user returns from the external auth page.
111
+ */
112
+ handleCallback?(params: Record<string, string>): Promise<AuthenticateOutcome>;
113
+ /**
114
+ * Try to restore a session after server restart.
115
+ * Return an ExternalPrincipal if the session can be recovered, or null.
116
+ */
117
+ restoreSession?(userId: string): Promise<ExternalPrincipal | null>;
118
+ /**
119
+ * Refresh provider credentials before they expire.
120
+ * Return updated principal, or null if refresh is not possible.
121
+ */
122
+ refresh?(session: AuthSessionInfo): Promise<ExternalPrincipal | null>;
123
+ /**
124
+ * Provider-side cleanup on logout (e.g., revoke external tokens).
125
+ */
126
+ logout?(session: AuthSessionInfo): Promise<void>;
127
+ /**
128
+ * Provider-declared post-login initialization.
129
+ * Platform triggers this AFTER session issuance.
130
+ * Failure here does NOT roll back the successful authentication.
131
+ *
132
+ * Use for: MaaS subscription, model refresh, quota allocation, etc.
133
+ */
134
+ postLoginInit?(session: AuthSessionInfo): Promise<void>;
135
+ /**
136
+ * Return provider-specific public config (shown to unauthenticated users).
137
+ * Example: whether a promotion code has been remembered.
138
+ */
139
+ getPublicConfig?(): Promise<Record<string, unknown>>;
140
+ /**
141
+ * Resolve LLM-call credentials for a named protocol.
142
+ * Only implemented by auth providers whose cloud sessions carry model-call
143
+ * credentials (e.g., huawei-cas provides huawei_maas credentials).
144
+ *
145
+ * Platform looks up the session and passes AuthSessionInfo to the provider;
146
+ * the provider reads its own providerState — same pattern as refresh/logout.
147
+ *
148
+ * @returns Credential bundle for LLM API calls, or null if not supported.
149
+ */
150
+ resolveProtocolCredential?(protocol: string, session: AuthSessionInfo): ProtocolCredentialResult | null;
151
+ }
152
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;AAEhE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,eAAe,EAAE,CA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0 +1,16 @@
1
+ /**
2
+ * Auth Plugin API — the contract that third-party auth providers implement.
3
+ *
4
+ * Java analogy:
5
+ * - This file is the `interface AuthProvider` jar.
6
+ * - Third-party packages implement this interface and export an object.
7
+ * - The main project installs the package, sets `.env`, and the runtime loads it.
8
+ *
9
+ * Design constraints (F140):
10
+ * - Provider ID is a runtime string, never an enum/union.
11
+ * - Provider only converts credentials → identity. No session, no middleware, no business logic.
12
+ * - postLoginInit is provider-declared, platform-triggered, failure does not roll back auth.
13
+ * - providerState is opaque to the platform — only the provider interprets it.
14
+ */
15
+ export {};
16
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
@@ -0,0 +1,21 @@
1
+ import type { OfficeClawConfig, OfficeClawConfigEntry } from '@openjiuwen/relay-shared';
2
+ import type { GatewayIdentity } from './identity.js';
3
+ export interface CatalogMemberEntry {
4
+ agentId: string;
5
+ config: OfficeClawConfigEntry;
6
+ readonly extend?: Readonly<Record<string, unknown>>;
7
+ }
8
+ export interface CatalogSnapshot {
9
+ catalog: OfficeClawConfig;
10
+ }
11
+ export interface CatalogProvider {
12
+ readonly id: string;
13
+ readonly displayName?: string;
14
+ readCatalog(identity: GatewayIdentity): Promise<CatalogSnapshot>;
15
+ writeCatalog(identity: GatewayIdentity, catalog: OfficeClawConfig): Promise<void>;
16
+ getMember?(identity: GatewayIdentity, agentId: string): Promise<CatalogMemberEntry | null>;
17
+ listRoutableMembers?(identity: GatewayIdentity): Promise<CatalogMemberEntry[]>;
18
+ bootstrap?(): Promise<void>;
19
+ shutdown?(): Promise<void>;
20
+ }
21
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACxF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACrD;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B,WAAW,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IACjE,YAAY,CAAC,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClF,SAAS,CAAC,CAAC,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC;IAC3F,mBAAmB,CAAC,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAC/E,SAAS,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,QAAQ,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":""}
@@ -0,0 +1,109 @@
1
+ export type EvidenceKind = 'feature' | 'decision' | 'plan' | 'session' | 'lesson' | 'thread' | 'discussion' | 'research';
2
+ export type EvidenceStatus = 'active' | 'done' | 'archived';
3
+ export interface EvidenceItem {
4
+ anchor: string;
5
+ kind: EvidenceKind;
6
+ status: EvidenceStatus;
7
+ title: string;
8
+ summary?: string;
9
+ keywords?: string[];
10
+ sourcePath?: string;
11
+ sourceHash?: string;
12
+ supersededBy?: string;
13
+ materializedFrom?: string;
14
+ updatedAt: string;
15
+ drillDown?: {
16
+ tool: string;
17
+ params: Record<string, string>;
18
+ hint: string;
19
+ };
20
+ }
21
+ export interface Edge {
22
+ fromAnchor: string;
23
+ toAnchor: string;
24
+ relation: 'evolved_from' | 'blocked_by' | 'related' | 'supersedes' | 'invalidates';
25
+ }
26
+ export interface SearchOptions {
27
+ kind?: EvidenceKind;
28
+ status?: EvidenceStatus;
29
+ keywords?: string[];
30
+ limit?: number;
31
+ scope?: 'docs' | 'memory' | 'threads' | 'sessions' | 'all';
32
+ mode?: 'lexical' | 'semantic' | 'hybrid';
33
+ depth?: 'summary' | 'raw';
34
+ }
35
+ export interface RebuildResult {
36
+ docsIndexed: number;
37
+ docsSkipped: number;
38
+ durationMs: number;
39
+ }
40
+ export interface ConsistencyReport {
41
+ ok: boolean;
42
+ docCount: number;
43
+ ftsCount: number;
44
+ mismatches: string[];
45
+ }
46
+ export interface EvidenceStats {
47
+ backend: string;
48
+ healthy: boolean;
49
+ degraded?: boolean;
50
+ docsCount?: number;
51
+ edgesCount?: number;
52
+ lastRebuildAt?: string | null;
53
+ reason?: string;
54
+ }
55
+ export interface EvidenceStore {
56
+ search(query: string, options?: SearchOptions): Promise<EvidenceItem[]>;
57
+ upsert(items: EvidenceItem[]): Promise<void>;
58
+ deleteByAnchor(anchor: string): Promise<void>;
59
+ getByAnchor(anchor: string): Promise<EvidenceItem | null>;
60
+ health(): Promise<boolean>;
61
+ initialize(): Promise<void>;
62
+ stats?(): Promise<EvidenceStats>;
63
+ }
64
+ export interface EvidenceIndex {
65
+ rebuild(options?: {
66
+ force?: boolean;
67
+ }): Promise<RebuildResult>;
68
+ incrementalUpdate(changedPaths: string[]): Promise<void>;
69
+ checkConsistency(): Promise<ConsistencyReport>;
70
+ }
71
+ export interface EvidenceProviderInput {
72
+ sqlitePath?: string;
73
+ docsRoot?: string;
74
+ markersDir?: string;
75
+ transcriptDataDir?: string;
76
+ embed?: Record<string, unknown>;
77
+ threadListFn?: () => Promise<Array<{
78
+ id: string;
79
+ title: string | null;
80
+ participants: string[];
81
+ threadMemory: {
82
+ summary: string;
83
+ } | null;
84
+ lastActiveAt: number;
85
+ featureIds?: string[];
86
+ }>>;
87
+ messageListFn?: (threadId: string, limit?: number) => Promise<Array<{
88
+ id: string;
89
+ content: string;
90
+ agentId?: string;
91
+ threadId: string;
92
+ timestamp: number;
93
+ }>>;
94
+ excludeThreadIdsFn?: () => Promise<Set<string>>;
95
+ }
96
+ export interface EvidenceServices {
97
+ backend: string;
98
+ store: EvidenceStore;
99
+ index?: EvidenceIndex;
100
+ close?(): void | Promise<void>;
101
+ }
102
+ export interface EvidenceProvider {
103
+ readonly id: string;
104
+ readonly displayName?: string;
105
+ createEvidenceServices(input: EvidenceProviderInput): EvidenceServices | Promise<EvidenceServices>;
106
+ bootstrap?(): Promise<void>;
107
+ shutdown?(): Promise<void>;
108
+ }
109
+ //# sourceMappingURL=evidence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evidence.d.ts","sourceRoot":"","sources":["../src/evidence.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,UAAU,GACV,MAAM,GACN,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,YAAY,GACZ,UAAU,CAAC;AAEf,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAE5D,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ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C;IAC5B,QAAQ,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=evidence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evidence.js","sourceRoot":"","sources":["../src/evidence.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Gateway Identity — the minimal identity struct passed through the gateway pipeline.
3
+ * Currently contains only userId; extensible for multi-tenant scenarios.
4
+ */
5
+ export interface GatewayIdentity {
6
+ userId: string;
7
+ }
8
+ //# sourceMappingURL=identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.js","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @openjiuwen/relay-api-server-contracts — Unified plugin contracts for OfficeClaw extensions.
3
+ *
4
+ * Extension points:
5
+ * - Auth: import type { AuthProvider } from '@openjiuwen/relay-api-server-contracts/auth';
6
+ * - Identity: import type { GatewayIdentity } from '@openjiuwen/relay-api-server-contracts/identity';
7
+ * - Storage: import type { OfficeClawStorageProvider } from '@openjiuwen/relay-api-server-contracts/storage';
8
+ */
9
+ export type { AuthenticateFailure, AuthenticateInput, AuthenticateOutcome, AuthenticateResult, AuthFieldOption, AuthFieldSchema, AuthPresentation, AuthPresentationMode, AuthProvider, AuthSessionInfo, ExternalPrincipal, ProtocolCredentialResult, } from './auth.js';
10
+ export type { MetricsProvider, MetricsProviderInput, MetricsReporterConfig } from './metrics.js';
11
+ export type { RuntimeEnvStore } from './runtime-env.js';
12
+ export type { GatewayIdentity } from './identity.js';
13
+ export type { CatalogMemberEntry, CatalogProvider, CatalogSnapshot } from './catalog.js';
14
+ export type { ConsistencyReport, Edge, EvidenceIndex, EvidenceItem, EvidenceKind, EvidenceProvider, EvidenceProviderInput, EvidenceServices, EvidenceStats, EvidenceStatus, EvidenceStore, RebuildResult, SearchOptions, } from './evidence.js';
15
+ export type { DynamicTaskDef, DynamicTaskPort, EmissionPort, EmissionRecord, EmissionRow, GlobalControl, GlobalControlPort, PackTemplateDef, PackTemplatePort, RunLedgerPort, RunLedgerQuery, RunLedgerRecord, RunLedgerRow, RunOutcome, RunStats, SchedulerPersistence, SchedulerProvider, SchedulerProviderInput, TaskOverride, TriggerSpec, } from './scheduler.js';
16
+ export type { TelemetryProvider } from './telemetry-provider.js';
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACjG,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACzF,YAAY,EACV,iBAAiB,EACjB,IAAI,EACJ,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,aAAa,EACb,aAAa,EACb,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,cAAc,EACd,eAAe,EACf,YAAY,EACZ,cAAc,EACd,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,eAAe,EACf,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,YAAY,EACZ,WAAW,GACZ,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Metrics Provider Plugin API — contract for metrics reporter config resolution.
3
+ *
4
+ * The provider resolves cloud-platform credentials into a reporter config
5
+ * (endpoint + token + projectId). The platform core owns the reporter lifecycle
6
+ * (creation, concurrency guard, periodic flush, shutdown).
7
+ */
8
+ export interface MetricsReporterConfig {
9
+ endpoint: string;
10
+ token: string;
11
+ projectId: string;
12
+ }
13
+ export interface MetricsProviderInput {
14
+ providerState: unknown;
15
+ baseUrl: string;
16
+ instanceId?: string;
17
+ log?: {
18
+ info(msg: string): void;
19
+ info(obj: unknown, msg: string): void;
20
+ warn(msg: string): void;
21
+ warn(obj: unknown, msg: string): void;
22
+ error(msg: string): void;
23
+ error(obj: unknown, msg: string): void;
24
+ };
25
+ }
26
+ export interface MetricsProvider {
27
+ readonly id: string;
28
+ readonly displayName?: string;
29
+ bootstrap?(): Promise<void>;
30
+ shutdown?(): Promise<void>;
31
+ resolveReporterConfig(input: MetricsProviderInput): Promise<MetricsReporterConfig | null>;
32
+ }
33
+ //# sourceMappingURL=metrics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../src/metrics.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE;QACJ,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QACtC,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QACtC,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;KACxC,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B,SAAS,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,QAAQ,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3B,qBAAqB,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;CAC3F"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Metrics Provider Plugin API — contract for metrics reporter config resolution.
3
+ *
4
+ * The provider resolves cloud-platform credentials into a reporter config
5
+ * (endpoint + token + projectId). The platform core owns the reporter lifecycle
6
+ * (creation, concurrency guard, periodic flush, shutdown).
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=metrics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics.js","sourceRoot":"","sources":["../src/metrics.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Runtime env contract shared by local API and remote gateway hosts.
3
+ *
4
+ * The store is responsible for:
5
+ * - loading persisted env key/value pairs at startup
6
+ * - persisting explicit runtime updates
7
+ *
8
+ * It is NOT responsible for auth, auditing, reconcile, or hot reload.
9
+ */
10
+ export interface RuntimeEnvStore {
11
+ load(): Promise<Record<string, string>>;
12
+ save(updates: Record<string, string | null>): Promise<void>;
13
+ }
14
+ //# sourceMappingURL=runtime-env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-env.d.ts","sourceRoot":"","sources":["../src/runtime-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACxC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7D"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=runtime-env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-env.js","sourceRoot":"","sources":["../src/runtime-env.ts"],"names":[],"mappings":""}