@notis_ai/cli 0.2.32 → 0.2.34
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 +75 -11
- package/dist/agent-hooks/notis-agent-hook.mjs +4407 -905
- package/dist/base-skills/notis-cli/.notis-base-skill.json +1 -1
- package/dist/base-skills/notis-cli/SKILL.md +7 -3
- package/dist/base-skills/notis-spaces/.notis-base-skill.json +1 -1
- package/dist/base-skills/notis-spaces/SKILL.md +5 -3
- package/dist/base-skills/notis-spaces/references/comments.md +102 -0
- package/dist/base-skills/notis-spaces/references/context.md +20 -19
- package/dist/base-skills/notis-spaces/references/design.md +3 -2
- package/dist/base-skills/notis-spaces/references/sdk.md +135 -83
- package/dist/base-skills/notis-spaces/references/store.md +24 -1
- package/dist/sdk/src/components/NotisSelectionBoundary.tsx +13 -5
- package/dist/sdk/src/components/SelectionActionBar.tsx +45 -8
- package/dist/sdk/src/components/SpaceTextComments.tsx +293 -0
- package/dist/sdk/src/components/selectionRange.ts +65 -0
- package/dist/sdk/src/config.ts +3 -1
- package/dist/sdk/src/functions.ts +218 -0
- package/dist/sdk/src/hooks/useAgentQueue.ts +17 -28
- package/dist/sdk/src/hooks/useCollectionInteractions.ts +66 -9
- package/dist/sdk/src/hooks/useConnection.ts +102 -0
- package/dist/sdk/src/hooks/useFunction.ts +42 -0
- package/dist/sdk/src/hooks/useNotisSettings.ts +101 -0
- package/dist/sdk/src/index.ts +16 -4
- package/dist/sdk/src/interactions/shortcuts.tsx +6 -1
- package/dist/sdk/src/interactions/swipeDownToDismiss.ts +158 -0
- package/dist/sdk/src/interactions/textBoxTwoState.ts +174 -0
- package/dist/sdk/src/interactions.ts +17 -0
- package/dist/sdk/src/runtime.ts +16 -1
- package/dist/sdk/src/space.ts +401 -33
- package/dist/sdk/src/ui/comments/passageModel.ts +99 -0
- package/dist/sdk/src/ui/comments/textHighlights.ts +33 -0
- package/dist/skill-sync/index.js +262 -31
- package/dist/skill-sync-worker.mjs +515 -127
- package/dist/space-harness/host.js +389 -154
- package/dist/space-sdk/dist/chunk-3NPBCE6E.js +3 -0
- package/dist/space-sdk/dist/index.js +3 -3
- package/dist/space-sdk/dist/ui.js +16 -11
- package/dist/space-sdk/src/config.ts +3 -1
- package/dist/space-sdk/src/functions.ts +218 -0
- package/dist/space-sdk/src/hooks/useAgentQueue.d.ts +2 -13
- package/dist/space-sdk/src/hooks/useCollectionInteractions.d.ts +7 -0
- package/dist/space-sdk/src/hooks/useConnection.d.ts +42 -0
- package/dist/space-sdk/src/hooks/useFunction.d.ts +20 -0
- package/dist/space-sdk/src/hooks/useNotisSettings.d.ts +48 -0
- package/dist/space-sdk/src/index.d.ts +10 -4
- package/dist/space-sdk/src/interactions/shortcuts.d.ts +5 -0
- package/dist/space-sdk/src/runtime.d.ts +14 -1
- package/dist/space-sdk/src/space.ts +401 -33
- package/dist/space-sdk/src/tailwind-candidates.d.ts +400 -204
- package/dist/space-sdk/src/ui/comments/CommentPane.d.ts +90 -15
- package/dist/space-sdk/src/ui/comments/PassageComments.d.ts +4 -1
- package/dist/space-sdk/src/ui/comments/agentRuntime.d.ts +4 -2
- package/dist/space-sdk/src/ui/comments/commentDrafts.d.ts +63 -0
- package/dist/space-sdk/src/ui/comments/commentModel.d.ts +59 -88
- package/dist/space-sdk/src/ui/comments/commentWords.d.ts +32 -1
- package/dist/space-sdk/src/ui/comments/handover.d.ts +34 -0
- package/dist/space-sdk/src/ui/comments/hostComments.d.ts +13 -9
- package/dist/space-sdk/src/ui/comments/hostPanel.d.ts +113 -0
- package/dist/space-sdk/src/ui/comments/index.d.ts +7 -2
- package/dist/space-sdk/src/ui/comments/paneOutlet.d.ts +33 -0
- package/dist/space-sdk/src/ui/comments/paneParts.d.ts +71 -27
- package/dist/space-sdk/src/ui/comments/passageModel.d.ts +12 -36
- package/dist/space-sdk/src/ui/comments/reviewRun.d.ts +190 -0
- package/dist/space-sdk/src/ui/comments/useCommentRouting.d.ts +26 -4
- package/dist/space-sdk/src/ui/comments/useComments.d.ts +116 -77
- package/dist/space-sdk/src/ui/comments/usePassageComments.d.ts +8 -4
- package/dist/space-sdk/src/ui/index.d.ts +1 -1
- package/dist/space-sdk/src/ui/layout/SidePane.d.ts +3 -4
- package/dist/space-sdk/src/ui/period/dateFormat.d.ts +27 -8
- package/dist/view-renderer/dist/host.js +450 -215
- package/package.json +3 -3
- package/skills/notis-cli/AGENT_INSTRUCTIONS.md +2 -2
- package/skills/notis-spaces/cli.md +3 -3
- package/src/cli.js +2 -1
- package/src/command-specs/index.js +3 -0
- package/src/command-specs/repository-secrets.js +171 -0
- package/src/command-specs/spaces.js +3 -3
- package/src/runtime/agent-credential.js +175 -0
- package/src/runtime/agent-identity.js +95 -19
- package/src/runtime/app-platform.js +8 -0
- package/src/runtime/auth-recovery.js +14 -0
- package/src/runtime/profiles.js +74 -2
- package/src/runtime/skill-sync/cloud-client.ts +33 -3
- package/src/runtime/skill-sync/index.ts +4 -3
- package/src/runtime/skill-sync/symlink-manager.ts +354 -35
- package/src/runtime/skill-sync/types.ts +14 -2
- package/src/runtime/space-functions.js +213 -0
- package/src/runtime/space-platform.js +12 -3
- package/src/runtime/space-source.js +116 -13
- package/src/runtime/space-test-server.js +22 -4
- package/src/runtime/space-verification.js +3 -1
- package/src/runtime/transport.js +15 -0
- package/dist/sdk/src/components/NotisCommentBoundary.tsx +0 -132
- package/dist/space-sdk/dist/chunk-I4Z4UFGB.js +0 -3
- package/dist/space-sdk/src/components/NotisCommentBoundary.d.ts +0 -26
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { defineSpace, defineSpaces } from './space';
|
|
2
|
-
export type { SpaceDefinition, SpacesWorkspace, SpaceActionTemplate, SpaceResourceReference, SpaceDatabaseCreate } from './space';
|
|
2
|
+
export type { SpaceDefinition, SpacesWorkspace, SpaceActionTemplate, SpaceResourceReference, SpaceDatabaseCreate, SpaceStore } from './space';
|
|
3
3
|
export type { SpaceViewParam, SpaceViewParamType, SpaceShows, SpaceMemoryPolicy, SpaceMemorySnapshot, SpaceChrome, SpaceMarkdownInput } from './space';
|
|
4
|
+
export { threadHookInput, threadIdleInput, threadSettleInput, commentOptionInput } from './functions';
|
|
5
|
+
export type { SpaceFunctionDeclaration, SpaceFunctionHandler, SpaceFunctionContext } from './functions';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* Configuration utilities for notis.config.ts and Space definitions.
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Space functions: server code a Space declares once in `defineSpace({ functions })` and Notis calls from the
|
|
3
|
+
* Space's views (`useFunction`), its HTTP API and MCP server, Notis agents, thread items, thread hooks and comment
|
|
4
|
+
* options. A handler never reaches the browser, has no network and no secrets, and reaches only what `uses` lists.
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* // space.config.ts
|
|
8
|
+
* functions: {
|
|
9
|
+
* count_open: {
|
|
10
|
+
* description: 'Count the open pull requests of a repository.',
|
|
11
|
+
* kind: 'read',
|
|
12
|
+
* input: { type: 'object', additionalProperties: false, required: ['repo'], properties: { repo: { type: 'string' } } },
|
|
13
|
+
* expose: ['page', 'api', 'agents'],
|
|
14
|
+
* access: ['viewer', 'editor', 'key'],
|
|
15
|
+
* uses: { actions: ['list_pull_requests'] },
|
|
16
|
+
* handler: './functions/count-open.ts',
|
|
17
|
+
* },
|
|
18
|
+
* },
|
|
19
|
+
*
|
|
20
|
+
* // functions/count-open.ts
|
|
21
|
+
* import type { SpaceFunctionHandler } from '@notis/sdk';
|
|
22
|
+
* const handler: SpaceFunctionHandler<{ repo: string }, { open: number }> = async (input, ctx) => {
|
|
23
|
+
* const pulls = await ctx.actions.list_pull_requests({ repo: input.repo }) as { items: unknown[] };
|
|
24
|
+
* return { open: pulls.items.length };
|
|
25
|
+
* };
|
|
26
|
+
* export default handler;
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* A handler module imports types only from `@notis/sdk`: the SDK's code is for the page, not for functions.
|
|
30
|
+
*/
|
|
31
|
+
import type { SpaceCloudComputerLevel, SpaceThreadItemText } from './space';
|
|
32
|
+
|
|
33
|
+
/** What a call does: `read` changes nothing, `write` changes this Space's data, `action` reaches further. */
|
|
34
|
+
export type SpaceFunctionKind = 'read' | 'write' | 'action';
|
|
35
|
+
/** The ways in from outside the Space's own declarations: its views, its API and MCP server, Notis agents. */
|
|
36
|
+
export type SpaceFunctionExposure = 'page' | 'api' | 'agents';
|
|
37
|
+
/** Who may call: a Site or link visitor, a signed-in person who can open the Space, an editor, a Space key. */
|
|
38
|
+
export type SpaceFunctionRole = 'public' | 'viewer' | 'editor' | 'key';
|
|
39
|
+
/** Notis's built-in thread actions a function may run, only on a thread one of the Space's items is attached to. */
|
|
40
|
+
export type SpaceThreadOperation = 'archive' | 'unarchive' | 'read' | 'unread' | 'star' | 'unstar' | 'later' | 'back';
|
|
41
|
+
/** The built-in thread actions a Space can follow with a function (`threadHooks`). */
|
|
42
|
+
export type SpaceThreadHookEvent = SpaceThreadOperation | 'delete' | 'idle';
|
|
43
|
+
|
|
44
|
+
export interface SpaceFunctionUses {
|
|
45
|
+
/** This Space's declared `actions`, run through the sealed action pipeline with the caller as the actor. */
|
|
46
|
+
actions?: string[];
|
|
47
|
+
/** The caller's own cloud computer, at most the level the Space declares, once that person allowed it. */
|
|
48
|
+
cloudComputer?: SpaceCloudComputerLevel;
|
|
49
|
+
/** Built-in thread actions on a thread holding one of this Space's items. Needs `threadItems`. */
|
|
50
|
+
threads?: SpaceThreadOperation[];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface SpaceFunctionDeclaration {
|
|
54
|
+
/** What the function does and when to call it: agents read it as the tool's description. */
|
|
55
|
+
description: string;
|
|
56
|
+
kind: SpaceFunctionKind;
|
|
57
|
+
/** A closed object schema (`additionalProperties: false`), checked before the handler runs. */
|
|
58
|
+
input: { type: 'object'; additionalProperties: false; properties?: Record<string, unknown>; required?: readonly string[];
|
|
59
|
+
[key: string]: unknown };
|
|
60
|
+
/** Checked on what the handler returns, and given to agents as the tool's output schema. */
|
|
61
|
+
output?: Record<string, unknown>;
|
|
62
|
+
/** Default: none. A closed function still runs from this Space's thread items, thread hooks and comment options. */
|
|
63
|
+
expose?: SpaceFunctionExposure[];
|
|
64
|
+
/** Default: editors only. The handler reads the caller's role in `ctx.caller.role`. */
|
|
65
|
+
access?: SpaceFunctionRole[];
|
|
66
|
+
/** Everything the handler can reach. Undeclared: the handler only computes. */
|
|
67
|
+
uses?: SpaceFunctionUses;
|
|
68
|
+
/** Source-relative module whose default export is the handler. */
|
|
69
|
+
handler: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** A comment option that runs a function when a person answers a choice comment with it (`commentOptions`). */
|
|
73
|
+
export interface SpaceCommentOption {
|
|
74
|
+
/** The option as people read it; an agent offers it by writing this label in a choice comment's options. */
|
|
75
|
+
label: SpaceThreadItemText;
|
|
76
|
+
/** A function whose `input` is `commentOptionInput`. */
|
|
77
|
+
function: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** The `input` of a function a thread hook runs (`threadHooks`): copy it as written. */
|
|
81
|
+
export const threadHookInput = {
|
|
82
|
+
type: 'object', additionalProperties: false, required: ['event', 'thread', 'items', 'actor'],
|
|
83
|
+
properties: {
|
|
84
|
+
event: { type: 'string', enum: ['archive', 'unarchive', 'read', 'unread', 'star', 'unstar', 'later', 'back', 'delete'] },
|
|
85
|
+
actor: { type: 'string', enum: ['person', 'agent', 'notis'] },
|
|
86
|
+
thread: { type: 'object', additionalProperties: false, required: ['id', 'thread_id'], properties: {
|
|
87
|
+
id: { type: 'string' }, thread_id: { type: 'string' }, title: { type: ['string', 'null'] },
|
|
88
|
+
archived: { type: 'boolean' }, starred: { type: 'boolean' }, read: { type: 'boolean' },
|
|
89
|
+
later_until: { type: ['string', 'null'] } } },
|
|
90
|
+
items: { type: 'array', items: { type: 'object', additionalProperties: false,
|
|
91
|
+
required: ['id', 'kind', 'inputs'], properties: {
|
|
92
|
+
id: { type: 'string' }, kind: { type: 'string' }, inputs: { type: 'object' },
|
|
93
|
+
state: { type: ['string', 'null'] }, title: { type: ['string', 'null'] },
|
|
94
|
+
url: { type: ['string', 'null'] } } } },
|
|
95
|
+
},
|
|
96
|
+
} satisfies SpaceFunctionDeclaration['input'];
|
|
97
|
+
|
|
98
|
+
/** Input for the idle hook after the thread finishes its current work. */
|
|
99
|
+
export const threadIdleInput = {
|
|
100
|
+
...threadHookInput,
|
|
101
|
+
required: [...threadHookInput.required, 'run_id'],
|
|
102
|
+
properties: {
|
|
103
|
+
...threadHookInput.properties,
|
|
104
|
+
event: { type: 'string', enum: ['idle'] },
|
|
105
|
+
run_id: { type: 'string' },
|
|
106
|
+
},
|
|
107
|
+
} satisfies SpaceFunctionDeclaration['input'];
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The `input` of the function a thread item kind settles with (`threadItems.<kind>.settle`): copy it as written.
|
|
111
|
+
* Notis runs it once when an item of that kind first reaches a final state, with the item and its thread.
|
|
112
|
+
*/
|
|
113
|
+
export const threadSettleInput = {
|
|
114
|
+
type: 'object', additionalProperties: false, required: ['item', 'thread'],
|
|
115
|
+
properties: {
|
|
116
|
+
item: { type: 'object', additionalProperties: false, required: ['id', 'kind', 'inputs'], properties: {
|
|
117
|
+
id: { type: 'string' }, kind: { type: 'string' }, inputs: { type: 'object' },
|
|
118
|
+
state: { type: ['string', 'null'] }, title: { type: ['string', 'null'] },
|
|
119
|
+
url: { type: ['string', 'null'] } } },
|
|
120
|
+
thread: { type: 'object', additionalProperties: false, required: ['id', 'thread_id'], properties: {
|
|
121
|
+
id: { type: 'string' }, thread_id: { type: 'string' }, title: { type: ['string', 'null'] },
|
|
122
|
+
archived: { type: 'boolean' }, starred: { type: 'boolean' }, read: { type: 'boolean' },
|
|
123
|
+
later_until: { type: ['string', 'null'] } } },
|
|
124
|
+
},
|
|
125
|
+
} satisfies SpaceFunctionDeclaration['input'];
|
|
126
|
+
|
|
127
|
+
/** The `input` of a function a comment option runs (`commentOptions`): copy it as written. */
|
|
128
|
+
export const commentOptionInput = {
|
|
129
|
+
type: 'object', additionalProperties: false, required: ['option', 'comment'],
|
|
130
|
+
properties: {
|
|
131
|
+
option: { type: 'string' },
|
|
132
|
+
comment: { type: 'object', additionalProperties: false, required: ['id'], properties: {
|
|
133
|
+
id: { type: 'string' }, body: { type: 'string' }, view: { type: ['string', 'null'] },
|
|
134
|
+
page_key: { type: ['string', 'null'] },
|
|
135
|
+
anchor_keys: { type: 'array', items: { type: 'string' } } } },
|
|
136
|
+
},
|
|
137
|
+
} satisfies SpaceFunctionDeclaration['input'];
|
|
138
|
+
|
|
139
|
+
/** One of the Space's items on a thread, as a hook or an item action receives it. */
|
|
140
|
+
export interface SpaceFunctionThreadItem {
|
|
141
|
+
id: string; kind: string; inputs: Record<string, unknown>;
|
|
142
|
+
state?: string | null; title?: string | null; url?: string | null;
|
|
143
|
+
}
|
|
144
|
+
/** A thread as a function sees it. `id` is what `ctx.threads` takes. */
|
|
145
|
+
export interface SpaceFunctionThread {
|
|
146
|
+
id: string; thread_id: string; title?: string | null;
|
|
147
|
+
archived?: boolean; starred?: boolean; read?: boolean; later_until?: string | null;
|
|
148
|
+
}
|
|
149
|
+
/** What a thread hook's function receives: the built-in action that just happened, and who did it. */
|
|
150
|
+
export interface SpaceThreadHookInput {
|
|
151
|
+
event: Exclude<SpaceThreadHookEvent, 'idle'>;
|
|
152
|
+
/** The person, one of their agents, or Notis itself (an automatic change, or another function's thread action). */
|
|
153
|
+
actor: 'person' | 'agent' | 'notis';
|
|
154
|
+
thread: SpaceFunctionThread;
|
|
155
|
+
/** This Space's items attached to the thread. */
|
|
156
|
+
items: SpaceFunctionThreadItem[];
|
|
157
|
+
}
|
|
158
|
+
export interface SpaceThreadIdleInput extends Omit<SpaceThreadHookInput, 'event'> {
|
|
159
|
+
event: 'idle';
|
|
160
|
+
run_id: string;
|
|
161
|
+
}
|
|
162
|
+
/** What a thread item kind's settle function receives: the item that reached a final state, and its thread. */
|
|
163
|
+
export interface SpaceThreadSettleInput {
|
|
164
|
+
item: SpaceFunctionThreadItem;
|
|
165
|
+
thread: SpaceFunctionThread;
|
|
166
|
+
}
|
|
167
|
+
/** What a comment option's function receives. */
|
|
168
|
+
export interface SpaceCommentOptionInput {
|
|
169
|
+
/** The id of the declared option. */
|
|
170
|
+
option: string;
|
|
171
|
+
comment: { id: string; body?: string; view?: string | null; page_key?: string | null; anchor_keys?: string[] };
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface SpaceFunctionCloudComputer {
|
|
175
|
+
facts(): Promise<Record<string, unknown>>;
|
|
176
|
+
/** Needs `uses.cloudComputer: 'shell'`. `cwd` is a folder inside the machine's workspace. */
|
|
177
|
+
run(input: { command: string; cwd?: string; timeoutMs?: number }): Promise<{ exit_code: number | null; output: string;
|
|
178
|
+
[key: string]: unknown }>;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/** What a handler can reach: nothing beyond the function's declared `uses`. */
|
|
182
|
+
export interface SpaceFunctionContext {
|
|
183
|
+
/** Who is calling. `userId` is null for a Site or link visitor and for a Space key. */
|
|
184
|
+
caller: { role: SpaceFunctionRole; userId: string | null };
|
|
185
|
+
space: { id: string; revision: number };
|
|
186
|
+
/** The way this call came in. */
|
|
187
|
+
via: SpaceFunctionExposure | 'thread_item' | 'thread_hook' | 'thread_settle' | 'comment_option';
|
|
188
|
+
/** One method per action named in `uses.actions`: the action's result, or a thrown error. */
|
|
189
|
+
actions: Record<string, (inputs?: Record<string, unknown>) => Promise<unknown>>;
|
|
190
|
+
/** The caller's own cloud computer. Calls throw until that person allowed this Space to use it. */
|
|
191
|
+
cloudComputer: SpaceFunctionCloudComputer;
|
|
192
|
+
/**
|
|
193
|
+
* Built-in thread actions named in `uses.threads`, by thread `id`. Notis refuses a thread none of this Space's
|
|
194
|
+
* items is attached to. `later` takes the time the thread comes back, as an ISO date with its zone.
|
|
195
|
+
*/
|
|
196
|
+
threads: { [Operation in SpaceThreadOperation]: Operation extends 'later'
|
|
197
|
+
? (threadId: string, until: string) => Promise<void> : (threadId: string) => Promise<void> };
|
|
198
|
+
/** Set when a thread item's action or settle runs the function: the item and its thread. */
|
|
199
|
+
item?: SpaceFunctionThreadItem & { thread: SpaceFunctionThread };
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export type SpaceFunctionHandler<TInput = Record<string, unknown>, TOutput = unknown> =
|
|
203
|
+
(input: TInput, ctx: SpaceFunctionContext) => TOutput | Promise<TOutput>;
|
|
204
|
+
|
|
205
|
+
/** A function the page can call, as the host describes it (`runtime.space.functions`). */
|
|
206
|
+
export interface SpaceFunctionDescriptor {
|
|
207
|
+
kind: SpaceFunctionKind;
|
|
208
|
+
description?: string;
|
|
209
|
+
inputSchema: Record<string, unknown>;
|
|
210
|
+
outputSchema?: Record<string, unknown>;
|
|
211
|
+
/** True when visitors may call it too: what "view as the public" keeps. */
|
|
212
|
+
public?: boolean;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export interface SpaceFunctionCallOptions {
|
|
216
|
+
/** A caller-controlled idempotency key, kept across a deliberate retry of a write or an action. */
|
|
217
|
+
requestId?: string;
|
|
218
|
+
}
|
|
@@ -6,11 +6,8 @@ export declare const AGENT_QUEUE_WORDS: Readonly<{
|
|
|
6
6
|
idle: Words;
|
|
7
7
|
queued: Words;
|
|
8
8
|
working: Words;
|
|
9
|
-
waiting: Words;
|
|
10
9
|
failed: Words;
|
|
11
10
|
done: Words;
|
|
12
|
-
approvalRequired: Words;
|
|
13
|
-
approve: Words;
|
|
14
11
|
openThread: Words;
|
|
15
12
|
unavailable: Words;
|
|
16
13
|
}>;
|
|
@@ -20,19 +17,12 @@ export interface UseAgentQueueResult {
|
|
|
20
17
|
label: string;
|
|
21
18
|
/** The thread the agent works in for this scope; null until it first woke. */
|
|
22
19
|
threadId: string | null;
|
|
23
|
-
/** Items waiting in the quiet window
|
|
20
|
+
/** Items waiting in the quiet window. */
|
|
24
21
|
pending: number;
|
|
25
|
-
/** True until the viewer allows this version's agents; offer `approve()`. */
|
|
26
|
-
approvalRequired: boolean;
|
|
27
|
-
/** Ask the viewer's permission for this Space version's agents. Held comments then wake their thread. */
|
|
28
|
-
approve: () => Promise<boolean>;
|
|
29
22
|
/** Open the agent's thread in the side chat. Resolves false when there is none or the host has no side chat. */
|
|
30
23
|
openThread: () => Promise<boolean>;
|
|
31
24
|
/** The link label in the viewer's language. */
|
|
32
25
|
openLabel: string;
|
|
33
|
-
/** Why to allow (`approvalRequired`) and the Allow button, in the viewer's language. */
|
|
34
|
-
approvalLabel: string;
|
|
35
|
-
approveLabel: string;
|
|
36
26
|
loading: boolean;
|
|
37
27
|
error: Error | null;
|
|
38
28
|
/** False on hosts without agents (Sites, links, the dev harness). */
|
|
@@ -41,14 +31,13 @@ export interface UseAgentQueueResult {
|
|
|
41
31
|
}
|
|
42
32
|
/**
|
|
43
33
|
* One declared agent's latest wake-up for the signed-in viewer: Queued (in the 20 second quiet window),
|
|
44
|
-
* Working,
|
|
34
|
+
* Working, Failed or Done, with a link to its thread. A comment wakes its agent with no approval first.
|
|
45
35
|
*
|
|
46
36
|
* ```tsx
|
|
47
37
|
* const queue = useAgentQueue('editor', deckKey);
|
|
48
38
|
* return (
|
|
49
39
|
* <span>
|
|
50
40
|
* {queue.label}
|
|
51
|
-
* {queue.approvalRequired ? <Button onClick={() => void queue.approve()}>{queue.approveLabel}</Button> : null}
|
|
52
41
|
* {queue.threadId ? <Button onClick={() => void queue.openThread()}>{queue.openLabel}</Button> : null}
|
|
53
42
|
* </span>
|
|
54
43
|
* );
|
|
@@ -64,6 +64,11 @@ export interface UseCollectionInteractionsOptions<T> {
|
|
|
64
64
|
shortcutPriority?: number;
|
|
65
65
|
resolveNextId?: (context: CollectionNavigationContext<T>) => string | null;
|
|
66
66
|
onActiveItemChange?: (id: string | null) => void;
|
|
67
|
+
/**
|
|
68
|
+
* For a view that draws only part of its items (the rows on screen): brings an item into view so it is drawn.
|
|
69
|
+
* Called when the item to focus has no element; the controller then focuses it as soon as it is drawn.
|
|
70
|
+
*/
|
|
71
|
+
revealItem?: (id: string) => void;
|
|
67
72
|
actions?: CollectionAction<T>[];
|
|
68
73
|
}
|
|
69
74
|
export interface CollectionInteractionController<T> {
|
|
@@ -81,6 +86,8 @@ export interface CollectionInteractionController<T> {
|
|
|
81
86
|
* that removes the active item continues this way (iOS Photos), else the other way at the edge.
|
|
82
87
|
*/
|
|
83
88
|
travelDirection: () => TravelDirection;
|
|
89
|
+
/** Moves the active item one step, as J/K or the arrows do (a swipe between open items on a phone). */
|
|
90
|
+
move: (direction: CollectionNavigationDirection) => void;
|
|
84
91
|
getActionBarProps: () => Pick<MultiSelectActionBarProps, 'selectedCount' | 'actions' | 'collectionOwnerId' | 'isAvailable' | 'shortcutsEnabled' | 'onClearSelection'>;
|
|
85
92
|
isSelected: (id: string) => boolean;
|
|
86
93
|
getSelectedItems: () => T[];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { NotisRuntime } from '../runtime';
|
|
2
|
+
/** Cache key of one toolkit's read; every mounted `useConnection(toolkit)` reads again after a connect. */
|
|
3
|
+
export declare function connectionQueryKey(toolkit: string): readonly ['connection', string];
|
|
4
|
+
/** Marks a toolkit's read stale in the host cache, so every mounted `useConnection` of it reads again. */
|
|
5
|
+
export declare function invalidateConnection(runtime: NotisRuntime | null, toolkit: string): void;
|
|
6
|
+
export interface UseConnectionResult {
|
|
7
|
+
/** False where the host cannot answer (Sites, shared links, verification, previews offline, older hosts). */
|
|
8
|
+
available: boolean;
|
|
9
|
+
/** The viewer's own account in this app works now. */
|
|
10
|
+
connected: boolean;
|
|
11
|
+
/** The GitHub login for GitHub, else the name the person gave the account, else null. */
|
|
12
|
+
account: string | null;
|
|
13
|
+
/** The newest account's state (`ACTIVE`, `EXPIRED`, `FAILED`...), null when there is none or while loading. */
|
|
14
|
+
status: string | null;
|
|
15
|
+
loading: boolean;
|
|
16
|
+
/** The connect window is open and the host is waiting for the account to work. */
|
|
17
|
+
connecting: boolean;
|
|
18
|
+
error: Error | null;
|
|
19
|
+
/**
|
|
20
|
+
* Opens the Portal's connect flow for this app (a sign-in window on the web, the browser in Desktop). Call it from
|
|
21
|
+
* the person's own click: the host refuses a call no click started. Resolves true once the account works, false
|
|
22
|
+
* when the person closed the window or it timed out, and rejects with a message to show when the host refused.
|
|
23
|
+
*/
|
|
24
|
+
connect: () => Promise<boolean>;
|
|
25
|
+
/** Read again. */
|
|
26
|
+
refresh: () => Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The signed-in viewer's own account in one connected app, and a button's way to connect it.
|
|
30
|
+
*
|
|
31
|
+
* ```tsx
|
|
32
|
+
* const github = useConnection('github');
|
|
33
|
+
* if (!github.available) return <OpenInNotis />;
|
|
34
|
+
* return github.connected
|
|
35
|
+
* ? <p>GitHub: {github.account}</p>
|
|
36
|
+
* : <Button onClick={() => github.connect()} disabled={github.connecting}>Connect GitHub</Button>;
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* Needs no declaration: it reads only the viewer's own account and never a credential. On a Site, a shared link, in
|
|
40
|
+
* verification and in the vite preview it answers `available: false`; keep a fallback (a link to Integrations).
|
|
41
|
+
*/
|
|
42
|
+
export declare function useConnection(toolkit: string): UseConnectionResult;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type UseQueryOptions, type UseQueryResult } from './useQuery';
|
|
2
|
+
import type { SpaceFunctionCallOptions } from '../functions';
|
|
3
|
+
/**
|
|
4
|
+
* Call one of this Space's functions exposed to its views (`expose: ['page']`). The handler runs on Notis's side;
|
|
5
|
+
* the page only gets its result.
|
|
6
|
+
*
|
|
7
|
+
* ```tsx
|
|
8
|
+
* const settle = useFunction<{ thread: string }, { settled: boolean }>('settle_thread');
|
|
9
|
+
* <Button disabled={settle.loading} onClick={() => void settle.call({ thread: id })}>Settle</Button>
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export declare function useFunction<TInput extends Record<string, unknown> = Record<string, unknown>, TResult = unknown>(name: string): {
|
|
13
|
+
call: (input: TInput, options?: SpaceFunctionCallOptions) => Promise<TResult>;
|
|
14
|
+
loading: boolean;
|
|
15
|
+
error: Error | null;
|
|
16
|
+
/** False on hosts that cannot run functions, or when this view may not call this one. */
|
|
17
|
+
available: boolean;
|
|
18
|
+
};
|
|
19
|
+
/** A `read` function as a cached query: it runs again when `input` changes. */
|
|
20
|
+
export declare function useFunctionQuery<TResult = unknown>(name: string, input: Record<string, unknown>, options?: UseQueryOptions): UseQueryResult<TResult>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/** A Settings place a Space may open. Only the Cloud Computer's repository secrets for now. */
|
|
2
|
+
export interface NotisSettingsTarget {
|
|
3
|
+
page: 'cloud-computer';
|
|
4
|
+
section: 'repository-secrets';
|
|
5
|
+
/**
|
|
6
|
+
* The repository the form is prefilled with: its short name (`naturalisation-switzerland`) or `owner/name`, whose
|
|
7
|
+
* short name is kept. Repository secrets are keyed by the short name, in lower case.
|
|
8
|
+
*/
|
|
9
|
+
repository?: string;
|
|
10
|
+
/** Open the Add env file (`env_file`) or Add variable (`variable`) form. Without it the section is only shown. */
|
|
11
|
+
add?: 'env_file' | 'variable';
|
|
12
|
+
}
|
|
13
|
+
export interface UseNotisSettingsResult {
|
|
14
|
+
/** False on a Site, a link, a release preview, a page framed inside another, verify and the vite preview: offer your
|
|
15
|
+
* own fallback there. */
|
|
16
|
+
available: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Opens Settings on the target, above the Space. Resolves once the host has taken it; rejects on a host that cannot
|
|
19
|
+
* open Settings, on a target it does not know, or when the view is no longer the one on screen. Values are never
|
|
20
|
+
* prefilled: the person types or chooses them in Settings.
|
|
21
|
+
*/
|
|
22
|
+
openSettings: (target: NotisSettingsTarget) => Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
export type NotisSettingsNavigation = {
|
|
25
|
+
kind: 'settings';
|
|
26
|
+
page: 'cloud-computer';
|
|
27
|
+
section: 'repository-secrets';
|
|
28
|
+
repository?: string;
|
|
29
|
+
add?: 'env_file' | 'variable';
|
|
30
|
+
};
|
|
31
|
+
/** The short name a repository is kept under (`owner/name` keeps `name`, lower case), or null when it is not one. */
|
|
32
|
+
export declare function settingsRepositoryName(value: unknown): string | null;
|
|
33
|
+
/** The payload `openSettings` sends the host, or an Error naming what is wrong. Hosts check it again with this. */
|
|
34
|
+
export declare function settingsNavigation(target: unknown): NotisSettingsNavigation | Error;
|
|
35
|
+
/**
|
|
36
|
+
* Opens the host's Settings from a Space view, such as the repository secrets form for one repository.
|
|
37
|
+
*
|
|
38
|
+
* ```tsx
|
|
39
|
+
* const settings = useNotisSettings();
|
|
40
|
+
* <button disabled={!settings.available}
|
|
41
|
+
* onClick={() => settings.openSettings({ page: 'cloud-computer', section: 'repository-secrets',
|
|
42
|
+
* repository: 'naturalisation-switzerland', add: 'env_file' })}>Add .env file</button>
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* The same place has a plain address a Space or an email can link to:
|
|
46
|
+
* `/manage?settings=cloud&settings_section=repository-secrets&settings_repository=<name>&settings_add=env_file`.
|
|
47
|
+
*/
|
|
48
|
+
export declare function useNotisSettings(): UseNotisSettingsResult;
|
|
@@ -24,9 +24,9 @@ export type { SpaceViewParam, SpaceViewParamType, SpaceViewFilter, SpaceShows, S
|
|
|
24
24
|
export { SPACE_VIEWER_READ_OPERATIONS } from './space';
|
|
25
25
|
export { SPACE_CLOUD_COMPUTER_OPERATIONS, spaceCloudComputerAllows } from './space';
|
|
26
26
|
export { spaceCloudComputerAccess } from './space';
|
|
27
|
-
export type { SpaceCloudComputerLevel, SpaceCloudComputerOperation, SpaceCloudComputerStatus, SpaceCloudComputerRelease, SpaceCloudComputerRunInput, SpaceCloudComputerRunResult, SpaceCloudComputerUploadInput, SpaceCloudComputerUploadResult, SpaceCloudComputerTransport, SpaceCloudComputerDeclaration, SpaceCloudComputerService, SpaceCloudComputerJobOperation, SpaceCloudComputerJobInput, SpaceCloudComputerJobStatus, SpaceCloudComputerJobLogs, SpaceCloudComputerJobResult, SpaceCloudComputerLeaseInput, SpaceCloudComputerLeaseResult, SpaceCloudComputerFolder, JobState, SpaceCloudComputerAccessInput, SpaceCloudComputerAccessResult, SpaceCloudComputerMediaLink, SpaceCloudComputerFrameCode, SpaceCloudComputerTransferOperation, SpaceCloudComputerFileUpload, SpaceCloudComputerUploadProgress, SpaceCloudComputerFileUploadResult, SpaceCloudComputerImportInput, SpaceCloudComputerImportResult } from './space';
|
|
27
|
+
export type { SpaceCloudComputerLevel, SpaceCloudComputerOperation, SpaceCloudComputerStatus, SpaceCloudComputerRelease, SpaceCloudComputerCopy, SpaceCloudComputerRunInput, SpaceCloudComputerRunResult, SpaceCloudComputerUploadInput, SpaceCloudComputerUploadResult, SpaceCloudComputerTransport, SpaceCloudComputerDeclaration, SpaceCloudComputerService, SpaceCloudComputerJobOperation, SpaceCloudComputerJobInput, SpaceCloudComputerJobStatus, SpaceCloudComputerJobLogs, SpaceCloudComputerJobResult, SpaceCloudComputerLeaseInput, SpaceCloudComputerLeaseResult, SpaceCloudComputerFolder, JobState, SpaceCloudComputerAccessInput, SpaceCloudComputerAccessResult, SpaceCloudComputerMediaLink, SpaceCloudComputerFrameCode, SpaceCloudComputerTransferOperation, SpaceCloudComputerFileUpload, SpaceCloudComputerUploadProgress, SpaceCloudComputerFileUploadResult, SpaceCloudComputerImportInput, SpaceCloudComputerImportResult } from './space';
|
|
28
28
|
export type { SpaceViewerReadFamily, SpaceViewerReadOperation, SpaceViewerReadInput, SpaceViewerReadResult, SpaceViewerLink, SpaceViewerDatabase, SpaceViewerDatabaseSchema, SpaceViewerSkill, SpaceViewerSkillPage } from './space';
|
|
29
|
-
export type { SpaceAgentDeclaration, SpaceItemThread, SpaceAgentQueue, SpaceAgentsStatus, SpaceThreadsTransport, SpaceThreadItemText, SpaceThreadItemCondition, SpaceThreadItemState, SpaceThreadItemConfirm, SpaceThreadItemAction, SpaceThreadItemKind, SpaceThreadItem, SpaceThreadItemRun, SpaceThreadItemTransport, SpaceCommentSource, SpaceCommentsTransport, SpaceCommentViewer, SpaceCommentThreadRef, SpaceCommentThreadPick } from './space';
|
|
29
|
+
export type { SpaceAgentDeclaration, SpaceItemThread, SpaceAgentQueue, SpaceAgentsStatus, SpaceThreadsTransport, SpaceThreadItemText, SpaceThreadItemCondition, SpaceThreadItemState, SpaceThreadItemConfirm, SpaceThreadItemAction, SpaceThreadItemKind, SpaceThreadItem, SpaceThreadItemRun, SpaceThreadItemTransport, SpaceCommentSource, SpaceCommentsTransport, SpaceCommentViewer, SpaceCommentThreadRef, SpaceCommentThreadPick, SpaceCommentAnchor, SpaceCommentAttachment, SpaceCommentChange, SpaceCommentFile, SpaceCommentInsert, SpaceCommentMode, SpaceCommentNeeds, SpaceCommentPage, SpaceCommentPageKey, SpaceCommentReply, SpaceCommentRow, SpaceCommentStatus, SpaceCommentThreadsAnswer, SpaceCommentThreadsInput } from './space';
|
|
30
30
|
export { SpaceActionError, SpaceNavigationCancelled, isSpaceNavigationCancelled } from './space';
|
|
31
31
|
export { spaceAudience, spaceMarksEditorsOnly, publicSpaceDescriptor, withoutEditorColumns } from './space';
|
|
32
32
|
export type { SpaceAudience, SpaceEditorsOnly, SpaceResourceColumns, EditorOnlyColumns, AudienceRow } from './space';
|
|
@@ -57,9 +57,15 @@ export { useHandover } from './hooks/useHandover';
|
|
|
57
57
|
export type { UseHandoverResult } from './hooks/useHandover';
|
|
58
58
|
export { useCloudComputer } from './hooks/useCloudComputer';
|
|
59
59
|
export type { UseCloudComputerResult } from './hooks/useCloudComputer';
|
|
60
|
+
export { useConnection } from './hooks/useConnection';
|
|
61
|
+
export type { UseConnectionResult } from './hooks/useConnection';
|
|
62
|
+
export type { SpaceConnection, SpaceConnectionsTransport } from './space';
|
|
60
63
|
export { useItemThread } from './hooks/useItemThread';
|
|
61
64
|
export type { UseItemThreadResult } from './hooks/useItemThread';
|
|
62
65
|
export { useThreadItem } from './hooks/useThreadItem';
|
|
66
|
+
export { useFunction, useFunctionQuery } from './hooks/useFunction';
|
|
67
|
+
export { threadHookInput, threadIdleInput, threadSettleInput, commentOptionInput } from './functions';
|
|
68
|
+
export type { SpaceFunctionDeclaration, SpaceFunctionHandler, SpaceFunctionContext, SpaceFunctionKind, SpaceFunctionExposure, SpaceFunctionRole, SpaceFunctionUses, SpaceThreadOperation, SpaceThreadHookEvent, SpaceThreadHookInput, SpaceThreadIdleInput, SpaceThreadSettleInput, SpaceCommentOption, SpaceCommentOptionInput, SpaceFunctionThread, SpaceFunctionThreadItem, SpaceFunctionCloudComputer, SpaceFunctionDescriptor, SpaceFunctionCallOptions } from './functions';
|
|
63
69
|
export type { UseThreadItemResult } from './hooks/useThreadItem';
|
|
64
70
|
export { useAgentQueue, AGENT_QUEUE_WORDS } from './hooks/useAgentQueue';
|
|
65
71
|
export type { UseAgentQueueResult, AgentQueueStatus } from './hooks/useAgentQueue';
|
|
@@ -71,6 +77,8 @@ export { useCloudComputerJob } from './hooks/useCloudComputerJob';
|
|
|
71
77
|
export type { UseCloudComputerJobOptions, UseCloudComputerJobResult } from './hooks/useCloudComputerJob';
|
|
72
78
|
export { CLOUD_COMPUTER_WORDS, cloudComputerPriceWords, formatHourlyPrice } from './cloudComputerWords';
|
|
73
79
|
export { useNotisNavigation } from './hooks/useNotisNavigation';
|
|
80
|
+
export { useNotisSettings } from './hooks/useNotisSettings';
|
|
81
|
+
export type { NotisSettingsTarget, UseNotisSettingsResult } from './hooks/useNotisSettings';
|
|
74
82
|
export { useTopBarSearch } from './hooks/useTopBarSearch';
|
|
75
83
|
export { useTopBarTitleLeaf } from './hooks/useTopBarTitleLeaf';
|
|
76
84
|
export { useBackend } from './hooks/useBackend';
|
|
@@ -114,7 +122,5 @@ export { useLongPressSelection } from './hooks/useLongPressSelection';
|
|
|
114
122
|
export { isInteractionElementVisible } from './interactions/visibility';
|
|
115
123
|
export type { AgentContextContent, AgentContextItem, ContextAttachment } from './agentContext';
|
|
116
124
|
export { useAgentContext } from './hooks/useAgentContext';
|
|
117
|
-
export { NotisCommentBoundary, NotisCommentBox } from './components/NotisCommentBoundary';
|
|
118
|
-
export type { NotisCommentBoundaryProps, NotisCommentBoxProps } from './components/NotisCommentBoundary';
|
|
119
125
|
export { VIEW_PERIODS, isViewDate, isViewPeriod, resolveViewPeriod } from './viewPeriod';
|
|
120
126
|
export { journalViewParams, tasksViewParams, tasksViewFilter } from './standardViewParams';
|
|
@@ -11,6 +11,11 @@ export interface ShortcutDefinition {
|
|
|
11
11
|
allowRepeat?: boolean;
|
|
12
12
|
preventDefault?: boolean;
|
|
13
13
|
stopPropagation?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Set by a collection that binds its clear key only while something is selected: the binding itself says the
|
|
16
|
+
* selection is not empty, whichever items are drawn (a windowed list draws only the rows on screen).
|
|
17
|
+
*/
|
|
18
|
+
whileSelected?: boolean;
|
|
14
19
|
onTrigger: (event: KeyboardEvent) => void | Promise<void>;
|
|
15
20
|
}
|
|
16
21
|
export interface UseShortcutsOptions {
|
|
@@ -10,7 +10,7 @@ import type { AgentContextContent, AgentContextItem, AgentContextSource } from '
|
|
|
10
10
|
import type { ComponentType, ReactNode } from 'react';
|
|
11
11
|
import type { NotisQueryClient } from './queryCache';
|
|
12
12
|
import type { NotisSpaceSkeleton } from './skeleton';
|
|
13
|
-
import type { SpaceRuntimeDescriptor, SpaceActionOptions, SpaceDocumentBodyRequest, SpaceDocumentBodyResult, SpaceViewerReadOperation, SpaceShownOptions, SpaceCloudComputerTransport, SpaceFilesTransport, SpaceThreadsTransport, SpaceThreadItemTransport, SpaceCommentsTransport } from './space';
|
|
13
|
+
import type { SpaceRuntimeDescriptor, SpaceActionOptions, SpaceDocumentBodyRequest, SpaceDocumentBodyResult, SpaceViewerReadOperation, SpaceShownOptions, SpaceCloudComputerTransport, SpaceConnectionsTransport, SpaceFilesTransport, SpaceThreadsTransport, SpaceThreadItemTransport, SpaceCommentsTransport } from './space';
|
|
14
14
|
export type DatabasePropertyType = 'title' | 'rich_text' | 'text' | 'number' | 'checkbox' | 'date' | 'select' | 'multi_select' | 'status' | 'relation' | 'formula' | 'files' | 'secret';
|
|
15
15
|
/**
|
|
16
16
|
* The value of a `secret` property. The platform stores a pointer to a
|
|
@@ -546,6 +546,8 @@ export interface RuntimeResource {
|
|
|
546
546
|
export interface NotisRuntime {
|
|
547
547
|
space?: SpaceRuntimeDescriptor;
|
|
548
548
|
callAction?<TResult = unknown>(actionId: string, inputs?: Record<string, unknown>, options?: SpaceActionOptions): Promise<TResult>;
|
|
549
|
+
/** Space-only: run one of the Space's functions exposed to its views. Absent on hosts that predate functions. */
|
|
550
|
+
callFunction?<TResult = unknown>(name: string, input?: Record<string, unknown>, options?: import('./functions').SpaceFunctionCallOptions): Promise<TResult>;
|
|
549
551
|
documentBody?(request: SpaceDocumentBodyRequest): Promise<SpaceDocumentBodyResult>;
|
|
550
552
|
/**
|
|
551
553
|
* Space-only declared viewer read (`viewerReads`): what the signed-in viewer can open,
|
|
@@ -569,6 +571,11 @@ export interface NotisRuntime {
|
|
|
569
571
|
* viewer allows it. Absent on Sites, links, verification harnesses and older hosts.
|
|
570
572
|
*/
|
|
571
573
|
spaceCloudComputer?: SpaceCloudComputerTransport;
|
|
574
|
+
/**
|
|
575
|
+
* Space-only connected apps (`useConnection`): the signed-in viewer's own account in one app, and the Portal's
|
|
576
|
+
* connect flow from the person's click. Absent on Sites, links, verification harnesses and older hosts.
|
|
577
|
+
*/
|
|
578
|
+
spaceConnections?: SpaceConnectionsTransport;
|
|
572
579
|
/**
|
|
573
580
|
* Space-only files attached from a view to a database's files column (comment pictures): the signed-in Editor's
|
|
574
581
|
* own upload into Notis's private EU storage. Absent on Sites, previews, verification harnesses and older hosts.
|
|
@@ -649,6 +656,12 @@ export interface NotisRuntime {
|
|
|
649
656
|
kind: string;
|
|
650
657
|
[key: string]: unknown;
|
|
651
658
|
}) => NotisNavigationAnswer | Promise<NotisNavigationAnswer>;
|
|
659
|
+
/**
|
|
660
|
+
* True when this host opens its own Settings from `navigate({ kind: 'settings', ... })` (`useNotisSettings()`):
|
|
661
|
+
* a signed-in viewer's Space page in the Portal. Absent on a Site, a link, a release preview, verify and the vite
|
|
662
|
+
* preview.
|
|
663
|
+
*/
|
|
664
|
+
settingsAvailable?: boolean;
|
|
652
665
|
registerTopBarSearch?: (config: {
|
|
653
666
|
onChange: (value: string) => void;
|
|
654
667
|
placeholder?: string;
|