@arcteninc/core 0.0.175 → 0.0.177
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 +73 -78
- package/dist/index.cjs +3 -16
- package/dist/index.d.ts +1 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +856 -8408
- package/dist/lib/useAgent.d.ts +1 -2
- package/dist/lib/useAgent.d.ts.map +1 -1
- package/dist/types/use-agent.d.ts +3 -44
- package/dist/types/use-agent.d.ts.map +1 -1
- package/dist/utils/extract-tool-metadata.d.ts.map +1 -1
- package/package.json +7 -46
- package/scripts/arcten-cli.cjs +14 -108
- package/scripts/cli-extract-types-auto.ts +22 -4
- package/scripts/update-core.cjs +124 -0
- package/dist/components/ArctenAgent.d.ts +0 -52
- package/dist/components/ArctenAgent.d.ts.map +0 -1
- package/dist/components/ai-elements/prompt-input.d.ts +0 -187
- package/dist/components/ai-elements/prompt-input.d.ts.map +0 -1
- package/dist/components/ai-elements/reasoning.d.ts +0 -17
- package/dist/components/ai-elements/reasoning.d.ts.map +0 -1
- package/dist/components/ai-elements/response.d.ts +0 -8
- package/dist/components/ai-elements/response.d.ts.map +0 -1
- package/dist/components/ai-elements/shimmer.d.ts +0 -10
- package/dist/components/ai-elements/shimmer.d.ts.map +0 -1
- package/dist/components/citation-button.d.ts +0 -14
- package/dist/components/citation-button.d.ts.map +0 -1
- package/dist/components/citation-text-renderer.d.ts +0 -31
- package/dist/components/citation-text-renderer.d.ts.map +0 -1
- package/dist/components/secure-modals/EmailModal.d.ts +0 -10
- package/dist/components/secure-modals/EmailModal.d.ts.map +0 -1
- package/dist/components/secure-modals/FormModal.d.ts +0 -20
- package/dist/components/secure-modals/FormModal.d.ts.map +0 -1
- package/dist/components/secure-modals/PasswordModal.d.ts +0 -10
- package/dist/components/secure-modals/PasswordModal.d.ts.map +0 -1
- package/dist/components/secure-modals/PhoneModal.d.ts +0 -10
- package/dist/components/secure-modals/PhoneModal.d.ts.map +0 -1
- package/dist/components/secure-modals/PinModal.d.ts +0 -11
- package/dist/components/secure-modals/PinModal.d.ts.map +0 -1
- package/dist/components/secure-modals/SecureModalProvider.d.ts +0 -13
- package/dist/components/secure-modals/SecureModalProvider.d.ts.map +0 -1
- package/dist/components/secure-modals/TextModal.d.ts +0 -11
- package/dist/components/secure-modals/TextModal.d.ts.map +0 -1
- package/dist/components/secure-modals/index.d.ts +0 -10
- package/dist/components/secure-modals/index.d.ts.map +0 -1
- package/dist/components/secure-modals/types.d.ts +0 -34
- package/dist/components/secure-modals/types.d.ts.map +0 -1
- package/dist/components/tool-call-approval.d.ts +0 -9
- package/dist/components/tool-call-approval.d.ts.map +0 -1
- package/dist/components/tool-call-result.d.ts +0 -8
- package/dist/components/tool-call-result.d.ts.map +0 -1
- package/dist/components/ui/autotextarea.d.ts +0 -19
- package/dist/components/ui/autotextarea.d.ts.map +0 -1
- package/dist/components/ui/badge.d.ts +0 -10
- package/dist/components/ui/badge.d.ts.map +0 -1
- package/dist/components/ui/button.d.ts +0 -14
- package/dist/components/ui/button.d.ts.map +0 -1
- package/dist/components/ui/collapsible.d.ts +0 -6
- package/dist/components/ui/collapsible.d.ts.map +0 -1
- package/dist/components/ui/command.d.ts +0 -19
- package/dist/components/ui/command.d.ts.map +0 -1
- package/dist/components/ui/dialog.d.ts +0 -16
- package/dist/components/ui/dialog.d.ts.map +0 -1
- package/dist/components/ui/dropdown-menu.d.ts +0 -26
- package/dist/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/components/ui/hover-card.d.ts +0 -7
- package/dist/components/ui/hover-card.d.ts.map +0 -1
- package/dist/components/ui/input-group.d.ts +0 -17
- package/dist/components/ui/input-group.d.ts.map +0 -1
- package/dist/components/ui/input.d.ts +0 -4
- package/dist/components/ui/input.d.ts.map +0 -1
- package/dist/components/ui/kbd.d.ts +0 -4
- package/dist/components/ui/kbd.d.ts.map +0 -1
- package/dist/components/ui/select.d.ts +0 -16
- package/dist/components/ui/select.d.ts.map +0 -1
- package/dist/components/ui/textarea.d.ts +0 -4
- package/dist/components/ui/textarea.d.ts.map +0 -1
- package/dist/components/ui/tooltip.d.ts +0 -8
- package/dist/components/ui/tooltip.d.ts.map +0 -1
- package/dist/core.css +0 -1
- package/dist/utils/form-generator.d.ts +0 -29
- package/dist/utils/form-generator.d.ts.map +0 -1
- package/dist/utils/secure-param-detector.d.ts +0 -26
- package/dist/utils/secure-param-detector.d.ts.map +0 -1
- package/scripts/cli-agent-inject.ts +0 -205
- package/scripts/cli-agent-wrapper.cjs +0 -51
- package/scripts/cli-agent.ts +0 -483
- package/scripts/cli-create-project.ts +0 -608
- package/scripts/cli-create-wrapper.cjs +0 -60
- package/scripts/cli-init-wizard-wrapper.cjs +0 -58
- package/scripts/cli-init-wizard.ts +0 -646
- package/scripts/cli-prompt-wrapper.cjs +0 -51
- package/scripts/cli-prompt.ts +0 -306
- package/scripts/cli-sync-wrapper.cjs +0 -69
- package/scripts/cli-sync.ts +0 -915
- package/scripts/cli-tools-wrapper.cjs +0 -51
- package/scripts/cli-tools.ts +0 -320
- package/scripts/cli-uninstall-wrapper.cjs +0 -66
- package/scripts/cli-uninstall.ts +0 -173
- package/scripts/config-parser.ts +0 -432
- package/scripts/dashboard-sync.ts +0 -454
- package/scripts/tree-sitter-discover.ts +0 -526
- package/scripts/wasm/tree-sitter-tsx.wasm +0 -0
- package/scripts/wasm/tree-sitter-typescript.wasm +0 -0
package/dist/lib/useAgent.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { UseAgentOptions, UseAgentReturn } from '../types/use-agent';
|
|
2
|
-
export declare function useAgent({ apiBaseUrl: rawApiBaseUrl, tokenEndpoint, clientToken: providedToken, skipTokenFetch, user, tools, safeTools, safeToolNames: propSafeToolNames, toolMetadata,
|
|
3
|
-
secureInputHandler, }?: UseAgentOptions): UseAgentReturn;
|
|
2
|
+
export declare function useAgent({ apiBaseUrl: rawApiBaseUrl, tokenEndpoint, clientToken: providedToken, skipTokenFetch, user, tools, safeTools, safeToolNames: propSafeToolNames, toolMetadata, systemPrompt, agentId, agentName, projectId, enableRemoteConfig, remoteConfigUrl, initialMessages, conversationId: initialConversationId, state, onToolCall, onFinish, sources, ragConfig, ragFilters, }?: UseAgentOptions): UseAgentReturn;
|
|
4
3
|
//# sourceMappingURL=useAgent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAgent.d.ts","sourceRoot":"","sources":["../../src/lib/useAgent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAgent.d.ts","sourceRoot":"","sources":["../../src/lib/useAgent.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAIf,MAAM,oBAAoB,CAAC;AAgK5B,wBAAgB,QAAQ,CAAC,EACvB,UAAU,EAAE,aAAwC,EACpD,aAAmC,EACnC,WAAW,EAAE,aAAa,EAC1B,cAAsB,EACtB,IAAI,EACJ,KAAU,EACV,SAAc,EACd,aAAa,EAAE,iBAAiB,EAChC,YAAY,EAEZ,YAAiB,EACjB,OAAO,EACP,SAAS,EACT,SAAS,EACT,kBAAkB,EAClB,eAAe,EACf,eAAoB,EACpB,cAAc,EAAE,qBAAqB,EACrC,KAAK,EACL,UAAU,EACV,QAAQ,EACR,OAAO,EACP,SAAS,EACT,UAAU,GACX,GAAE,eAAoB,GAAG,cAAc,CAsgDvC"}
|
|
@@ -1,25 +1,5 @@
|
|
|
1
1
|
import { UIMessage } from '@ai-sdk/react';
|
|
2
|
-
import { SecureModalType, SecureInputRequest, SecureFormRequest } from '../components/secure-modals/types';
|
|
3
2
|
export type ToolFunction = (...args: any[]) => any;
|
|
4
|
-
/**
|
|
5
|
-
* Handler interface for collecting secure inputs without React.
|
|
6
|
-
* Implement this interface to provide your own secure input collection mechanism
|
|
7
|
-
* (e.g., using vanilla JS, Vue, Svelte, or any other framework).
|
|
8
|
-
*/
|
|
9
|
-
export interface SecureInputHandler {
|
|
10
|
-
/**
|
|
11
|
-
* Request a single secure input from the user.
|
|
12
|
-
* @param request The secure input request details
|
|
13
|
-
* @returns A Promise that resolves with the user's input, or null if cancelled
|
|
14
|
-
*/
|
|
15
|
-
showSecureModal: (request: SecureInputRequest) => Promise<string | null>;
|
|
16
|
-
/**
|
|
17
|
-
* Request a secure form with multiple fields from the user.
|
|
18
|
-
* @param request The secure form request details
|
|
19
|
-
* @returns A Promise that resolves with the form values, or null if cancelled
|
|
20
|
-
*/
|
|
21
|
-
showSecureForm: (request: SecureFormRequest) => Promise<Record<string, string> | null>;
|
|
22
|
-
}
|
|
23
3
|
export interface ToolCall {
|
|
24
4
|
toolCallId: string;
|
|
25
5
|
toolName: string;
|
|
@@ -54,20 +34,6 @@ export interface RagConfig {
|
|
|
54
34
|
tags?: string[];
|
|
55
35
|
};
|
|
56
36
|
}
|
|
57
|
-
export type SensitiveParamConfig = string[] | Record<string, SecureModalType>;
|
|
58
|
-
export type SensitiveOutputConfig = boolean | string[] | {
|
|
59
|
-
strategy?: "full" | "fields";
|
|
60
|
-
fields?: string[];
|
|
61
|
-
placeholder?: string;
|
|
62
|
-
includeFieldStatus?: boolean;
|
|
63
|
-
preserve?: string[];
|
|
64
|
-
};
|
|
65
|
-
export interface ToolMetadataWithSensitive {
|
|
66
|
-
[toolName: string]: {
|
|
67
|
-
sensitiveParams?: SensitiveParamConfig;
|
|
68
|
-
[key: string]: any;
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
37
|
export interface UseAgentOptions {
|
|
72
38
|
apiBaseUrl?: string;
|
|
73
39
|
tokenEndpoint?: string;
|
|
@@ -81,11 +47,6 @@ export interface UseAgentOptions {
|
|
|
81
47
|
safeTools?: ToolFunction[];
|
|
82
48
|
safeToolNames?: string[];
|
|
83
49
|
toolMetadata?: any;
|
|
84
|
-
sensitiveParams?: Record<string, SensitiveParamConfig>;
|
|
85
|
-
sensitiveOutputs?: Record<string, SensitiveOutputConfig>;
|
|
86
|
-
autoDetectSensitive?: boolean;
|
|
87
|
-
autoFormGeneration?: boolean;
|
|
88
|
-
formMode?: 'individual' | 'batch' | 'auto';
|
|
89
50
|
/**
|
|
90
51
|
* @deprecated Configure prompts on the dashboard or per-agent. This has no effect on requests.
|
|
91
52
|
*/
|
|
@@ -109,7 +70,6 @@ export interface UseAgentOptions {
|
|
|
109
70
|
lang?: string;
|
|
110
71
|
tags?: string[];
|
|
111
72
|
};
|
|
112
|
-
secureInputHandler?: SecureInputHandler;
|
|
113
73
|
}
|
|
114
74
|
export interface UseAgentReturn {
|
|
115
75
|
id: string | null;
|
|
@@ -134,10 +94,9 @@ export interface UseAgentReturn {
|
|
|
134
94
|
isLoadingConversations: boolean;
|
|
135
95
|
clientToken: string | null;
|
|
136
96
|
tokenError: string | null;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
completeSecureForm: (requestId: string, values: Record<string, string> | null) => void;
|
|
97
|
+
pendingToolApprovals: ToolCall[];
|
|
98
|
+
approveToolCall: (toolCallId: string) => Promise<void>;
|
|
99
|
+
denyToolCall: (toolCallId: string) => void;
|
|
141
100
|
safeToolNames: Set<string>;
|
|
142
101
|
}
|
|
143
102
|
//# sourceMappingURL=use-agent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-agent.d.ts","sourceRoot":"","sources":["../../src/types/use-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"use-agent.d.ts","sourceRoot":"","sources":["../../src/types/use-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAEnD,MAAM,WAAW,QAAQ;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAA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AAgB,CAAC,CAAC,SAAS,QAAQ,
|
|
1
|
+
{"version":3,"file":"extract-tool-metadata.d.ts","sourceRoot":"","sources":["../../src/utils/extract-tool-metadata.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,eAAO,MAAM,oBAAoB,eAA6C,CAAC;AAE/E;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,QAAQ,EACjD,EAAE,EAAE,CAAC,EACL,YAAY,EAAE,MAAM,GACnB,CAAC,CAGH;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,GAAG,CAAC;CACjB;AAGD,UAAU,yBAAyB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,GAAG,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAGD,UAAU,iBAAiB;IACzB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;IACrD,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;CAC/C;AAmED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,QAAQ,EAAE,EACrB,aAAa,CAAC,EACV,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,GACzC,iBAAiB,GACjB,IAAI,GACP,YAAY,EAAE,CA0EhB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcteninc/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.177",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
"types": "./dist/index.d.ts",
|
|
14
14
|
"import": "./dist/index.mjs",
|
|
15
15
|
"require": "./dist/index.cjs"
|
|
16
|
-
}
|
|
17
|
-
"./styles": "./dist/core.css"
|
|
16
|
+
}
|
|
18
17
|
},
|
|
19
18
|
"sideEffects": false,
|
|
20
19
|
"bin": {
|
|
@@ -27,32 +26,15 @@
|
|
|
27
26
|
"scripts/cli-extract-types-auto.js",
|
|
28
27
|
"scripts/cli-extract-types-auto-wrapper.cjs",
|
|
29
28
|
"scripts/cli-extract-types-auto-wrapper.js",
|
|
30
|
-
"scripts/
|
|
31
|
-
"scripts/cli
|
|
32
|
-
"scripts/cli-sync.ts",
|
|
33
|
-
"scripts/cli-sync-wrapper.cjs",
|
|
34
|
-
"scripts/cli-tools.ts",
|
|
35
|
-
"scripts/cli-tools-wrapper.cjs",
|
|
36
|
-
"scripts/cli-prompt.ts",
|
|
37
|
-
"scripts/cli-prompt-wrapper.cjs",
|
|
38
|
-
"scripts/cli-agent.ts",
|
|
39
|
-
"scripts/cli-agent-wrapper.cjs",
|
|
40
|
-
"scripts/cli-create-project.ts",
|
|
41
|
-
"scripts/cli-create-wrapper.cjs",
|
|
42
|
-
"scripts/cli-agent-inject.ts",
|
|
43
|
-
"scripts/cli-uninstall.ts",
|
|
44
|
-
"scripts/cli-uninstall-wrapper.cjs",
|
|
45
|
-
"scripts/update-core.js",
|
|
46
|
-
"scripts/arcten-cli.cjs",
|
|
47
|
-
"scripts/tree-sitter-discover.ts",
|
|
48
|
-
"scripts/dashboard-sync.ts",
|
|
49
|
-
"scripts/config-parser.ts",
|
|
50
|
-
"scripts/wasm"
|
|
29
|
+
"scripts/update-core.cjs",
|
|
30
|
+
"scripts/arcten-cli.cjs"
|
|
51
31
|
],
|
|
52
32
|
"scripts": {
|
|
53
33
|
"dev": "vite build --watch",
|
|
54
34
|
"build": "vite build",
|
|
55
|
-
"
|
|
35
|
+
"typecheck": "tsc --noEmit",
|
|
36
|
+
"prepublishOnly": "bun run build",
|
|
37
|
+
"test": "bun test"
|
|
56
38
|
},
|
|
57
39
|
"peerDependencies": {
|
|
58
40
|
"ai": "^6.0.0-beta.94",
|
|
@@ -74,33 +56,12 @@
|
|
|
74
56
|
"dependencies": {
|
|
75
57
|
"@ai-sdk/openai": "^3.0.0-beta.47",
|
|
76
58
|
"@ai-sdk/react": "^3.0.0-beta.92",
|
|
77
|
-
"@emotion/is-prop-valid": "^1.4.0",
|
|
78
|
-
"@radix-ui/react-collapsible": "^1.1.12",
|
|
79
|
-
"@radix-ui/react-dialog": "^1.1.15",
|
|
80
|
-
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
81
|
-
"@radix-ui/react-hover-card": "^1.1.15",
|
|
82
|
-
"@radix-ui/react-select": "^2.2.6",
|
|
83
|
-
"@radix-ui/react-slot": "^1.2.3",
|
|
84
|
-
"@radix-ui/react-tooltip": "^1.2.8",
|
|
85
|
-
"@radix-ui/react-use-controllable-state": "^1.2.2",
|
|
86
|
-
"@use-gesture/react": "^10.3.1",
|
|
87
59
|
"acorn": "^8.15.0",
|
|
88
60
|
"ai": "^6.0.0-beta.94",
|
|
89
|
-
"class-variance-authority": "^0.7.1",
|
|
90
|
-
"clsx": "^2.1.1",
|
|
91
|
-
"cmdk": "^1.1.1",
|
|
92
61
|
"glob": "^11.0.3",
|
|
93
|
-
"lucide-react": "^0.553.0",
|
|
94
|
-
"motion": "^12.23.24",
|
|
95
62
|
"nanoid": "^5.1.6",
|
|
96
|
-
"react-resizable-panels": "^3.0.6",
|
|
97
|
-
"rehype-katex": "^7.0.1",
|
|
98
|
-
"shadcn": "^3.5.0",
|
|
99
|
-
"streamdown": "^1.4.0",
|
|
100
|
-
"tailwind-merge": "^3.3.1",
|
|
101
63
|
"ts-json-schema-generator": "^2.4.0",
|
|
102
64
|
"tsx": "^4.19.2",
|
|
103
|
-
"tw-animate-css": "^1.4.0",
|
|
104
65
|
"typescript": "^5.9.3",
|
|
105
66
|
"web-tree-sitter": "^0.25.10",
|
|
106
67
|
"zod": "^3.24.1",
|
package/scripts/arcten-cli.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Arcten CLI -
|
|
3
|
+
* Arcten CLI - Simplified utility interface
|
|
4
4
|
* Usage: arcten <command> [options]
|
|
5
|
-
*
|
|
5
|
+
*
|
|
6
6
|
* Commands:
|
|
7
|
-
* extract-types
|
|
8
|
-
* update
|
|
9
|
-
* help
|
|
7
|
+
* extract-types Extract tool metadata from your project
|
|
8
|
+
* update Update @arcteninc/core to latest version
|
|
9
|
+
* help Show help message
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
const { spawn } = require('child_process');
|
|
@@ -14,16 +14,9 @@ const path = require('path');
|
|
|
14
14
|
const fs = require('fs');
|
|
15
15
|
|
|
16
16
|
const commands = {
|
|
17
|
-
'create': 'create',
|
|
18
|
-
'init': 'init',
|
|
19
|
-
'sync': 'sync',
|
|
20
|
-
'tools': 'tools-interactive', // Interactive AI classification
|
|
21
|
-
'prompt': 'prompt', // System prompt management
|
|
22
|
-
'agent': 'agent', // Agent configuration management
|
|
23
17
|
'extract-types': 'extract-types',
|
|
24
|
-
'setup': 'extract-types', // Alias
|
|
18
|
+
'setup': 'extract-types', // Alias
|
|
25
19
|
'update': 'update',
|
|
26
|
-
'uninstall': 'uninstall',
|
|
27
20
|
'help': showHelp,
|
|
28
21
|
'--help': showHelp,
|
|
29
22
|
'-h': showHelp,
|
|
@@ -36,80 +29,20 @@ function showHelp() {
|
|
|
36
29
|
Usage: arcten <command> [options]
|
|
37
30
|
|
|
38
31
|
Commands:
|
|
39
|
-
create [name] Create a new project with AI agent pre-configured
|
|
40
|
-
- Scaffolds Next.js project with templates
|
|
41
|
-
- Includes Customer Support, Sales, Docs, or Custom
|
|
42
|
-
- Sets up tools and configuration automatically
|
|
43
|
-
|
|
44
|
-
init AI-powered setup for AI agent integration
|
|
45
|
-
- Scans your codebase for functions
|
|
46
|
-
- AI classifies tools as safe/sensitive
|
|
47
|
-
- AI generates initial system prompt
|
|
48
|
-
- Creates .arcten/ configuration files
|
|
49
|
-
- Syncs to dashboard
|
|
50
|
-
|
|
51
|
-
sync Sync tools from codebase to dashboard
|
|
52
|
-
- Detects new/removed functions
|
|
53
|
-
- AI classifies new functions
|
|
54
|
-
- Generates .arcten/arcten.tools.ts
|
|
55
|
-
- Syncs tools to dashboard (read-only)
|
|
56
|
-
|
|
57
|
-
Options:
|
|
58
|
-
--yes Auto-confirm (for CI/scripts)
|
|
59
|
-
--classify Force AI re-classification of all tools
|
|
60
|
-
--prompt Also sync .arcten/prompt.md
|
|
61
|
-
--agents Also sync .arcten/agents/*.yaml
|
|
62
|
-
--all Sync everything (tools + prompt + agents)
|
|
63
|
-
|
|
64
|
-
tools Interactive tool classification
|
|
65
|
-
- Chat with AI to reclassify tools as safe/sensitive
|
|
66
|
-
- Updates .arcten/sync-state.json
|
|
67
|
-
- Run 'arcten sync' after to apply changes
|
|
68
|
-
|
|
69
|
-
Options:
|
|
70
|
-
--list Show current classifications
|
|
71
|
-
--reset Re-run pattern-based classification
|
|
72
|
-
|
|
73
|
-
prompt Manage system prompts
|
|
74
|
-
- Edit project-level or agent-specific prompts
|
|
75
|
-
- Opens in your $EDITOR (or VS Code)
|
|
76
|
-
|
|
77
|
-
Usage:
|
|
78
|
-
arcten prompt Edit project prompt
|
|
79
|
-
arcten prompt --agent=name Edit agent prompt
|
|
80
|
-
arcten prompt --view View current prompt
|
|
81
|
-
arcten prompt --sync Sync prompt to dashboard
|
|
82
|
-
|
|
83
|
-
agent Manage agent configurations
|
|
84
|
-
- Create/edit/delete agents in .arcten/agents/
|
|
85
|
-
- Agents sync to dashboard via 'arcten sync --agents'
|
|
86
|
-
|
|
87
|
-
Usage:
|
|
88
|
-
arcten agent create <name> Create new agent
|
|
89
|
-
arcten agent list List all agents
|
|
90
|
-
arcten agent edit <name> Edit agent config
|
|
91
|
-
arcten agent delete <name> Delete agent
|
|
92
|
-
|
|
93
32
|
extract-types, setup Extract tool metadata from your project
|
|
33
|
+
- Discovers exported functions for use as tools
|
|
34
|
+
- Generates type information and metadata
|
|
35
|
+
|
|
94
36
|
Options:
|
|
95
37
|
--tools <path> Specify tool file to scan
|
|
96
38
|
|
|
97
39
|
update Update @arcteninc/core to latest version
|
|
98
40
|
|
|
99
|
-
uninstall Remove Arcten configuration files
|
|
100
|
-
|
|
101
41
|
help Show this help message
|
|
102
42
|
|
|
103
43
|
Examples:
|
|
104
|
-
arcten
|
|
105
|
-
arcten
|
|
106
|
-
arcten sync --all Sync tools, prompt, and agents
|
|
107
|
-
arcten tools Interactive AI to reclassify tools
|
|
108
|
-
arcten tools --list Show safe vs sensitive classification
|
|
109
|
-
arcten prompt Edit project system prompt
|
|
110
|
-
arcten prompt --agent=support Edit agent-specific prompt
|
|
111
|
-
arcten agent create support Create a new agent config
|
|
112
|
-
arcten agent list List all agents
|
|
44
|
+
arcten extract-types Extract tools from default location
|
|
45
|
+
arcten extract-types --tools ./src/tools.ts
|
|
113
46
|
|
|
114
47
|
For more information, visit https://arcten.com/docs
|
|
115
48
|
`);
|
|
@@ -137,39 +70,18 @@ function main() {
|
|
|
137
70
|
const commandHandler = commands[command];
|
|
138
71
|
|
|
139
72
|
if (commandHandler === showHelp) {
|
|
140
|
-
// For help command
|
|
141
73
|
commandHandler();
|
|
142
74
|
return;
|
|
143
75
|
}
|
|
144
76
|
|
|
145
77
|
if (typeof commandHandler === 'string') {
|
|
146
|
-
// For commands that need to spawn scripts
|
|
147
78
|
let scriptPath;
|
|
148
79
|
let runner = 'node';
|
|
149
80
|
|
|
150
|
-
if (commandHandler === '
|
|
151
|
-
scriptPath = path.join(__dirname, '
|
|
152
|
-
} else if (commandHandler === 'init') {
|
|
153
|
-
scriptPath = path.join(__dirname, 'cli-init-wizard-wrapper.cjs');
|
|
154
|
-
} else if (commandHandler === 'sync') {
|
|
155
|
-
// Dedicated sync script for tools
|
|
156
|
-
scriptPath = path.join(__dirname, 'cli-sync-wrapper.cjs');
|
|
157
|
-
} else if (commandHandler === 'tools-interactive') {
|
|
158
|
-
// Interactive tool classification
|
|
159
|
-
scriptPath = path.join(__dirname, 'cli-tools-wrapper.cjs');
|
|
160
|
-
} else if (commandHandler === 'prompt') {
|
|
161
|
-
// System prompt management
|
|
162
|
-
scriptPath = path.join(__dirname, 'cli-prompt-wrapper.cjs');
|
|
163
|
-
} else if (commandHandler === 'agent') {
|
|
164
|
-
// Agent configuration management
|
|
165
|
-
scriptPath = path.join(__dirname, 'cli-agent-wrapper.cjs');
|
|
166
|
-
} else if (commandHandler === 'update') {
|
|
167
|
-
scriptPath = path.join(__dirname, 'update-core.js');
|
|
81
|
+
if (commandHandler === 'update') {
|
|
82
|
+
scriptPath = path.join(__dirname, 'update-core.cjs');
|
|
168
83
|
} else if (commandHandler === 'extract-types') {
|
|
169
|
-
// For extract-types/setup, use the wrapper script which handles TypeScript execution
|
|
170
84
|
scriptPath = path.join(__dirname, 'cli-extract-types-auto-wrapper.js');
|
|
171
|
-
} else if (commandHandler === 'uninstall') {
|
|
172
|
-
scriptPath = path.join(__dirname, 'cli-uninstall-wrapper.cjs');
|
|
173
85
|
} else {
|
|
174
86
|
console.error(`❌ Unknown command handler: ${commandHandler}`);
|
|
175
87
|
process.exit(1);
|
|
@@ -180,19 +92,14 @@ function main() {
|
|
|
180
92
|
process.exit(1);
|
|
181
93
|
}
|
|
182
94
|
|
|
183
|
-
// Spawn the script with remaining args
|
|
184
95
|
const child = spawn(runner, [scriptPath, ...commandArgs], {
|
|
185
96
|
stdio: 'inherit',
|
|
186
97
|
cwd: process.cwd(),
|
|
187
|
-
shell: true
|
|
98
|
+
shell: true
|
|
188
99
|
});
|
|
189
100
|
|
|
190
101
|
child.on('error', (error) => {
|
|
191
102
|
console.error(`❌ Failed to run command:`, error.message);
|
|
192
|
-
if (runner === 'bun' && error.code === 'ENOENT') {
|
|
193
|
-
console.error(`\n💡 Bun not found. Install it: https://bun.sh`);
|
|
194
|
-
console.error(` Or ensure tsx is available: npm install -g tsx`);
|
|
195
|
-
}
|
|
196
103
|
process.exit(1);
|
|
197
104
|
});
|
|
198
105
|
|
|
@@ -214,4 +121,3 @@ if (require.main === module) {
|
|
|
214
121
|
}
|
|
215
122
|
|
|
216
123
|
module.exports = { main };
|
|
217
|
-
|
|
@@ -1271,6 +1271,7 @@ async function extractFunctionMetadata(
|
|
|
1271
1271
|
}
|
|
1272
1272
|
|
|
1273
1273
|
const paramDescriptions = new Map<string, string>();
|
|
1274
|
+
|
|
1274
1275
|
for (const tag of jsDocTags) {
|
|
1275
1276
|
if (tag.tagName.text === 'param' && ts.isJSDocParameterTag(tag)) {
|
|
1276
1277
|
const paramName = tag.name?.getText(sourceFile);
|
|
@@ -1389,11 +1390,13 @@ async function extractFunctionMetadata(
|
|
|
1389
1390
|
}
|
|
1390
1391
|
|
|
1391
1392
|
let returnType = 'any';
|
|
1393
|
+
|
|
1394
|
+
// Try to get explicit return type annotation first
|
|
1392
1395
|
if (ts.isFunctionDeclaration(node) && node.type) {
|
|
1393
1396
|
returnType = node.type.getText(sourceFile);
|
|
1394
1397
|
} else if (
|
|
1395
|
-
ts.isVariableDeclaration(node) &&
|
|
1396
|
-
node.initializer &&
|
|
1398
|
+
ts.isVariableDeclaration(node) &&
|
|
1399
|
+
node.initializer &&
|
|
1397
1400
|
(ts.isArrowFunction(node.initializer) || ts.isFunctionExpression(node.initializer))
|
|
1398
1401
|
) {
|
|
1399
1402
|
if (node.initializer.type) {
|
|
@@ -1401,6 +1404,20 @@ async function extractFunctionMetadata(
|
|
|
1401
1404
|
}
|
|
1402
1405
|
}
|
|
1403
1406
|
|
|
1407
|
+
// If no explicit return type, use TypeScript's type inference
|
|
1408
|
+
if (returnType === 'any' && functionNode) {
|
|
1409
|
+
try {
|
|
1410
|
+
const signature = checker.getSignatureFromDeclaration(functionNode);
|
|
1411
|
+
if (signature) {
|
|
1412
|
+
const type = checker.getReturnTypeOfSignature(signature);
|
|
1413
|
+
// Format the inferred type as a string
|
|
1414
|
+
returnType = checker.typeToString(type, functionNode, ts.TypeFormatFlags.NoTruncation);
|
|
1415
|
+
}
|
|
1416
|
+
} catch (e) {
|
|
1417
|
+
// Fall back to 'any' if type inference fails
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1404
1421
|
const parametersSchema: FunctionMetadata['parameters'] = {
|
|
1405
1422
|
type: 'object',
|
|
1406
1423
|
properties,
|
|
@@ -1673,9 +1690,10 @@ async function autoDiscoverAndExtract(projectRoot: string, outputPath: string) {
|
|
|
1673
1690
|
fs.mkdirSync(outputDir, { recursive: true });
|
|
1674
1691
|
}
|
|
1675
1692
|
|
|
1676
|
-
// Generate TypeScript module
|
|
1693
|
+
// Generate TypeScript module with just metadata
|
|
1677
1694
|
const tsContent = `// Auto-generated by arcten-extract-types
|
|
1678
1695
|
// Do not edit this file manually
|
|
1696
|
+
// This file contains metadata for tools passed to useAgent/ArctenAgent
|
|
1679
1697
|
|
|
1680
1698
|
export const toolMetadata = ${JSON.stringify(output, null, 2)} as const;
|
|
1681
1699
|
`;
|
|
@@ -1685,7 +1703,7 @@ export const toolMetadata = ${JSON.stringify(output, null, 2)} as const;
|
|
|
1685
1703
|
console.log(`📁 Output: ${outputPath}`);
|
|
1686
1704
|
console.log(`\n💡 Usage in your component:`);
|
|
1687
1705
|
console.log(` import { toolMetadata } from './.arcten/tool-metadata';`);
|
|
1688
|
-
console.log(`
|
|
1706
|
+
console.log(` <ArctenAgent tools={yourTools} toolMetadata={toolMetadata.functions} />\n`);
|
|
1689
1707
|
}
|
|
1690
1708
|
|
|
1691
1709
|
// CLI
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Manual update command for @arcteninc/core
|
|
4
|
+
* Usage: arcten update
|
|
5
|
+
*
|
|
6
|
+
* This allows users to explicitly update their package.json
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
const fs = require('fs');
|
|
10
|
+
const path = require('path');
|
|
11
|
+
const { execSync } = require('child_process');
|
|
12
|
+
|
|
13
|
+
function findPackageJson(startPath = process.cwd()) {
|
|
14
|
+
let currentPath = startPath;
|
|
15
|
+
|
|
16
|
+
while (currentPath !== path.dirname(currentPath)) {
|
|
17
|
+
if (currentPath.includes('node_modules')) {
|
|
18
|
+
currentPath = path.dirname(currentPath);
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const packageJsonPath = path.join(currentPath, 'package.json');
|
|
23
|
+
if (fs.existsSync(packageJsonPath)) {
|
|
24
|
+
try {
|
|
25
|
+
const pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
26
|
+
if (pkg.name === '@arcteninc/core') {
|
|
27
|
+
currentPath = path.dirname(currentPath);
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
} catch (e) {
|
|
31
|
+
currentPath = path.dirname(currentPath);
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return packageJsonPath;
|
|
36
|
+
}
|
|
37
|
+
currentPath = path.dirname(currentPath);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function getLatestVersion() {
|
|
44
|
+
try {
|
|
45
|
+
const output = execSync('npm view @arcteninc/core version', { encoding: 'utf-8', stdio: 'pipe' });
|
|
46
|
+
return output.trim();
|
|
47
|
+
} catch (error) {
|
|
48
|
+
console.error('❌ Could not check latest version:', error.message);
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function updateVersion(packageJsonPath, packageJson, latestVersion) {
|
|
54
|
+
let updated = false;
|
|
55
|
+
|
|
56
|
+
if (packageJson.dependencies && packageJson.dependencies['@arcteninc/core']) {
|
|
57
|
+
packageJson.dependencies['@arcteninc/core'] = `^${latestVersion}`;
|
|
58
|
+
updated = true;
|
|
59
|
+
}
|
|
60
|
+
if (packageJson.devDependencies && packageJson.devDependencies['@arcteninc/core']) {
|
|
61
|
+
packageJson.devDependencies['@arcteninc/core'] = `^${latestVersion}`;
|
|
62
|
+
updated = true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (updated) {
|
|
66
|
+
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n');
|
|
67
|
+
console.log(`✅ Updated to \x1b[32m^${latestVersion}\x1b[0m in package.json\n`);
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function main() {
|
|
75
|
+
const packageJsonPath = findPackageJson();
|
|
76
|
+
if (!packageJsonPath) {
|
|
77
|
+
console.error('❌ Could not find package.json');
|
|
78
|
+
process.exit(1);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
82
|
+
const deps = { ...packageJson.dependencies, ...packageJson.devDependencies };
|
|
83
|
+
const currentVersion = deps['@arcteninc/core'];
|
|
84
|
+
|
|
85
|
+
if (!currentVersion) {
|
|
86
|
+
console.error('❌ @arcteninc/core not found in dependencies');
|
|
87
|
+
process.exit(1);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const latestVersion = getLatestVersion();
|
|
91
|
+
if (!latestVersion) {
|
|
92
|
+
process.exit(1);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const currentVersionMatch = currentVersion.match(/(\d+\.\d+\.\d+)/);
|
|
96
|
+
if (!currentVersionMatch) {
|
|
97
|
+
console.error('❌ Invalid version format:', currentVersion);
|
|
98
|
+
process.exit(1);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const current = currentVersionMatch[1];
|
|
102
|
+
|
|
103
|
+
if (current === latestVersion) {
|
|
104
|
+
console.log(`\n✅ Already on latest version: \x1b[32m${latestVersion}\x1b[0m\n`);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
console.log(`\n📦 Updating @arcteninc/core\n`);
|
|
109
|
+
console.log(` Current: \x1b[33m${current}\x1b[0m`);
|
|
110
|
+
console.log(` Latest: \x1b[32m${latestVersion}\x1b[0m\n`);
|
|
111
|
+
|
|
112
|
+
if (updateVersion(packageJsonPath, packageJson, latestVersion)) {
|
|
113
|
+
console.log(`💡 Next steps:`);
|
|
114
|
+
console.log(` 1. Review the changes in package.json`);
|
|
115
|
+
console.log(` 2. Run \x1b[36mnpm install\x1b[0m to install the update\n`);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (require.main === module) {
|
|
120
|
+
main();
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
module.exports = { main };
|
|
124
|
+
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { SensitiveParamConfig } from '../types/use-agent';
|
|
2
|
-
export type ToolFunction = (...args: any[]) => any;
|
|
3
|
-
export interface RagConfig {
|
|
4
|
-
enabled?: boolean;
|
|
5
|
-
organizationId?: string;
|
|
6
|
-
autoExecute?: boolean;
|
|
7
|
-
filters?: {
|
|
8
|
-
docIds?: string[];
|
|
9
|
-
pageIds?: string[];
|
|
10
|
-
site?: string;
|
|
11
|
-
lang?: string;
|
|
12
|
-
tags?: string[];
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export interface ArctenAgentProps {
|
|
16
|
-
theme?: "light" | "dark" | "auto";
|
|
17
|
-
layout?: "sidebar";
|
|
18
|
-
model?: "auto" | "anthropic:sonnet-4.5" | "groq:oss-120b" | "openai:gpt-5";
|
|
19
|
-
animated?: boolean;
|
|
20
|
-
title?: string;
|
|
21
|
-
logo?: React.ReactNode;
|
|
22
|
-
defaultWidth?: number;
|
|
23
|
-
minWidth?: number;
|
|
24
|
-
maxWidth?: number;
|
|
25
|
-
initiallyExpanded?: boolean;
|
|
26
|
-
tools?: ToolFunction[];
|
|
27
|
-
safeTools?: ToolFunction[];
|
|
28
|
-
safeToolNames?: string[];
|
|
29
|
-
toolMetadata?: any;
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated Configure prompts from the dashboard/agents UI. This prop is ignored.
|
|
32
|
-
*/
|
|
33
|
-
systemPrompt?: string;
|
|
34
|
-
agentId?: string;
|
|
35
|
-
agentName?: string;
|
|
36
|
-
tokenEndpoint?: string;
|
|
37
|
-
apiBaseUrl?: string;
|
|
38
|
-
user?: {
|
|
39
|
-
id: string;
|
|
40
|
-
[key: string]: any;
|
|
41
|
-
};
|
|
42
|
-
state?: Record<string, any>;
|
|
43
|
-
onStateChange?: (state: Record<string, any>) => void;
|
|
44
|
-
allowStateEdits?: boolean;
|
|
45
|
-
sources?: string[];
|
|
46
|
-
ragConfig?: RagConfig;
|
|
47
|
-
showCitations?: boolean;
|
|
48
|
-
sensitiveParams?: Record<string, SensitiveParamConfig>;
|
|
49
|
-
autoDetectSensitive?: boolean;
|
|
50
|
-
}
|
|
51
|
-
export declare function ArctenAgent(props: ArctenAgentProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
-
//# sourceMappingURL=ArctenAgent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ArctenAgent.d.ts","sourceRoot":"","sources":["../../src/components/ArctenAgent.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAkX/D,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAEnD,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE;QACR,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