@notis_ai/cli 0.2.0-beta.16.1 → 0.2.0-beta.161.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/README.md +435 -133
- package/bin/check-runtime.js +15 -0
- package/bin/notis.js +2 -0
- package/config/notis_app_boundary_rules.json +50 -0
- package/config/notis_app_design_rules.json +135 -0
- package/dist/agent-hooks/notis-agent-hook.mjs +19008 -0
- package/dist/base-skills/notis-apps/SKILL.md +70 -0
- package/dist/base-skills/notis-apps/references/architecture.md +164 -0
- package/dist/base-skills/notis-apps/references/context.md +81 -0
- package/dist/base-skills/notis-apps/references/design.md +165 -0
- package/dist/base-skills/notis-apps/references/reading.md +89 -0
- package/dist/base-skills/notis-apps/references/release.md +99 -0
- package/dist/base-skills/notis-apps/references/sdk.md +62 -0
- package/dist/base-skills/notis-apps/references/troubleshooting.md +23 -0
- package/dist/base-skills/notis-cli/SKILL.md +140 -0
- package/dist/base-skills/notis-cli/references/app-delivery.md +18 -0
- package/dist/base-skills/notis-cli/references/native-databases.md +20 -0
- package/dist/base-skills/notis-cli/references/tool-examples.md +56 -0
- package/dist/base-skills/notis-cli/references/troubleshooting.md +39 -0
- package/dist/base-skills/notis-query/SKILL.md +67 -0
- package/dist/base-skills/notis-query/references/database-discovery.md +59 -0
- package/dist/base-skills/notis-query/references/documents.md +50 -0
- package/dist/base-skills/notis-query/references/query.md +543 -0
- package/dist/skill-sync/index.js +1626 -0
- package/dist/skill-sync/index.js.map +7 -0
- package/dist/skill-sync-worker.mjs +2990 -0
- package/package.json +18 -7
- package/skills/notis-apps/cli.md +313 -0
- package/skills/notis-cli/AGENT_INSTRUCTIONS.md +39 -0
- package/skills/notis-onboarding/BRIEF.md +129 -0
- package/skills/notis-query/cli.md +39 -0
- package/src/agent-hook-entry.js +5 -0
- package/src/cli.js +294 -25
- package/src/command-specs/agents.js +392 -0
- package/src/command-specs/apps.js +1470 -202
- package/src/command-specs/auth.js +114 -137
- package/src/command-specs/diagnostics.js +729 -0
- package/src/command-specs/handover.js +374 -0
- package/src/command-specs/helpers.js +84 -82
- package/src/command-specs/index.js +25 -6
- package/src/command-specs/meta.js +150 -18
- package/src/command-specs/onboarding.js +290 -0
- package/src/command-specs/profile.js +358 -0
- package/src/command-specs/reports.js +86 -0
- package/src/command-specs/skills.js +75 -0
- package/src/command-specs/smoke.js +386 -0
- package/src/command-specs/tools.js +455 -139
- package/src/runtime/agent-browser.js +632 -0
- package/src/runtime/agent-memory-state.js +126 -0
- package/src/runtime/agent-setup.js +383 -0
- package/src/runtime/app-boundary-validator.js +404 -0
- package/src/runtime/app-changelog.js +79 -0
- package/src/runtime/app-platform.js +2633 -210
- package/src/runtime/app-registry-scaffolds.js +367 -0
- package/src/runtime/app-test-server.js +292 -0
- package/src/runtime/assets/store-screenshot-dark.png +0 -0
- package/src/runtime/auth-recovery.js +110 -0
- package/src/runtime/base-skills.d.ts +20 -0
- package/src/runtime/base-skills.js +167 -0
- package/src/runtime/channel.js +133 -0
- package/src/runtime/delegated-context.js +68 -0
- package/src/runtime/errors.js +1 -0
- package/src/runtime/git.js +233 -0
- package/src/runtime/login-listener.js +15 -0
- package/src/runtime/oauth.js +2622 -0
- package/src/runtime/output.js +37 -5
- package/src/runtime/ports.js +31 -0
- package/src/runtime/profiles.js +906 -55
- package/src/runtime/skill-sync/cloud-client.ts +99 -0
- package/src/runtime/skill-sync/index.ts +697 -0
- package/src/runtime/skill-sync/local-scanner.ts +1046 -0
- package/src/runtime/skill-sync/symlink-manager.ts +433 -0
- package/src/runtime/skill-sync/sync-plan.ts +22 -0
- package/src/runtime/skill-sync/types.ts +110 -0
- package/src/runtime/skill-sync/write-cloud-skill.ts +50 -0
- package/src/runtime/skill-sync-service.js +109 -0
- package/src/runtime/store-screenshot.js +143 -0
- package/src/runtime/sync-skills.d.ts +37 -0
- package/src/runtime/sync-skills.js +231 -0
- package/src/runtime/telemetry.js +92 -0
- package/src/runtime/transport.js +324 -45
- package/src/skill-sync-worker-entry.js +2 -0
- package/src/skill-sync-worker.js +50 -0
- package/template/.harness/index.html.tmpl +430 -0
- package/template/CHANGELOG.md +5 -0
- package/template/app/globals.css +28 -3
- package/template/app/layout.tsx +6 -3
- package/template/app/page.tsx +49 -42
- package/template/components/page-heading.tsx +23 -0
- package/template/components/ui/badge.tsx +7 -4
- package/template/components/ui/button.tsx +1 -1
- package/template/components/ui/card.tsx +24 -11
- package/template/components/ui/native-select.tsx +24 -0
- package/template/notis.config.ts +24 -6
- package/template/package-lock.json +3642 -0
- package/template/package.json +19 -16
- package/template/packages/{notis-sdk → sdk}/package.json +14 -4
- package/template/packages/sdk/src/agentContext.ts +36 -0
- package/template/packages/sdk/src/components/DocumentEditor.tsx +103 -0
- package/template/packages/sdk/src/components/Markdown.tsx +60 -0
- package/template/packages/sdk/src/components/MarkdownEditor.tsx +121 -0
- package/template/packages/sdk/src/components/MultiSelectActionBar.tsx +285 -0
- package/template/packages/sdk/src/components/MultiSelectCheckbox.tsx +97 -0
- package/template/packages/sdk/src/components/MultiSelectDragOverlay.tsx +39 -0
- package/template/packages/sdk/src/components/NotisCommentBoundary.tsx +172 -0
- package/template/packages/sdk/src/components/NotisSelectionBoundary.tsx +59 -0
- package/template/packages/sdk/src/components/ShortcutHints.tsx +56 -0
- package/template/packages/sdk/src/components/Skeleton.tsx +24 -0
- package/template/packages/sdk/src/config.ts +257 -0
- package/template/packages/sdk/src/documents.ts +256 -0
- package/template/packages/sdk/src/hooks/useActiveResource.ts +19 -0
- package/template/packages/sdk/src/hooks/useAgentContext.ts +23 -0
- package/template/packages/sdk/src/hooks/useCloudComputer.ts +64 -0
- package/template/packages/sdk/src/hooks/useCollectionInteractions.ts +836 -0
- package/template/packages/sdk/src/hooks/useDatabaseSchema.ts +49 -0
- package/template/packages/sdk/src/hooks/useDatabaseSubscription.ts +76 -0
- package/template/packages/sdk/src/hooks/useDocument.ts +43 -0
- package/template/packages/sdk/src/hooks/useDocuments.ts +84 -0
- package/template/packages/sdk/src/hooks/useHandover.ts +78 -0
- package/template/packages/sdk/src/hooks/useLongPressSelection.ts +79 -0
- package/template/packages/sdk/src/hooks/useMultiSelect.ts +95 -0
- package/template/packages/{notis-sdk → sdk}/src/hooks/useNotis.ts +10 -4
- package/template/packages/{notis-sdk → sdk}/src/hooks/useNotisNavigation.ts +11 -8
- package/template/packages/sdk/src/hooks/useQuery.ts +71 -0
- package/template/packages/sdk/src/hooks/useTool.ts +65 -0
- package/template/packages/sdk/src/hooks/useToolQuery.ts +12 -0
- package/template/packages/sdk/src/hooks/useTopBarSearch.ts +81 -0
- package/template/packages/sdk/src/hooks/useUpsertDocument.ts +95 -0
- package/template/packages/sdk/src/index.ts +161 -0
- package/template/packages/sdk/src/interactions/actions.ts +59 -0
- package/template/packages/sdk/src/interactions/shortcuts.tsx +694 -0
- package/template/packages/sdk/src/interactions/visibility.ts +13 -0
- package/template/packages/sdk/src/interactions.ts +45 -0
- package/template/packages/sdk/src/provider.tsx +44 -0
- package/template/packages/sdk/src/queryCache.ts +170 -0
- package/template/packages/sdk/src/runtime.ts +451 -0
- package/template/packages/sdk/src/styles.css +247 -0
- package/template/packages/sdk/src/tailwind.ts +66 -0
- package/template/packages/sdk/src/vite.ts +73 -0
- package/template/packages/{notis-sdk → sdk}/tsconfig.json +1 -0
- package/template/postcss.config.mjs +1 -1
- package/template/tailwind.config.ts +1 -6
- package/template/tsconfig.json +1 -0
- package/src/command-specs/db.js +0 -163
- package/src/runtime/app-preview-server.js +0 -312
- package/template/packages/notis-sdk/src/config.ts +0 -48
- package/template/packages/notis-sdk/src/helpers.ts +0 -131
- package/template/packages/notis-sdk/src/hooks/useAppState.ts +0 -50
- package/template/packages/notis-sdk/src/hooks/useCollectionItem.ts +0 -58
- package/template/packages/notis-sdk/src/hooks/useDatabase.ts +0 -87
- package/template/packages/notis-sdk/src/hooks/useDocument.ts +0 -61
- package/template/packages/notis-sdk/src/hooks/useTool.ts +0 -49
- package/template/packages/notis-sdk/src/hooks/useUpsertDocument.ts +0 -57
- package/template/packages/notis-sdk/src/index.ts +0 -47
- package/template/packages/notis-sdk/src/provider.tsx +0 -44
- package/template/packages/notis-sdk/src/runtime.ts +0 -159
- package/template/packages/notis-sdk/src/styles.css +0 -123
- package/template/packages/notis-sdk/src/vite.ts +0 -54
- /package/template/packages/{notis-sdk → sdk}/src/hooks/useBackend.ts +0 -0
- /package/template/packages/{notis-sdk → sdk}/src/hooks/useTools.ts +0 -0
- /package/template/packages/{notis-sdk → sdk}/src/ui.ts +0 -0
|
@@ -2,20 +2,33 @@ import * as React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { cn } from '@/lib/utils';
|
|
4
4
|
|
|
5
|
+
// Surfaces are flat: a tinted panel on the page, and a plain background panel
|
|
6
|
+
// when nested inside another Card. No borders, no dividers, no shadows.
|
|
7
|
+
const CardDepthContext = React.createContext(0);
|
|
8
|
+
|
|
5
9
|
const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
6
|
-
({ className, ...props }, ref) =>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
({ className, ...props }, ref) => {
|
|
11
|
+
const depth = React.useContext(CardDepthContext);
|
|
12
|
+
return (
|
|
13
|
+
<CardDepthContext.Provider value={depth + 1}>
|
|
14
|
+
<div
|
|
15
|
+
ref={ref}
|
|
16
|
+
className={cn(
|
|
17
|
+
'min-w-0 rounded-2xl text-card-foreground',
|
|
18
|
+
depth === 0 ? 'bg-muted' : 'bg-background',
|
|
19
|
+
className,
|
|
20
|
+
)}
|
|
21
|
+
{...props}
|
|
22
|
+
/>
|
|
23
|
+
</CardDepthContext.Provider>
|
|
24
|
+
);
|
|
25
|
+
},
|
|
13
26
|
);
|
|
14
27
|
Card.displayName = 'Card';
|
|
15
28
|
|
|
16
29
|
const CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
17
30
|
({ className, ...props }, ref) => (
|
|
18
|
-
<div ref={ref} className={cn('flex flex-col space-y-1.5 p-
|
|
31
|
+
<div ref={ref} className={cn('flex flex-col space-y-1.5 p-5', className)} {...props} />
|
|
19
32
|
),
|
|
20
33
|
);
|
|
21
34
|
CardHeader.displayName = 'CardHeader';
|
|
@@ -24,7 +37,7 @@ const CardTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HT
|
|
|
24
37
|
({ className, ...props }, ref) => (
|
|
25
38
|
<h3
|
|
26
39
|
ref={ref}
|
|
27
|
-
className={cn('text-
|
|
40
|
+
className={cn('text-base font-semibold leading-none tracking-tight', className)}
|
|
28
41
|
{...props}
|
|
29
42
|
/>
|
|
30
43
|
),
|
|
@@ -41,14 +54,14 @@ CardDescription.displayName = 'CardDescription';
|
|
|
41
54
|
|
|
42
55
|
const CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
43
56
|
({ className, ...props }, ref) => (
|
|
44
|
-
<div ref={ref} className={cn('p-
|
|
57
|
+
<div ref={ref} className={cn('p-5 pt-0', className)} {...props} />
|
|
45
58
|
),
|
|
46
59
|
);
|
|
47
60
|
CardContent.displayName = 'CardContent';
|
|
48
61
|
|
|
49
62
|
const CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
50
63
|
({ className, ...props }, ref) => (
|
|
51
|
-
<div ref={ref} className={cn('flex items-center p-
|
|
64
|
+
<div ref={ref} className={cn('flex items-center p-5 pt-0', className)} {...props} />
|
|
52
65
|
),
|
|
53
66
|
);
|
|
54
67
|
CardFooter.displayName = 'CardFooter';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { CaretDown } from '@phosphor-icons/react';
|
|
3
|
+
|
|
4
|
+
import { cn } from '@/lib/utils';
|
|
5
|
+
|
|
6
|
+
// Borderless native select: a tinted pill with a caret. Keeps the platform
|
|
7
|
+
// dropdown (no portal needed inside the app surface) and the portal focus ring.
|
|
8
|
+
const NativeSelect = React.forwardRef<HTMLSelectElement, React.SelectHTMLAttributes<HTMLSelectElement>>(
|
|
9
|
+
({ className, children, ...props }, ref) => (
|
|
10
|
+
<span className={cn('relative inline-flex', className)}>
|
|
11
|
+
<select
|
|
12
|
+
ref={ref}
|
|
13
|
+
className="h-9 w-full appearance-none rounded-md bg-muted pl-3 pr-8 text-sm text-foreground outline-hidden transition-colors hover:bg-muted/70 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
|
|
14
|
+
{...props}
|
|
15
|
+
>
|
|
16
|
+
{children}
|
|
17
|
+
</select>
|
|
18
|
+
<CaretDown className="pointer-events-none absolute right-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" />
|
|
19
|
+
</span>
|
|
20
|
+
),
|
|
21
|
+
);
|
|
22
|
+
NativeSelect.displayName = 'NativeSelect';
|
|
23
|
+
|
|
24
|
+
export { NativeSelect };
|
package/template/notis.config.ts
CHANGED
|
@@ -1,18 +1,36 @@
|
|
|
1
1
|
import { defineNotisApp } from '@notis/sdk/config';
|
|
2
2
|
|
|
3
3
|
export default defineNotisApp({
|
|
4
|
-
name: '
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
name: 'my-notis-app',
|
|
5
|
+
title: 'My Notis App',
|
|
6
|
+
description: 'A focused Notis app with one route and one database-backed workflow.',
|
|
7
|
+
icon: 'phosphor:squares-four',
|
|
8
|
+
author: { name: 'Notis User' },
|
|
9
|
+
categories: ['Productivity'],
|
|
10
|
+
tagline: 'A clean starting point for a focused workflow.',
|
|
7
11
|
|
|
8
12
|
databases: ['items'],
|
|
9
13
|
|
|
10
14
|
routes: [
|
|
11
|
-
{ path: '/', name: 'Home', icon: '
|
|
15
|
+
{ path: '/', slug: 'home', name: 'Home', icon: 'phosphor:house', default: true },
|
|
16
|
+
// Example collection tree route:
|
|
17
|
+
// {
|
|
18
|
+
// path: '/notes',
|
|
19
|
+
// slug: 'notes',
|
|
20
|
+
// name: 'Notes',
|
|
21
|
+
// collection: {
|
|
22
|
+
// database: 'notes',
|
|
23
|
+
// titleProperty: 'Name',
|
|
24
|
+
// parentProperty: 'Parent',
|
|
25
|
+
// sidebar: {
|
|
26
|
+
// mode: 'tree',
|
|
27
|
+
// allowCreate: true,
|
|
28
|
+
// },
|
|
29
|
+
// },
|
|
30
|
+
// },
|
|
12
31
|
],
|
|
13
32
|
|
|
14
33
|
tools: [
|
|
15
|
-
'
|
|
16
|
-
'notis_upsert_document',
|
|
34
|
+
'LOCAL_NOTIS_DATABASE_QUERY',
|
|
17
35
|
],
|
|
18
36
|
});
|