critiqs-react 0.0.0-stage → 0.3.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/AGENT_SETUP.md +190 -0
- package/LICENSE +21 -0
- package/README.md +341 -2
- package/bin/cli.d.mts +21 -0
- package/bin/cli.mjs +293 -0
- package/bin/critiqs.mjs +4 -0
- package/bin/env.d.mts +41 -0
- package/bin/env.mjs +384 -0
- package/bin/init.d.mts +126 -0
- package/bin/init.mjs +965 -0
- package/bin/mcp.d.mts +20 -0
- package/bin/mcp.mjs +314 -0
- package/bin/setup.d.mts +183 -0
- package/bin/setup.mjs +1054 -0
- package/dist/Critiqs.d.ts +9 -0
- package/dist/backend/convex/_generated/api.d.ts +95 -0
- package/dist/backend/convex/_generated/api.js +23 -0
- package/dist/backend/convex/_generated/dataModel.d.ts +60 -0
- package/dist/backend/convex/_generated/server.d.ts +162 -0
- package/dist/backend/convex/_generated/server.js +101 -0
- package/dist/backend/convex/ai.ts +93 -0
- package/dist/backend/convex/aiSettings.ts +43 -0
- package/dist/backend/convex/auth.config.ts +18 -0
- package/dist/backend/convex/captureHttp.ts +96 -0
- package/dist/backend/convex/captures.ts +167 -0
- package/dist/backend/convex/crons.ts +14 -0
- package/dist/backend/convex/deviceSignIn.ts +151 -0
- package/dist/backend/convex/grouping.ts +41 -0
- package/dist/backend/convex/http.ts +724 -0
- package/dist/backend/convex/lib/ai.ts +6 -0
- package/dist/backend/convex/lib/links.ts +12 -0
- package/dist/backend/convex/lib/pages.ts +207 -0
- package/dist/backend/convex/lib/r2.ts +75 -0
- package/dist/backend/convex/lib/store.ts +509 -0
- package/dist/backend/convex/lib/tokens.ts +101 -0
- package/dist/backend/convex/lib/validators.ts +73 -0
- package/dist/backend/convex/lib/vendor/aws4fetch.js +289 -0
- package/dist/backend/convex/lib/vendor/critiqs_ai.js +49081 -0
- package/dist/backend/convex/lib/vendor/critiqs_core.js +385 -0
- package/dist/backend/convex/lib/vendor/critiqs_server.js +3108 -0
- package/dist/backend/convex/notificationEmails.ts +61 -0
- package/dist/backend/convex/notifications.ts +182 -0
- package/dist/backend/convex/plans.ts +67 -0
- package/dist/backend/convex/projects.ts +46 -0
- package/dist/backend/convex/schema.ts +343 -0
- package/dist/backend/convex/search.ts +26 -0
- package/dist/backend/convex/signIn.ts +368 -0
- package/dist/backend/convex/tags.ts +68 -0
- package/dist/backend/convex/threads.ts +146 -0
- package/dist/backend/convex/users.ts +13 -0
- package/dist/constants.d.ts +4 -0
- package/dist/core/types.d.ts +72 -0
- package/dist/host.d.ts +66 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +8076 -0
- package/dist/server/chunks/driver-n9zpr0k3.js +21 -0
- package/dist/server/chunks/index-9bg7tmnq.js +522 -0
- package/dist/server/chunks/index-askcfn7t.js +148 -0
- package/dist/server/chunks/providers-rv184xvj.js +48444 -0
- package/dist/server/chunks/token-kzddms7r.js +63 -0
- package/dist/server/chunks/token-util-k8bee1wc.js +4 -0
- package/dist/server/index.d.ts +87 -0
- package/dist/server/index.js +4889 -0
- package/package.json +77 -4
package/dist/host.d.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { Scope, ViewState } from "./core/types.js";
|
|
2
|
+
/** What the prototype reports about the view a reviewer is looking at. */
|
|
3
|
+
export interface HostContext {
|
|
4
|
+
/** Logical page, such as `user-details`. Defaults to the URL path. */
|
|
5
|
+
screen?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Tab, dialog, step, or filters needed to reveal elements. Report each key
|
|
8
|
+
* whenever its part of the app is shown, with null when nothing is open, so
|
|
9
|
+
* every thread names its whole view. A key an older thread lacks is left to
|
|
10
|
+
* `restoreContext` once it has run.
|
|
11
|
+
*/
|
|
12
|
+
viewState?: ViewState;
|
|
13
|
+
/** Demo person or role shown in the prototype. Context only, never the author. */
|
|
14
|
+
persona?: string | null;
|
|
15
|
+
}
|
|
16
|
+
/** Asks the prototype to show a thread's view again. */
|
|
17
|
+
export interface RestoreRequest {
|
|
18
|
+
threadId: string;
|
|
19
|
+
screen: string;
|
|
20
|
+
viewState: ViewState;
|
|
21
|
+
/** Record the target belongs to. Shared feedback may keep the current record. */
|
|
22
|
+
recordKey: string | null;
|
|
23
|
+
scope: Scope;
|
|
24
|
+
/**
|
|
25
|
+
* Aborted when the reviewer moves on (another thread, Back, sign-out). A
|
|
26
|
+
* host that restores asynchronously should stop navigating once aborted.
|
|
27
|
+
*/
|
|
28
|
+
signal: AbortSignal;
|
|
29
|
+
}
|
|
30
|
+
export interface CritiqsProps {
|
|
31
|
+
/**
|
|
32
|
+
* The Critiqs project for this prototype. Without it, the sidebar shows
|
|
33
|
+
* project setup, unless `requireProjectId` is set.
|
|
34
|
+
*/
|
|
35
|
+
projectId?: string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Show Critiqs only where `projectId` is a valid project ID, such as one read
|
|
38
|
+
* from a deployment's environment variable. Without one, Critiqs renders
|
|
39
|
+
* nothing, contacts no backend, and never uses a project remembered in the
|
|
40
|
+
* browser. Problems with the configured project are reported in the browser
|
|
41
|
+
* console rather than shown to visitors.
|
|
42
|
+
*/
|
|
43
|
+
requireProjectId?: boolean;
|
|
44
|
+
/** A team's own Convex deployment URL. Defaults to Critiqs's hosted service. */
|
|
45
|
+
backend?: string;
|
|
46
|
+
/** Prototype version, such as a release label or Git commit, recorded with each message. */
|
|
47
|
+
version?: string;
|
|
48
|
+
/** Reports the current screen, view state, and demo persona. */
|
|
49
|
+
getContext?: () => HostContext;
|
|
50
|
+
/**
|
|
51
|
+
* Shows a thread's view: navigate, select tabs, open dialogs, and scroll
|
|
52
|
+
* rows into view, under the current reviewer's access. Return `false` when
|
|
53
|
+
* the view cannot be shown, for example to protect unsaved work. Called
|
|
54
|
+
* unless `getContext` already reports the thread's screen and view state.
|
|
55
|
+
* Afterwards Critiqs waits up to three seconds for `getContext` to report
|
|
56
|
+
* them and for the target to appear; return a promise to wait for slower
|
|
57
|
+
* content first. Never replay clicks that could submit or change data.
|
|
58
|
+
*/
|
|
59
|
+
restoreContext?: (request: RestoreRequest) => void | boolean | Promise<void | boolean>;
|
|
60
|
+
}
|
|
61
|
+
export interface ResolvedContext {
|
|
62
|
+
screen: string;
|
|
63
|
+
viewState: ViewState;
|
|
64
|
+
persona: string | null;
|
|
65
|
+
}
|
|
66
|
+
export declare function readContext(getContext: CritiqsProps["getContext"]): ResolvedContext;
|
package/dist/index.d.ts
ADDED