@unson/brainbase-mcp 0.43.0 → 0.44.1
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/contracts/canonical-task/operation-schema.sql +58 -0
- package/contracts/canonical-task/search-indexes.sql +10 -0
- package/contracts/canonical-task/store-schema.sql +77 -0
- package/dist/automation-run.d.ts +213 -0
- package/dist/automation-run.js +479 -0
- package/dist/canonical-task-operations.d.ts +205 -0
- package/dist/canonical-task-operations.js +700 -0
- package/dist/canonical-task-postgres.d.ts +139 -0
- package/dist/canonical-task-postgres.js +554 -0
- package/dist/canonical-task-service.d.ts +13 -0
- package/dist/canonical-task-service.js +55 -3
- package/dist/canonical-task-store-config.d.ts +31 -0
- package/dist/canonical-task-store-config.js +53 -0
- package/dist/config-parser.d.ts +298 -0
- package/dist/config-parser.js +593 -0
- package/dist/connected-onboarding.d.ts +57 -0
- package/dist/connected-onboarding.js +37 -0
- package/dist/durable-wait-http.d.ts +3 -1
- package/dist/durable-wait-http.js +73 -6
- package/dist/durable-waits.d.ts +93 -3
- package/dist/durable-waits.js +320 -8
- package/dist/honcho.d.ts +25 -0
- package/dist/honcho.js +81 -0
- package/dist/judgment-event-adapter.d.ts +72 -0
- package/dist/judgment-event-adapter.js +114 -0
- package/dist/judgment-event-outbox.d.ts +182 -0
- package/dist/judgment-event-outbox.js +568 -0
- package/dist/judgment-execution-outcome.d.ts +46 -0
- package/dist/judgment-execution-outcome.js +149 -0
- package/dist/judgment-host.d.ts +18 -7
- package/dist/judgment-host.js +82 -34
- package/dist/judgment-lifecycle-core.d.ts +198 -0
- package/dist/judgment-lifecycle-core.js +464 -0
- package/dist/judgment-node-evidence.d.ts +57 -0
- package/dist/judgment-node-evidence.js +297 -0
- package/dist/judgment-runtime-resolution.d.ts +264 -0
- package/dist/judgment-runtime-resolution.js +1248 -0
- package/dist/judgment-runtime-resolution.public.d.ts +255 -0
- package/dist/knowledge-event.d.ts +28 -0
- package/dist/knowledge-event.js +114 -0
- package/dist/mcp-runtime.d.ts +75 -0
- package/dist/mcp-runtime.js +188 -0
- package/dist/meeting-automation-runtime.d.ts +102 -0
- package/dist/meeting-automation-runtime.js +249 -0
- package/dist/meeting-automation.d.ts +155 -0
- package/dist/meeting-automation.js +341 -0
- package/dist/meeting-minutes-context-receipt.d.ts +91 -0
- package/dist/meeting-minutes-context-receipt.js +280 -0
- package/dist/meeting-source-sync.d.ts +89 -0
- package/dist/meeting-source-sync.js +230 -0
- package/dist/mesh.d.ts +58 -0
- package/dist/mesh.js +134 -0
- package/dist/onboarding-runtime.d.ts +47 -0
- package/dist/onboarding-runtime.js +4719 -0
- package/dist/routine-cycle.d.ts +51 -0
- package/dist/routine-cycle.js +153 -0
- package/dist/routine-liveness.d.ts +49 -0
- package/dist/routine-liveness.js +227 -0
- package/dist/routine-runtime.d.ts +101 -0
- package/dist/routine-runtime.js +237 -0
- package/dist/routines.d.ts +3 -0
- package/dist/routines.js +3 -0
- package/dist/run-receipt.d.ts +40 -0
- package/dist/run-receipt.js +635 -0
- package/dist/runtime-host.d.ts +64 -0
- package/dist/runtime-host.js +70 -0
- package/dist/world-work.d.ts +16 -0
- package/package.json +115 -3
- package/ui/meeting-minutes.css +122 -0
- package/ui/meeting-minutes.js +316 -0
- package/ui/objective-editor.js +47 -11
- package/ui/world/world-district.js +18 -3
- package/ui/world/world-placement.js +13 -0
- package/ui/world/world-work-rail.js +7 -1
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
type JsonRecord = Record<string, unknown>;
|
|
2
|
+
export interface CanonicalTaskPgQueryResult {
|
|
3
|
+
rows: any[];
|
|
4
|
+
rowCount?: number | null;
|
|
5
|
+
}
|
|
6
|
+
export interface CanonicalTaskPgClient {
|
|
7
|
+
query(text: string, values?: unknown[]): Promise<CanonicalTaskPgQueryResult>;
|
|
8
|
+
release?(): void;
|
|
9
|
+
}
|
|
10
|
+
/** A node-postgres compatible pool. `connect` is needed for guarded updates. */
|
|
11
|
+
export interface CanonicalTaskPgPool extends CanonicalTaskPgClient {
|
|
12
|
+
connect?(): Promise<CanonicalTaskPgClient>;
|
|
13
|
+
}
|
|
14
|
+
/** Identifies rows imported from an earlier table. Tenant configuration, never a default. */
|
|
15
|
+
export interface CanonicalTaskLegacyIdentity {
|
|
16
|
+
baseId: string;
|
|
17
|
+
tableId: string;
|
|
18
|
+
}
|
|
19
|
+
export interface CanonicalTaskTaskLocator {
|
|
20
|
+
column: 'id' | 'legacy_nocodb_id';
|
|
21
|
+
value: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Host-supplied visibility for list and search. It reads the filters the
|
|
25
|
+
* host policy put there (for example a verified organization scope) and
|
|
26
|
+
* returns one SQL condition over `canonical_tasks`, or null. `param` appends a
|
|
27
|
+
* value and returns its placeholder. The adapter does not interpret it.
|
|
28
|
+
*/
|
|
29
|
+
export type CanonicalTaskScopeCondition = (input: {
|
|
30
|
+
filters: JsonRecord;
|
|
31
|
+
param: (value: unknown) => string;
|
|
32
|
+
}) => string | null | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Checked inside the transaction that holds the Task row lock, before an
|
|
35
|
+
* update that completes a Task or changes its completion contract. A host
|
|
36
|
+
* whose typed children (for example agent delegations) take the same row lock
|
|
37
|
+
* can refuse the mutation by throwing; the error reaches the caller unchanged.
|
|
38
|
+
*/
|
|
39
|
+
export interface CanonicalTaskMutationGuard {
|
|
40
|
+
check(input: {
|
|
41
|
+
client: CanonicalTaskPgClient;
|
|
42
|
+
rowId: string;
|
|
43
|
+
patch: JsonRecord;
|
|
44
|
+
completes: boolean;
|
|
45
|
+
changesCompletionContract: boolean;
|
|
46
|
+
}): Promise<void>;
|
|
47
|
+
}
|
|
48
|
+
export interface CanonicalTaskPostgresRepositoryOptions {
|
|
49
|
+
pool: CanonicalTaskPgPool;
|
|
50
|
+
schemaVersion: string;
|
|
51
|
+
idSecret: string;
|
|
52
|
+
legacyIdentity?: CanonicalTaskLegacyIdentity | null;
|
|
53
|
+
webBaseUrl?: string | null;
|
|
54
|
+
scopeCondition?: CanonicalTaskScopeCondition | null;
|
|
55
|
+
mutationGuard?: CanonicalTaskMutationGuard | null;
|
|
56
|
+
/** Error codes a mutation guard may raise that must pass through unwrapped. */
|
|
57
|
+
passthroughErrorCodes?: Iterable<string>;
|
|
58
|
+
}
|
|
59
|
+
export interface CanonicalTaskPurposeLabels {
|
|
60
|
+
labels: Array<{
|
|
61
|
+
purpose_label: string;
|
|
62
|
+
task_count: number;
|
|
63
|
+
}>;
|
|
64
|
+
truncated: boolean;
|
|
65
|
+
}
|
|
66
|
+
export declare function encodeCanonicalTaskCursor(offset: number): string;
|
|
67
|
+
export declare function decodeCanonicalTaskCursor(cursor: unknown): number;
|
|
68
|
+
/** The disabled backend: every operation reports that no store is configured. */
|
|
69
|
+
export declare class CanonicalTaskUnavailableRepository {
|
|
70
|
+
private unavailable;
|
|
71
|
+
assertAvailable(): never;
|
|
72
|
+
list(): never;
|
|
73
|
+
search(): never;
|
|
74
|
+
get(): never;
|
|
75
|
+
findByIdempotencyKey(): never;
|
|
76
|
+
create(): never;
|
|
77
|
+
update(): never;
|
|
78
|
+
delete(): never;
|
|
79
|
+
listPurposeLabels(): never;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* PostgreSQL persistence for Canonical Tasks (`canonical_tasks`, see
|
|
83
|
+
* `contracts/canonical-task/store-schema.sql`).
|
|
84
|
+
*
|
|
85
|
+
* Task IDs are opaque HMAC-signed `ct1.` tokens. The adapter does not decide
|
|
86
|
+
* who may see a Task: list/search visibility comes from the host's
|
|
87
|
+
* `scopeCondition`, and authorization stays in the service policy.
|
|
88
|
+
*/
|
|
89
|
+
export declare class CanonicalTaskPostgresRepository {
|
|
90
|
+
/**
|
|
91
|
+
* PostgreSQL is a durable mutation boundary. Services must bind it to the
|
|
92
|
+
* persisted release readiness gate before exposing mutations.
|
|
93
|
+
*/
|
|
94
|
+
readonly requiresReadiness = true;
|
|
95
|
+
readonly pool: CanonicalTaskPgPool;
|
|
96
|
+
readonly schemaVersion: string;
|
|
97
|
+
readonly legacyIdentity: CanonicalTaskLegacyIdentity | null;
|
|
98
|
+
readonly webBaseUrl: string | null;
|
|
99
|
+
private readonly idSecret;
|
|
100
|
+
private readonly scopeCondition;
|
|
101
|
+
private readonly mutationGuard;
|
|
102
|
+
private readonly passthroughErrorCodes;
|
|
103
|
+
constructor(options: CanonicalTaskPostgresRepositoryOptions);
|
|
104
|
+
private sign;
|
|
105
|
+
private encodePayload;
|
|
106
|
+
/** The public ID of a stored row. */
|
|
107
|
+
encodeTaskId(row: {
|
|
108
|
+
id?: unknown;
|
|
109
|
+
legacy_nocodb_id?: unknown;
|
|
110
|
+
}): string;
|
|
111
|
+
/** The stored row a public ID names. A tampered or foreign ID is task_not_found. */
|
|
112
|
+
decodeTaskLocator(taskId: unknown): CanonicalTaskTaskLocator;
|
|
113
|
+
normalize(row: JsonRecord | null | undefined): JsonRecord | null;
|
|
114
|
+
/** Store failures become task_store_unavailable; meaningful errors pass through. */
|
|
115
|
+
private unavailable;
|
|
116
|
+
query(text: string, values?: unknown[]): Promise<CanonicalTaskPgQueryResult>;
|
|
117
|
+
withTransaction<T>(callback: (client: CanonicalTaskPgClient) => Promise<T>): Promise<T>;
|
|
118
|
+
private rejectStorageScope;
|
|
119
|
+
private visibility;
|
|
120
|
+
list(filters?: JsonRecord, storageScope?: string): Promise<JsonRecord>;
|
|
121
|
+
search(filters?: JsonRecord, storageScope?: string): Promise<JsonRecord>;
|
|
122
|
+
get(taskId: string, storageScope?: string): Promise<JsonRecord | null>;
|
|
123
|
+
/** Tasks one meeting run created in one project, matched on the source reference. */
|
|
124
|
+
listByMeetingMinutesRun({ projectCode, runId, limit }?: {
|
|
125
|
+
projectCode?: unknown;
|
|
126
|
+
runId?: unknown;
|
|
127
|
+
limit?: number;
|
|
128
|
+
}): Promise<(JsonRecord | null)[]>;
|
|
129
|
+
findByIdempotencyKey(key: string, storageScope?: string): Promise<JsonRecord | null>;
|
|
130
|
+
create(input: JsonRecord, storageScope?: string): Promise<JsonRecord>;
|
|
131
|
+
update(taskId: string, patch: JsonRecord, storageScope?: string): Promise<JsonRecord>;
|
|
132
|
+
listPurposeLabels({ projectCode, assigneePersonId, limit }: {
|
|
133
|
+
projectCode: string;
|
|
134
|
+
assigneePersonId?: string | null;
|
|
135
|
+
limit?: number;
|
|
136
|
+
}): Promise<CanonicalTaskPurposeLabels>;
|
|
137
|
+
delete(taskId: string, expectedVersion: number, storageScope?: string): Promise<void>;
|
|
138
|
+
}
|
|
139
|
+
export {};
|