@notis_ai/cli 0.2.0-beta.160.1 → 0.2.0-beta.162.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.
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: notis-cli
3
3
  description: Use when agents should work through the Notis CLI, especially to develop Notis apps locally or to access Notis, Composio, or MCP tools they do not currently have loaded directly.
4
- feature_flag: cli_access
5
4
  mcp_resource: true
6
5
  mcp_tool_patterns: []
7
6
  mcp_references: ["references/app-delivery.md", "references/tool-examples.md", "references/native-databases.md", "references/troubleshooting.md"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notis_ai/cli",
3
- "version": "0.2.0-beta.160.1",
3
+ "version": "0.2.0-beta.162.1",
4
4
  "description": "Agent-first Notis CLI for apps and generic tool execution",
5
5
  "type": "module",
6
6
  "bin": {
@@ -23,14 +23,15 @@
23
23
  "pretest": "npm run build",
24
24
  "release:prepare": "npm run build && node ./scripts/prepare-publish.js --apply",
25
25
  "smoke": "node ./scripts/smoke-package.js",
26
- "test": "node --test --test-timeout=120000"
26
+ "test": "node --test --test-timeout=120000",
27
+ "preinstall": "node ./bin/check-runtime.js"
27
28
  },
28
29
  "engines": {
29
- "node": ">=18.0.0"
30
+ "node": ">=22.12.0"
30
31
  },
31
32
  "dependencies": {
32
- "commander": "^12.0.0",
33
- "sharp": "^0.34.5"
33
+ "commander": "^15.0.0",
34
+ "sharp": "^0.35.4"
34
35
  },
35
36
  "devDependencies": {
36
37
  "esbuild": "^0.28.2"
@@ -447,7 +447,15 @@ async function debugEntitlementOverrideHandler(ctx) {
447
447
  });
448
448
  }
449
449
 
