@notis_ai/cli 0.2.0-beta.160.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 +2 -0
- package/bin/check-runtime.js +15 -0
- package/bin/notis.js +2 -0
- package/dist/agent-hooks/notis-agent-hook.mjs +5213 -4877
- package/package.json +6 -5
- package/src/command-specs/diagnostics.js +15 -2
- package/src/runtime/app-platform.js +1 -1
- package/template/app/globals.css +28 -3
- package/template/app/layout.tsx +1 -1
- package/template/components/ui/button.tsx +1 -1
- package/template/components/ui/native-select.tsx +1 -1
- package/template/package-lock.json +1394 -1889
- package/template/package.json +14 -11
- package/template/packages/sdk/package.json +3 -3
- package/template/packages/sdk/src/styles.css +54 -20
- package/template/packages/sdk/src/tailwind.ts +11 -1
- package/template/packages/sdk/src/vite.ts +18 -3
- package/template/packages/sdk/tsconfig.json +1 -0
- package/template/postcss.config.mjs +1 -1
- package/template/tailwind.config.ts +1 -7
- package/template/tsconfig.json +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@notis_ai/cli",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.161.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": ">=
|
|
30
|
+
"node": ">=22.12.0"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"commander": "^
|
|
33
|
-
"sharp": "^0.
|
|
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
|
|
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({
|
|
@@ -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
|
|
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())) {
|
package/template/app/globals.css
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
@tailwind
|
|
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
|
+
}
|
package/template/app/layout.tsx
CHANGED
|
@@ -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-
|
|
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-
|
|
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}
|