@foisit/angular-wrapper 2.4.1 → 2.4.4

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 CHANGED
@@ -157,6 +157,28 @@ Define parameters and Foisit will automatically generate forms to collect them:
157
157
  }
158
158
  ```
159
159
 
160
+ **Enterprise-safe param collection controls**
161
+
162
+ - `collectRequiredViaForm` (default: true): when enabled, any missing/invalid required params are collected via a form—no conversational guessing.
163
+ - `allowAiParamExtraction` (default: true): when false, AI-extracted params are ignored; the assistant will always prompt the user for required fields.
164
+
165
+ Example:
166
+
167
+ ```typescript
168
+ {
169
+ command: 'secure create user',
170
+ description: 'No AI guessing, form-only',
171
+ collectRequiredViaForm: true,
172
+ allowAiParamExtraction: false,
173
+ parameters: [
174
+ { name: 'fullName', type: 'string', required: true },
175
+ { name: 'email', type: 'string', required: true },
176
+ { name: 'age', type: 'number', required: true, min: 18 },
177
+ ],
178
+ action: (params) => this.userService.create(params),
179
+ }
180
+ ```
181
+
160
182
  **Supported Parameter Types:**
161
183
 
162
184
  - `string` - Text input
@@ -537,8 +559,6 @@ this.assistant.addCommand({
537
559
  ### Full Type Definitions
538
560
 
539
561
  ```typescript
540
- import { AssistantCommand, InteractiveResponse } from '@foisit/core';
541
-
542
562
  // Type-safe command definition
543
563
  const myCommand: AssistantCommand = {
544
564
  command: 'update settings',
@@ -669,7 +689,6 @@ describe('AssistantService', () => {
669
689
 
670
690
  ## Related Packages
671
691
 
672
- - **[@foisit/core](../core)** - Core engine (auto-installed)
673
692
  - **[@foisit/react-wrapper](../react-wrapper)** - React integration
674
693
  - **[@foisit/vue-wrapper](../vue-wrapper)** - Vue integration
675
694
 
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class AngularWrapperComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<AngularWrapperComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<AngularWrapperComponent, "lib-angular-wrapper", never, {}, {}, never, never, true, never>;
5
+ }
@@ -0,0 +1,9 @@
1
+ import { ModuleWithProviders } from '@angular/core';
2
+ import { AssistantConfig } from '@foisit/core';
3
+ import * as i0 from "@angular/core";
4
+ export declare class AssistantModule {
5
+ static forRoot(config: AssistantConfig): ModuleWithProviders<AssistantModule>;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<AssistantModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AssistantModule, never, never, never>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<AssistantModule>;
9
+ }
@@ -0,0 +1,44 @@
1
+ import { AssistantConfig, AssistantCommand, AssistantCommandParams, InteractiveResponse } from '@foisit/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AssistantService {
4
+ private config;
5
+ private commandHandler;
6
+ private fallbackHandler;
7
+ private voiceProcessor;
8
+ private textToSpeech;
9
+ private stateManager;
10
+ private lastProcessedInput;
11
+ private processingLock;
12
+ private isActivated;
13
+ private gestureHandler;
14
+ private overlayManager;
15
+ private defaultIntroMessage;
16
+ constructor(config: AssistantConfig);
17
+ /** Start listening for activation and commands */
18
+ startListening(): void;
19
+ /** Stop listening for voice input */
20
+ stopListening(): void;
21
+ /** Reset activation state so the next activation flow can occur. */
22
+ reactivate(): void;
23
+ /** Process activation command */
24
+ private processActivation;
25
+ /** Handle recognized commands */
26
+ private handleCommand;
27
+ /**
28
+ * Cleanup resources
29
+ */
30
+ destroy(): void;
31
+ /** Unified response processing */
32
+ private processResponse;
33
+ /** Add a command dynamically (supports string or rich object) */
34
+ addCommand(commandOrObj: string | AssistantCommand, action?: (params?: AssistantCommandParams) => Promise<string | InteractiveResponse | void> | void): void;
35
+ /** Remove a command dynamically */
36
+ removeCommand(command: string): void;
37
+ /** Get all registered commands */
38
+ getCommands(): string[];
39
+ /** Toggle the assistant overlay */
40
+ toggle(onSubmit?: (input: string | Record<string, unknown>) => void, onClose?: () => void): void;
41
+ private extractUserLabel;
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<AssistantService, never>;
43
+ static ɵprov: i0.ɵɵInjectableDeclaration<AssistantService>;
44
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foisit/angular-wrapper",
3
- "version": "2.4.1",
3
+ "version": "2.4.4",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0",
6
6
  "@angular/core": "^19.0.0"
@@ -8,11 +8,24 @@
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "fesm2022",
11
- "esm2022",
11
+ "lib",
12
12
  "index.d.ts",
13
13
  "README.md"
14
14
  ],
15
- "description": "Foisit: Speak, and its done. A voice assistant library for angular apps",
15
+ "description": "A powerful AI assistant library for Angular applications, providing seamless chatbot functionality and intelligent interactions for websites.",
16
+ "keywords": [
17
+ "ai-assistant",
18
+ "chatbot",
19
+ "angular",
20
+ "ai",
21
+ "assistant",
22
+ "accessibility",
23
+ "website-integration"
24
+ ],
25
+ "homepage": "https://github.com/boluwatifee4/foisit#readme",
26
+ "bugs": {
27
+ "url": "https://github.com/boluwatifee4/foisit/issues"
28
+ },
16
29
  "repository": {
17
30
  "type": "git",
18
31
  "url": "git+https://github.com/boluwatifee4/foisit.git"