450
- function buildTraceCostSql(reference) {
450
+ export function langfuseTraceIdCandidates(reference) {
451
+ const value = String(reference);
452
+ const compact = value.replaceAll('-', '').toLowerCase();
453
+ const providerId = /^[0-9a-f]{32}$/.test(compact) && !/^0+$/.test(compact)
454
+ ? compact : createHash('sha256').update(value).digest('hex').slice(0, 32);
455
+ return [...new Set([providerId, value])];
456
+ }
457
+
458
+ export function buildTraceCostSql(reference) {
451
459
  const literal = sqlLiteral(reference);
452
460
  return `
453
461
  SELECT jsonb_build_object(
@@ -466,6 +474,8 @@ SELECT jsonb_build_object(
466
474
  FROM public.interactions AS i
467
475
  WHERE i.id::text = ${literal}
468
476
  OR to_jsonb(i)->>'trace_id' = ${literal}
477
+ OR replace(i.id::text, '-', '') = lower(${literal})
478
+ OR replace(to_jsonb(i)->>'trace_id', '-', '') = lower(${literal})
469
479
  ORDER BY i.created_at ASC;`;
470
480
  }
471
481
 
@@ -581,7 +591,10 @@ async function debugTraceCostHandler(ctx) {
581
591
  refund_basis: refundableEstimate === null
582
592
  ? 'Requires confirmed Notis bug evidence and an explicit bug-attributable cost. Misunderstandings and service limitations are not goodwill bugs.'
583
593
  : 'Capped at the lower of recorded provider cost and the explicitly attributed true-bug amount.',
584
- interactions,
594
+ interactions: interactions.map((item) => ({
595
+ ...item,
596
+ langfuse_trace_id_candidates: langfuseTraceIdCandidates(item.trace_id || item.id),
597
+ })),
585
598
  trace_file: traceDiagnostics,
586
599
  };
587
600
  return ctx.output.emitSuccess({
@@ -126,12 +126,12 @@ export function resolveBuiltBundleDir(projectDir) {
126
126
 
127
127
  function normalizeShadowScopedCss(css) {
128
128
  return css
129
- // Tailwind preflight emits `html,:host` in v3. Inside a shadow tree we want
130
- // the shadow host itself to carry those defaults.
131
- .replace(/html\s*,\s*:host\s*\{/g, ':host{')
132
- .replace(/:root\s*,\s*:host\s*\{/g, ':host{')
133
- .replace(/:root\s*\{/g, ':host{')
134
- .replace(/html\s*\{/g, ':host{')
129
+ // Keep defaults on both the Portal shadow host and the app root used
130
+ // by the standalone harness. Removing :root erases Tailwind v4 theme
131
+ // variables in previews, collapsing spacing, type sizes and controls.
132
+ .replace(/(?:html|:root)\s*,\s*:host\s*\{/g, '[data-notis-app-root],:host{')
133
+ .replace(/:root\s*\{/g, '[data-notis-app-root],:host{')
134
+ .replace(/html\s*\{/g, '[data-notis-app-root],:host{')
135
135
  // Shadow trees do not contain a body element. Route those defaults to the
136
136
  // app root contract instead so authors still get the expected reset.
137
137
  .replace(/body\s*\{/g, '[data-notis-app-root]{');
@@ -1682,7 +1682,7 @@ function normalizeScaffoldPackageScripts(pkg) {
1682
1682
  return;
1683
1683
  }
1684
1684
  // The linked SDK exports TypeScript. Vite's bundled config loader externalizes
1685
- // that import to Node, which cannot load it on supported Node 18/20 runtimes.
1685
+ // that import to Node; the minimum supported Node 22.12 lacks native TS loading.
1686
1686
  // Normalize only canonical commands; never parse or rewrite custom shell code.
1687
1687
  for (const [name, command] of Object.entries(scripts)) {
1688
1688
  if (typeof command === 'string' && /^(vite|vite build|vite preview)$/.test(command.trim())) {
@@ -407,7 +407,7 @@ function connectedCallbackHtml({ portalOrigin }) {
407
407
  <button class="button button-primary" id="download-desktop" type="button">Download Notis Desktop</button>
408
408
  <a class="button" href="${escapeHtml(webAppUrl)}">Open Web App</a>
409
409
  </div>
410
- <p class="helper">The CLI stays connected even if you continue in the web app.</p>
410
+ <p class="helper">Desktop is available for macOS and Windows. The CLI stays connected even if you continue in the web app.</p>
411
411
  </section>
412
412
  <section class="next-step" id="desktop-ready-view" aria-labelledby="desktop-ready-title" hidden>
413
413
  <div class="status"><span class="status-dot"></span> Download started</div>
@@ -433,7 +433,6 @@ function connectedCallbackHtml({ portalOrigin }) {
433
433
  const resolveDownload = async () => {
434
434
  const ua = navigator.userAgent || '';
435
435
  if (/Windows/i.test(ua)) return downloads.base + '/win32/x64/notis-x64.exe';
436
- if (/Linux/i.test(ua) && !/Android/i.test(ua)) return downloads.base + '/linux/x64/notis-linux-x64.zip';
437
436
  if (/Macintosh|Mac OS X/i.test(ua)) {
438
437
  let architecture = '';
439
438
  try {
@@ -450,6 +449,7 @@ function connectedCallbackHtml({ portalOrigin }) {
450
449
  const startDownload = async () => {
451
450
  const downloadUrl = await resolveDownload();
452
451
  window.open(downloadUrl, '_blank', 'noopener,noreferrer');
452
+ if (downloadUrl === downloads.fallback) return;
453
453
  connectedView.hidden = true;
454
454
  readyView.hidden = false;
455
455
  document.title = 'Quick login to Notis Desktop';
@@ -99,7 +99,7 @@
99
99
  </head>
100
100
  <body>
101
101
  <div id="harness-status">harness: booting</div>
102
- <div id="root"></div>
102
+ <div id="root" data-notis-app-root></div>
103
103
  <script type="module">
104
104
  const routeExport = {{ROUTE_EXPORT}};
105
105
  const descriptor = {{RUNTIME_DESCRIPTOR}};
@@ -1,3 +1,28 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
1
+ @import "tailwindcss" source(none);
2
+
3
+ @config "../tailwind.config.ts";
4
+ @source "./";
5
+ @source "../components";
6
+ @source "../lib";
7
+ @source "../packages/sdk/src";
8
+
9
+ /* Preserve v3 defaults while keeping the existing Notis theme/config. */
10
+ @theme {
11
+ --default-ring-width: 3px;
12
+ --default-ring-color: rgb(59 130 246 / 0.5);
13
+ }
14
+
15
+ @layer base {
16
+ *, ::before, ::after, ::backdrop, ::file-selector-button {
17
+ border-color: var(--color-gray-200, currentColor);
18
+ }
19
+ input::placeholder, textarea::placeholder {
20
+ color: var(--color-gray-400);
21
+ }
22
+ button:not(:disabled), [role="button"]:not(:disabled) {
23
+ cursor: pointer;
24
+ }
25
+ dialog {
26
+ margin: auto;
27
+ }
28
+ }
@@ -1,6 +1,6 @@
1
- import '@notis/sdk/styles.css';
2
1
  import { ShortcutProvider } from '@notis/sdk/interactions';
3
2
  import './globals.css';
3
+ import '@notis/sdk/styles.css';
4
4
 
5
5
  export default function AppShell({ children }: { children: React.ReactNode }) {
6
6
  // NotisProvider supplies this in the product host. Keeping the shell-level
@@ -5,7 +5,7 @@ import { cva, type VariantProps } from 'class-variance-authority';
5
5
  import { cn } from '@/lib/utils';
6
6
 
7
7
  const buttonVariants = cva(
8
- 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
8
+ 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
9
9
  {
10
10
  variants: {
11
11
  variant: {
@@ -10,7 +10,7 @@ const NativeSelect = React.forwardRef<HTMLSelectElement, React.SelectHTMLAttribu
10
10
  <span className={cn('relative inline-flex', className)}>
11
11
  <select
12
12
  ref={ref}
13
- className="h-9 w-full appearance-none rounded-md bg-muted pl-3 pr-8 text-sm text-foreground outline-none transition-colors hover:bg-muted/70 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
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
14
  {...props}
15
15
  >
16
16
  {children}