@valtimo-plugins/claude-plugin 0.1.0

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 ADDED
@@ -0,0 +1,6 @@
1
+ # @valtimo-plugins/claude-plugin
2
+
3
+ The Angular half of the Claude plugin: the plugin configuration screen and the configuration screen for the
4
+ `ask-claude` action, plus their Dutch and English translations.
5
+
6
+ See the [plugin documentation](../../../documentation/plugin.md) for how to register it in an application.
@@ -0,0 +1,470 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, Output, Input, Component, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import * as i3 from '@valtimo/plugin';
6
+ import { PluginTranslatePipeModule } from '@valtimo/plugin';
7
+ import * as i2 from '@valtimo/components';
8
+ import { CarbonMultiInputModule, FormModule, InputModule, ParagraphModule, SelectModule } from '@valtimo/components';
9
+ import { BehaviorSubject, switchMap, combineLatest, take, filter, map } from 'rxjs';
10
+
11
+ /*
12
+ * Copyright 2026 Ritense BV, the Netherlands.
13
+ *
14
+ * Licensed under EUPL, Version 1.2 (the "License");
15
+ * you may not use this file except in compliance with the License.
16
+ * You may obtain a copy of the License at
17
+ *
18
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
19
+ *
20
+ * Unless required by applicable law or agreed to in writing, software
21
+ * distributed under the License is distributed on an "AS IS" basis,
22
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23
+ * See the License for the specific language governing permissions and
24
+ * limitations under the License.
25
+ */
26
+ /**
27
+ * The models offered in the configuration dropdown. Not a closed set on the backend —
28
+ * a configuration may name any model id the API accepts — but these are the ones worth
29
+ * one click.
30
+ */
31
+ const CLAUDE_MODELS = {
32
+ OPUS_5: "claude-opus-5",
33
+ SONNET_5: "claude-sonnet-5",
34
+ HAIKU_4_5: "claude-haiku-4-5",
35
+ };
36
+ /** `output_config.effort`; leaving it empty is the API's own default (`high`). */
37
+ const CLAUDE_EFFORTS = ["low", "medium", "high", "xhigh", "max"];
38
+
39
+ /*
40
+ * Copyright 2026 Ritense BV, the Netherlands.
41
+ *
42
+ * Licensed under EUPL, Version 1.2 (the "License");
43
+ * you may not use this file except in compliance with the License.
44
+ * You may obtain a copy of the License at
45
+ *
46
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
47
+ *
48
+ * Unless required by applicable law or agreed to in writing, software
49
+ * distributed under the License is distributed on an "AS IS" basis,
50
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
51
+ * See the License for the specific language governing permissions and
52
+ * limitations under the License.
53
+ */
54
+
55
+ /*
56
+ * Copyright 2026 Ritense BV, the Netherlands.
57
+ *
58
+ * Licensed under EUPL, Version 1.2 (the "License");
59
+ * you may not use this file except in compliance with the License.
60
+ * You may obtain a copy of the License at
61
+ *
62
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
63
+ *
64
+ * Unless required by applicable law or agreed to in writing, software
65
+ * distributed under the License is distributed on an "AS IS" basis,
66
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
67
+ * See the License for the specific language governing permissions and
68
+ * limitations under the License.
69
+ */
70
+ class ClaudePluginConfigurationComponent {
71
+ constructor() {
72
+ this.valid = new EventEmitter();
73
+ this.configuration = new EventEmitter();
74
+ this.modelItems = [
75
+ { id: CLAUDE_MODELS.OPUS_5, text: "Claude Opus 5" },
76
+ { id: CLAUDE_MODELS.SONNET_5, text: "Claude Sonnet 5" },
77
+ { id: CLAUDE_MODELS.HAIKU_4_5, text: "Claude Haiku 4.5" },
78
+ ];
79
+ this.effortItems = CLAUDE_EFFORTS.map(effort => ({ id: effort, text: effort }));
80
+ this.formValue$ = new BehaviorSubject(null);
81
+ this.valid$ = new BehaviorSubject(false);
82
+ }
83
+ ngOnInit() {
84
+ this.openSaveSubscription();
85
+ }
86
+ ngOnDestroy() {
87
+ this.saveSubscription?.unsubscribe();
88
+ }
89
+ formValueChange(formValue) {
90
+ this.formValue$.next(formValue);
91
+ this.handleValid(formValue);
92
+ }
93
+ /**
94
+ * The API key is deliberately not part of the check. Like every secret it is not
95
+ * returned when an existing configuration is edited, so requiring it here would make
96
+ * such a configuration impossible to save again — the backend requires it instead.
97
+ */
98
+ handleValid(formValue) {
99
+ const valid = !!formValue.configurationTitle;
100
+ this.valid$.next(valid);
101
+ this.valid.emit(valid);
102
+ }
103
+ openSaveSubscription() {
104
+ this.saveSubscription = this.save$
105
+ ?.pipe(switchMap(() => combineLatest([this.formValue$, this.valid$]).pipe(take(1))), filter(([_, valid]) => valid), map(([formValue]) => formValue))
106
+ .subscribe(formValue => {
107
+ this.configuration.emit(formValue);
108
+ });
109
+ }
110
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ClaudePluginConfigurationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
111
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: ClaudePluginConfigurationComponent, isStandalone: false, selector: "valtimo-claude-plugin-configuration", inputs: { save$: "save$", disabled$: "disabled$", pluginId: "pluginId", prefillConfiguration$: "prefillConfiguration$" }, outputs: { valid: "valid", configuration: "configuration" }, ngImport: i0, template: "<!--\n ~ Copyright 2026 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<!--\n Every input is a direct child of <v-form>, never nested in a wrapper: v-form collects\n its fields with @ContentChildren(InputComponent), which defaults to descendants: false,\n so an input inside a <div> would silently drop out of the saved configuration.\n-->\n<v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null\n } as obs\"\n>\n <v-input\n name=\"configurationTitle\"\n [title]=\"'configurationTitle' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.configurationTitle\"\n [required]=\"true\"\n [tooltip]=\"'configurationTitleTooltip' | pluginTranslate: pluginId | async\"\n [widthPx]=\"350\"\n placeholder=\"Claude\"\n ></v-input>\n <v-input\n type=\"password\"\n name=\"apiKey\"\n [title]=\"'apiKey' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.apiKey\"\n [tooltip]=\"'apiKeyTooltip' | pluginTranslate: pluginId | async\"\n [widthPx]=\"350\"\n ></v-input>\n <v-input\n name=\"baseUrl\"\n [title]=\"'baseUrl' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.baseUrl\"\n [tooltip]=\"'baseUrlTooltip' | pluginTranslate: pluginId | async\"\n placeholder=\"https://api.anthropic.com\"\n ></v-input>\n <v-select\n name=\"model\"\n [items]=\"modelItems\"\n [title]=\"'model' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultSelectionId]=\"obs.prefill?.model\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'modelTooltip' | pluginTranslate: pluginId | async\"\n ></v-select>\n <v-select\n name=\"effort\"\n [items]=\"effortItems\"\n [title]=\"'effort' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultSelectionId]=\"obs.prefill?.effort\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'effortTooltip' | pluginTranslate: pluginId | async\"\n ></v-select>\n <v-input\n type=\"checkbox\"\n name=\"thinking\"\n [title]=\"'thinking' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.thinking ?? true\"\n [tooltip]=\"'thinkingTooltip' | pluginTranslate: pluginId | async\"\n ></v-input>\n <v-input\n type=\"number\"\n name=\"maxTokens\"\n [title]=\"'maxTokens' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.maxTokens\"\n [tooltip]=\"'maxTokensTooltip' | pluginTranslate: pluginId | async\"\n [min]=\"1\"\n [widthPx]=\"350\"\n placeholder=\"16000\"\n ></v-input>\n <v-input\n type=\"number\"\n name=\"timeoutSeconds\"\n [title]=\"'timeoutSeconds' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.timeoutSeconds\"\n [tooltip]=\"'timeoutSecondsTooltip' | pluginTranslate: pluginId | async\"\n [min]=\"1\"\n [widthPx]=\"350\"\n placeholder=\"600\"\n ></v-input>\n <!-- A textarea: v-input's text branch caps at [maxLength]=\"maxLength\" (250 by default). -->\n <v-input\n type=\"textarea\"\n name=\"systemPrompt\"\n [title]=\"'systemPrompt' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.systemPrompt\"\n [tooltip]=\"'systemPromptTooltip' | pluginTranslate: pluginId | async\"\n [fullWidth]=\"true\"\n [rows]=\"4\"\n ></v-input>\n</v-form>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i2.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder", "dataTestId", "trim", "presetsTitle", "presetOptions"], outputs: ["valueChange"] }, { kind: "component", type: i2.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "dropUp", "invalid", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "clearable", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme", "appendInline", "warn", "warnText", "dataTestId"], outputs: ["selectedChange"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.PluginTranslatePipe, name: "pluginTranslate" }] }); }
112
+ }
113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ClaudePluginConfigurationComponent, decorators: [{
114
+ type: Component,
115
+ args: [{ standalone: false, selector: "valtimo-claude-plugin-configuration", template: "<!--\n ~ Copyright 2026 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<!--\n Every input is a direct child of <v-form>, never nested in a wrapper: v-form collects\n its fields with @ContentChildren(InputComponent), which defaults to descendants: false,\n so an input inside a <div> would silently drop out of the saved configuration.\n-->\n<v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null\n } as obs\"\n>\n <v-input\n name=\"configurationTitle\"\n [title]=\"'configurationTitle' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.configurationTitle\"\n [required]=\"true\"\n [tooltip]=\"'configurationTitleTooltip' | pluginTranslate: pluginId | async\"\n [widthPx]=\"350\"\n placeholder=\"Claude\"\n ></v-input>\n <v-input\n type=\"password\"\n name=\"apiKey\"\n [title]=\"'apiKey' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.apiKey\"\n [tooltip]=\"'apiKeyTooltip' | pluginTranslate: pluginId | async\"\n [widthPx]=\"350\"\n ></v-input>\n <v-input\n name=\"baseUrl\"\n [title]=\"'baseUrl' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.baseUrl\"\n [tooltip]=\"'baseUrlTooltip' | pluginTranslate: pluginId | async\"\n placeholder=\"https://api.anthropic.com\"\n ></v-input>\n <v-select\n name=\"model\"\n [items]=\"modelItems\"\n [title]=\"'model' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultSelectionId]=\"obs.prefill?.model\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'modelTooltip' | pluginTranslate: pluginId | async\"\n ></v-select>\n <v-select\n name=\"effort\"\n [items]=\"effortItems\"\n [title]=\"'effort' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultSelectionId]=\"obs.prefill?.effort\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'effortTooltip' | pluginTranslate: pluginId | async\"\n ></v-select>\n <v-input\n type=\"checkbox\"\n name=\"thinking\"\n [title]=\"'thinking' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.thinking ?? true\"\n [tooltip]=\"'thinkingTooltip' | pluginTranslate: pluginId | async\"\n ></v-input>\n <v-input\n type=\"number\"\n name=\"maxTokens\"\n [title]=\"'maxTokens' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.maxTokens\"\n [tooltip]=\"'maxTokensTooltip' | pluginTranslate: pluginId | async\"\n [min]=\"1\"\n [widthPx]=\"350\"\n placeholder=\"16000\"\n ></v-input>\n <v-input\n type=\"number\"\n name=\"timeoutSeconds\"\n [title]=\"'timeoutSeconds' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.timeoutSeconds\"\n [tooltip]=\"'timeoutSecondsTooltip' | pluginTranslate: pluginId | async\"\n [min]=\"1\"\n [widthPx]=\"350\"\n placeholder=\"600\"\n ></v-input>\n <!-- A textarea: v-input's text branch caps at [maxLength]=\"maxLength\" (250 by default). -->\n <v-input\n type=\"textarea\"\n name=\"systemPrompt\"\n [title]=\"'systemPrompt' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.systemPrompt\"\n [tooltip]=\"'systemPromptTooltip' | pluginTranslate: pluginId | async\"\n [fullWidth]=\"true\"\n [rows]=\"4\"\n ></v-input>\n</v-form>\n" }]
116
+ }], propDecorators: { save$: [{
117
+ type: Input
118
+ }], disabled$: [{
119
+ type: Input
120
+ }], pluginId: [{
121
+ type: Input
122
+ }], prefillConfiguration$: [{
123
+ type: Input
124
+ }], valid: [{
125
+ type: Output
126
+ }], configuration: [{
127
+ type: Output
128
+ }] } });
129
+
130
+ /*
131
+ * Copyright 2026 Ritense BV, the Netherlands.
132
+ *
133
+ * Licensed under EUPL, Version 1.2 (the "License");
134
+ * you may not use this file except in compliance with the License.
135
+ * You may obtain a copy of the License at
136
+ *
137
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
138
+ *
139
+ * Unless required by applicable law or agreed to in writing, software
140
+ * distributed under the License is distributed on an "AS IS" basis,
141
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
142
+ * See the License for the specific language governing permissions and
143
+ * limitations under the License.
144
+ */
145
+ const asText = (lines) => (lines ?? []).join("\n");
146
+ const asLines = (text) => (text ?? "").split("\n");
147
+ class AskClaudeConfigurationComponent {
148
+ constructor() {
149
+ this.valid = new EventEmitter();
150
+ this.configuration = new EventEmitter();
151
+ /**
152
+ * The saved configuration in the shape the form's own fields take, resolved once per
153
+ * prefill. Deliberately not method calls in the template: that would hand the
154
+ * multi-input a new array on every change-detection run, and each one restarts its
155
+ * value stream.
156
+ */
157
+ this.prefill$ = new BehaviorSubject({ resultMappings: [] });
158
+ this.formValue$ = new BehaviorSubject(null);
159
+ this.valid$ = new BehaviorSubject(false);
160
+ }
161
+ ngOnInit() {
162
+ this.openSaveSubscription();
163
+ this.openPrefillSubscription();
164
+ }
165
+ ngOnDestroy() {
166
+ this.saveSubscription?.unsubscribe();
167
+ this.prefillSubscription?.unsubscribe();
168
+ }
169
+ formValueChange(formValue) {
170
+ this.formValue$.next(this.toConfig(formValue));
171
+ this.handleValid(formValue);
172
+ }
173
+ handleValid(formValue) {
174
+ const valid = !!formValue.prompt?.trim();
175
+ this.valid$.next(valid);
176
+ this.valid.emit(valid);
177
+ }
178
+ openPrefillSubscription() {
179
+ this.prefillSubscription = this.prefillConfiguration$?.subscribe(prefill => {
180
+ this.prefill$.next({
181
+ prompt: asText(prefill?.prompt),
182
+ systemPrompt: asText(prefill?.systemPrompt),
183
+ documentResourceId: prefill?.documentResourceId,
184
+ resultVariable: prefill?.resultVariable,
185
+ resultMappings: (prefill?.resultMappings ?? []).map(mapping => ({
186
+ key: mapping.source,
187
+ value: mapping.target,
188
+ })),
189
+ });
190
+ });
191
+ }
192
+ /**
193
+ * The form speaks text and key/value; the plugin action speaks lines and source/target.
194
+ * Mapping rows that are only half filled in are dropped rather than saved as broken
195
+ * mappings, and an empty system prompt is left out entirely so the action falls back to
196
+ * the one on the plugin configuration.
197
+ */
198
+ toConfig(formValue) {
199
+ const { prompt, systemPrompt, resultMappings, ...rest } = formValue;
200
+ return {
201
+ ...rest,
202
+ prompt: asLines(prompt),
203
+ ...(systemPrompt?.trim() ? { systemPrompt: asLines(systemPrompt) } : {}),
204
+ resultMappings: (resultMappings ?? [])
205
+ .filter(row => !!row.key && !!row.value)
206
+ .map(row => ({ source: row.key, target: row.value })),
207
+ };
208
+ }
209
+ openSaveSubscription() {
210
+ this.saveSubscription = this.save$
211
+ ?.pipe(switchMap(() => combineLatest([this.formValue$, this.valid$]).pipe(take(1))), filter(([_, valid]) => valid), map(([formValue]) => formValue))
212
+ .subscribe(formValue => {
213
+ this.configuration.emit(formValue);
214
+ });
215
+ }
216
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AskClaudeConfigurationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
217
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: AskClaudeConfigurationComponent, isStandalone: false, selector: "valtimo-ask-claude-configuration", inputs: { save$: "save$", disabled$: "disabled$", pluginId: "pluginId", prefillConfiguration$: "prefillConfiguration$" }, outputs: { valid: "valid", configuration: "configuration" }, ngImport: i0, template: "<!--\n ~ Copyright 2026 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<p style=\"margin-bottom: 1.5rem\">{{ 'actionDescription' | pluginTranslate: pluginId | async }}</p>\n\n<v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefill$ | async\n } as obs\"\n>\n <!--\n A textarea, not a text input: v-input's text branch binds [maxLength]=\"maxLength\", whose\n default is 250 characters, and it is one line high. Neither is a prompt field. The\n textarea branch binds no maxLength at all.\n -->\n <v-input\n type=\"textarea\"\n name=\"prompt\"\n [title]=\"'prompt' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.prompt\"\n [disabled]=\"obs.disabled\"\n [required]=\"true\"\n [tooltip]=\"'promptTooltip' | pluginTranslate: pluginId | async\"\n [fullWidth]=\"true\"\n [rows]=\"8\"\n ></v-input>\n <v-input\n type=\"textarea\"\n name=\"systemPrompt\"\n [title]=\"'systemPrompt' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.systemPrompt\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'actionSystemPromptTooltip' | pluginTranslate: pluginId | async\"\n [fullWidth]=\"true\"\n [rows]=\"4\"\n ></v-input>\n <v-input\n name=\"documentResourceId\"\n [title]=\"'documentResourceId' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.documentResourceId\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'documentResourceIdTooltip' | pluginTranslate: pluginId | async\"\n placeholder=\"pv:resourceId\"\n ></v-input>\n <v-input\n name=\"resultVariable\"\n [title]=\"'resultVariable' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.resultVariable\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'resultVariableTooltip' | pluginTranslate: pluginId | async\"\n placeholder=\"claudeAnswer\"\n ></v-input>\n <valtimo-carbon-multi-input\n name=\"resultMappings\"\n type=\"keyValue\"\n [title]=\"'resultMappings' | pluginTranslate: pluginId | async\"\n [tooltip]=\"'resultMappingsTooltip' | pluginTranslate: pluginId | async\"\n [keyColumnTitle]=\"'resultMappingSource' | pluginTranslate: pluginId | async\"\n [valueColumnTitle]=\"'resultMappingTarget' | pluginTranslate: pluginId | async\"\n [addRowText]=\"'resultMappingAddRow' | pluginTranslate: pluginId | async\"\n [defaultValues]=\"obs.prefill?.resultMappings ?? []\"\n [disabled]=\"!!obs.disabled\"\n [margin]=\"true\"\n [fullWidth]=\"true\"\n ></valtimo-carbon-multi-input>\n</v-form>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.CarbonMultiInputComponent, selector: "valtimo-carbon-multi-input", inputs: ["addRowText", "addButtonType", "addRowTranslationKey", "arbitraryAmountTitles", "arbitraryValueAmount", "defaultValues", "deleteRowText", "deleteRowTranslationKey", "disabled", "dropdownColumnTitle", "dropdownItems", "dropdownWidth", "fullWidth", "hideAddButton", "hideDeleteButton", "initialAmountOfRows", "keyColumnTitle", "margin", "maxRows", "minimumAmountOfRows", "name", "required", "title", "titleTranslationKey", "tooltip", "type", "valueColumnTitle", "valuePathSelectorCaseDefinitionKey", "valuePathSelectorPrefixes", "valuePathSelectorShowCaseDefinitionSelector", "valuePathSelectorNotation", "keyColumnFlex", "dropdownColumnFlex", "valueColumnFlex"], outputs: ["valueChange", "allValuesValidEvent"] }, { kind: "component", type: i2.FormComponent, selector: "v-form", inputs: ["className"], outputs: ["valueChange"] }, { kind: "component", type: i2.InputComponent, selector: "v-input", inputs: ["name", "type", "title", "titleTranslationKey", "defaultValue", "widthPx", "fullWidth", "margin", "smallMargin", "disabled", "step", "min", "maxLength", "tooltip", "required", "hideNumberSpinBox", "smallLabel", "rows", "clear$", "carbonTheme", "placeholder", "dataTestId", "trim", "presetsTitle", "presetOptions"], outputs: ["valueChange"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.PluginTranslatePipe, name: "pluginTranslate" }] }); }
218
+ }
219
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: AskClaudeConfigurationComponent, decorators: [{
220
+ type: Component,
221
+ args: [{ standalone: false, selector: "valtimo-ask-claude-configuration", template: "<!--\n ~ Copyright 2026 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<p style=\"margin-bottom: 1.5rem\">{{ 'actionDescription' | pluginTranslate: pluginId | async }}</p>\n\n<v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefill$ | async\n } as obs\"\n>\n <!--\n A textarea, not a text input: v-input's text branch binds [maxLength]=\"maxLength\", whose\n default is 250 characters, and it is one line high. Neither is a prompt field. The\n textarea branch binds no maxLength at all.\n -->\n <v-input\n type=\"textarea\"\n name=\"prompt\"\n [title]=\"'prompt' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.prompt\"\n [disabled]=\"obs.disabled\"\n [required]=\"true\"\n [tooltip]=\"'promptTooltip' | pluginTranslate: pluginId | async\"\n [fullWidth]=\"true\"\n [rows]=\"8\"\n ></v-input>\n <v-input\n type=\"textarea\"\n name=\"systemPrompt\"\n [title]=\"'systemPrompt' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.systemPrompt\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'actionSystemPromptTooltip' | pluginTranslate: pluginId | async\"\n [fullWidth]=\"true\"\n [rows]=\"4\"\n ></v-input>\n <v-input\n name=\"documentResourceId\"\n [title]=\"'documentResourceId' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.documentResourceId\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'documentResourceIdTooltip' | pluginTranslate: pluginId | async\"\n placeholder=\"pv:resourceId\"\n ></v-input>\n <v-input\n name=\"resultVariable\"\n [title]=\"'resultVariable' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.resultVariable\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'resultVariableTooltip' | pluginTranslate: pluginId | async\"\n placeholder=\"claudeAnswer\"\n ></v-input>\n <valtimo-carbon-multi-input\n name=\"resultMappings\"\n type=\"keyValue\"\n [title]=\"'resultMappings' | pluginTranslate: pluginId | async\"\n [tooltip]=\"'resultMappingsTooltip' | pluginTranslate: pluginId | async\"\n [keyColumnTitle]=\"'resultMappingSource' | pluginTranslate: pluginId | async\"\n [valueColumnTitle]=\"'resultMappingTarget' | pluginTranslate: pluginId | async\"\n [addRowText]=\"'resultMappingAddRow' | pluginTranslate: pluginId | async\"\n [defaultValues]=\"obs.prefill?.resultMappings ?? []\"\n [disabled]=\"!!obs.disabled\"\n [margin]=\"true\"\n [fullWidth]=\"true\"\n ></valtimo-carbon-multi-input>\n</v-form>\n" }]
222
+ }], propDecorators: { save$: [{
223
+ type: Input
224
+ }], disabled$: [{
225
+ type: Input
226
+ }], pluginId: [{
227
+ type: Input
228
+ }], prefillConfiguration$: [{
229
+ type: Input
230
+ }], valid: [{
231
+ type: Output
232
+ }], configuration: [{
233
+ type: Output
234
+ }] } });
235
+
236
+ /*
237
+ * Copyright 2026 Ritense BV, the Netherlands.
238
+ *
239
+ * Licensed under EUPL, Version 1.2 (the "License");
240
+ * you may not use this file except in compliance with the License.
241
+ * You may obtain a copy of the License at
242
+ *
243
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
244
+ *
245
+ * Unless required by applicable law or agreed to in writing, software
246
+ * distributed under the License is distributed on an "AS IS" basis,
247
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
248
+ * See the License for the specific language governing permissions and
249
+ * limitations under the License.
250
+ */
251
+ class ClaudePluginModule {
252
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ClaudePluginModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
253
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: ClaudePluginModule, declarations: [ClaudePluginConfigurationComponent, AskClaudeConfigurationComponent], imports: [CommonModule,
254
+ PluginTranslatePipeModule,
255
+ CarbonMultiInputModule,
256
+ FormModule,
257
+ InputModule,
258
+ ParagraphModule,
259
+ SelectModule], exports: [ClaudePluginConfigurationComponent, AskClaudeConfigurationComponent] }); }
260
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ClaudePluginModule, imports: [CommonModule,
261
+ PluginTranslatePipeModule,
262
+ CarbonMultiInputModule,
263
+ FormModule,
264
+ InputModule,
265
+ ParagraphModule,
266
+ SelectModule] }); }
267
+ }
268
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ClaudePluginModule, decorators: [{
269
+ type: NgModule,
270
+ args: [{
271
+ declarations: [ClaudePluginConfigurationComponent, AskClaudeConfigurationComponent],
272
+ imports: [
273
+ CommonModule,
274
+ PluginTranslatePipeModule,
275
+ CarbonMultiInputModule,
276
+ FormModule,
277
+ InputModule,
278
+ ParagraphModule,
279
+ SelectModule,
280
+ ],
281
+ exports: [ClaudePluginConfigurationComponent, AskClaudeConfigurationComponent],
282
+ }]
283
+ }] });
284
+
285
+ /*
286
+ * Copyright 2026 Ritense BV, the Netherlands.
287
+ *
288
+ * Licensed under EUPL, Version 1.2 (the "License");
289
+ * you may not use this file except in compliance with the License.
290
+ * You may obtain a copy of the License at
291
+ *
292
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
293
+ *
294
+ * Unless required by applicable law or agreed to in writing, software
295
+ * distributed under the License is distributed on an "AS IS" basis,
296
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
297
+ * See the License for the specific language governing permissions and
298
+ * limitations under the License.
299
+ */
300
+ // An eight-ray burst in Anthropic's coral. Inline rather than a file in assets/,
301
+ // because the plugin framework wants a data URI it can put straight into an <img src>.
302
+ const CLAUDE_PLUGIN_LOGO_BASE64 = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjRDk3NzU3IiBzdHJva2Utd2lkdGg9IjIuMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIj48bGluZSB4MT0iMTIiIHkxPSIyLjgiIHgyPSIxMiIgeTI9IjIxLjIiLz48bGluZSB4MT0iMi44IiB5MT0iMTIiIHgyPSIyMS4yIiB5Mj0iMTIiLz48bGluZSB4MT0iNS41IiB5MT0iNS41IiB4Mj0iMTguNSIgeTI9IjE4LjUiLz48bGluZSB4MT0iMTguNSIgeTE9IjUuNSIgeDI9IjUuNSIgeTI9IjE4LjUiLz48L3N2Zz4=";
303
+
304
+ /*
305
+ * Copyright 2026 Ritense BV, the Netherlands.
306
+ *
307
+ * Licensed under EUPL, Version 1.2 (the "License");
308
+ * you may not use this file except in compliance with the License.
309
+ * You may obtain a copy of the License at
310
+ *
311
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
312
+ *
313
+ * Unless required by applicable law or agreed to in writing, software
314
+ * distributed under the License is distributed on an "AS IS" basis,
315
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
316
+ * See the License for the specific language governing permissions and
317
+ * limitations under the License.
318
+ */
319
+
320
+ /*
321
+ * Copyright 2026 Ritense BV, the Netherlands.
322
+ *
323
+ * Licensed under EUPL, Version 1.2 (the "License");
324
+ * you may not use this file except in compliance with the License.
325
+ * You may obtain a copy of the License at
326
+ *
327
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
328
+ *
329
+ * Unless required by applicable law or agreed to in writing, software
330
+ * distributed under the License is distributed on an "AS IS" basis,
331
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
332
+ * See the License for the specific language governing permissions and
333
+ * limitations under the License.
334
+ */
335
+ // `pluginId` must equal ClaudePlugin.PLUGIN_KEY on the backend, and the keys of
336
+ // functionConfigurationComponents must equal its @PluginAction keys.
337
+ const claudePluginSpecification = {
338
+ pluginId: "claude",
339
+ pluginConfigurationComponent: ClaudePluginConfigurationComponent,
340
+ pluginLogoBase64: CLAUDE_PLUGIN_LOGO_BASE64,
341
+ functionConfigurationComponents: {
342
+ "ask-claude": AskClaudeConfigurationComponent,
343
+ },
344
+ pluginTranslations: {
345
+ nl: {
346
+ title: "Claude",
347
+ description: "Stel Claude een vraag vanuit een proces en gebruik het antwoord in de zaak.",
348
+ "ask-claude": "Claude vragen",
349
+ configurationTitle: "Configuratienaam",
350
+ configurationTitleTooltip: "De naam van de huidige plugin-configuratie. Onder deze naam kan de configuratie in de rest van de " +
351
+ "applicatie teruggevonden worden.",
352
+ apiKey: "API-sleutel",
353
+ apiKeyTooltip: "De Anthropic API-sleutel waarmee deze configuratie vragen stelt. Bij het bewerken van een bestaande " +
354
+ "configuratie blijft dit veld leeg; laat het leeg om de opgeslagen sleutel te behouden.",
355
+ baseUrl: "API-URL",
356
+ baseUrlTooltip: "Optioneel: een afwijkende API-URL, bijvoorbeeld die van een gateway of proxy. Laat leeg voor de " +
357
+ "Anthropic API zelf.",
358
+ model: "Model",
359
+ modelTooltip: "Het Claude-model dat de vraag beantwoordt. Laat leeg voor Claude Opus 5.",
360
+ effort: "Inspanning",
361
+ effortTooltip: "Hoeveel Claude aan een vraag mag besteden. Hoger betekent een beter antwoord, maar ook trager en " +
362
+ "duurder. Laat leeg voor de standaard ('high').",
363
+ thinking: "Nadenken (adaptive thinking)",
364
+ thinkingTooltip: "Laat Claude zelf bepalen hoe lang het over een vraag nadenkt. Aanbevolen. Uitzetten kan alleen bij " +
365
+ "inspanning 'low', 'medium' of 'high'.",
366
+ maxTokens: "Maximumlengte antwoord (tokens)",
367
+ maxTokensTooltip: "Het maximum aantal tokens in het antwoord. Wordt het antwoord hierdoor afgekapt, dan is " +
368
+ "claudeStopReason 'max_tokens'. Laat leeg voor 16000.",
369
+ timeoutSeconds: "Time-out (seconden)",
370
+ timeoutSecondsTooltip: "Hoelang op een antwoord gewacht wordt. Een moeilijke vraag met hoge inspanning duurt lang. " +
371
+ "Laat leeg voor 600 seconden.",
372
+ systemPrompt: "Systeemprompt",
373
+ systemPromptTooltip: "Optioneel: instructies die voor elke actie op deze configuratie gelden, bijvoorbeeld de rol of de " +
374
+ "toon. Een actie kan dit overschrijven.",
375
+ actionDescription: "Stelt Claude de onderstaande vraag en slaat het antwoord op als procesvariabele. Optioneel worden " +
376
+ "velden uit een JSON-antwoord naar procesvariabelen of het zaakdossier geschreven.",
377
+ prompt: "Vraag",
378
+ promptTooltip: "De vraag aan Claude. Gebruik {{pv:variabele}} of {{doc:/pad}} om zaakgegevens in de tekst te " +
379
+ "verwerken, bijv. 'Beoordeel {{doc:/vraag}} op spoed'.",
380
+ actionSystemPromptTooltip: "Optioneel: overschrijft de systeemprompt van de plugin-configuratie voor deze ene actie. " +
381
+ "Ondersteunt dezelfde {{pv:...}}- en {{doc:...}}-placeholders.",
382
+ documentResourceId: "Document",
383
+ documentResourceIdTooltip: "Optioneel: het Valtimo resource-id van een bestand dat met de vraag wordt meegestuurd, meestal " +
384
+ "pv:resourceId. PDF, afbeelding of tekst; maximaal 10 MB (instelbaar).",
385
+ resultVariable: "Procesvariabele voor het antwoord",
386
+ resultVariableTooltip: "De naam waaronder het antwoord wordt opgeslagen. Laat leeg voor claudeAnswer.",
387
+ resultMappings: "Antwoord verwerken",
388
+ resultMappingsTooltip: "Optioneel: haal velden uit een JSON-antwoord en zet ze in een procesvariabele of het zaakdossier. " +
389
+ "Werkt alleen als Claude JSON antwoordt — vraag daar in de prompt expliciet om.",
390
+ resultMappingSource: "Veld in antwoord (bijv. /nettoBedrag)",
391
+ resultMappingTarget: "Doel (pv:naam of doc:/pad)",
392
+ resultMappingAddRow: "Regel toevoegen",
393
+ },
394
+ en: {
395
+ title: "Claude",
396
+ description: "Ask Claude a question from a process and use the answer in the case.",
397
+ "ask-claude": "Ask Claude",
398
+ configurationTitle: "Configuration name",
399
+ configurationTitleTooltip: "The name of the current plugin configuration. Under this name, the configuration can be found in " +
400
+ "the rest of the application.",
401
+ apiKey: "API key",
402
+ apiKeyTooltip: "The Anthropic API key this configuration asks with. When editing an existing configuration this " +
403
+ "field stays empty; leave it empty to keep the stored key.",
404
+ baseUrl: "API URL",
405
+ baseUrlTooltip: "Optional: a different API URL, for instance that of a gateway or proxy. Leave empty for the " +
406
+ "Anthropic API itself.",
407
+ model: "Model",
408
+ modelTooltip: "The Claude model that answers the question. Leave empty for Claude Opus 5.",
409
+ effort: "Effort",
410
+ effortTooltip: "How much Claude may spend on a question. Higher means a better answer, but also slower and more " +
411
+ "expensive. Leave empty for the default ('high').",
412
+ thinking: "Thinking (adaptive thinking)",
413
+ thinkingTooltip: "Let Claude decide how long to think about a question. Recommended. Switching it off is only " +
414
+ "accepted at effort 'low', 'medium' or 'high'.",
415
+ maxTokens: "Maximum answer length (tokens)",
416
+ maxTokensTooltip: "The maximum number of tokens in the answer. If the answer is cut off by this, claudeStopReason is " +
417
+ "'max_tokens'. Leave empty for 16000.",
418
+ timeoutSeconds: "Timeout (seconds)",
419
+ timeoutSecondsTooltip: "How long to wait for an answer. A hard question at high effort takes a while. Leave empty for 600 " +
420
+ "seconds.",
421
+ systemPrompt: "System prompt",
422
+ systemPromptTooltip: "Optional: instructions that apply to every action on this configuration, such as the role or the " +
423
+ "tone. An action can override this.",
424
+ actionDescription: "Asks Claude the question below and stores the answer as a process variable. Optionally writes " +
425
+ "fields from a JSON answer to process variables or the case document.",
426
+ prompt: "Question",
427
+ promptTooltip: "The question for Claude. Use {{pv:variable}} or {{doc:/path}} to weave case data into the text, " +
428
+ "e.g. 'Assess {{doc:/question}} for urgency'.",
429
+ actionSystemPromptTooltip: "Optional: overrides the plugin configuration's system prompt for this one action. Supports the " +
430
+ "same {{pv:...}} and {{doc:...}} placeholders.",
431
+ documentResourceId: "Document",
432
+ documentResourceIdTooltip: "Optional: the Valtimo resource id of a file to send along with the question, usually " +
433
+ "pv:resourceId. PDF, image or text; maximum 10 MB (configurable).",
434
+ resultVariable: "Process variable for the answer",
435
+ resultVariableTooltip: "The name the answer is stored under. Leave empty for claudeAnswer.",
436
+ resultMappings: "Process the answer",
437
+ resultMappingsTooltip: "Optional: take fields out of a JSON answer and put them in a process variable or the case " +
438
+ "document. Only works when Claude answers in JSON — ask for that explicitly in the prompt.",
439
+ resultMappingSource: "Field in answer (e.g. /netAmount)",
440
+ resultMappingTarget: "Target (pv:name or doc:/path)",
441
+ resultMappingAddRow: "Add row",
442
+ },
443
+ },
444
+ };
445
+
446
+ /*
447
+ * Copyright 2026 Ritense BV, the Netherlands.
448
+ *
449
+ * Licensed under EUPL, Version 1.2 (the "License");
450
+ * you may not use this file except in compliance with the License.
451
+ * You may obtain a copy of the License at
452
+ *
453
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
454
+ *
455
+ * Unless required by applicable law or agreed to in writing, software
456
+ * distributed under the License is distributed on an "AS IS" basis,
457
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
458
+ * See the License for the specific language governing permissions and
459
+ * limitations under the License.
460
+ */
461
+ /*
462
+ * Public API Surface of claude-plugin
463
+ */
464
+
465
+ /**
466
+ * Generated bundle index. Do not edit.
467
+ */
468
+
469
+ export { AskClaudeConfigurationComponent, CLAUDE_EFFORTS, CLAUDE_MODELS, ClaudePluginConfigurationComponent, ClaudePluginModule, claudePluginSpecification };
470
+ //# sourceMappingURL=valtimo-plugins-claude-plugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valtimo-plugins-claude-plugin.mjs","sources":["../../src/lib/plugins/claude-plugin/models/config.ts","../../src/lib/plugins/claude-plugin/models/index.ts","../../src/lib/plugins/claude-plugin/components/claude-plugin-configuration/claude-plugin-configuration.component.ts","../../src/lib/plugins/claude-plugin/components/claude-plugin-configuration/claude-plugin-configuration.component.html","../../src/lib/plugins/claude-plugin/components/ask-claude-configuration/ask-claude-configuration.component.ts","../../src/lib/plugins/claude-plugin/components/ask-claude-configuration/ask-claude-configuration.component.html","../../src/lib/plugins/claude-plugin/claude-plugin-module.ts","../../src/lib/plugins/claude-plugin/assets/claude-plugin-logo.ts","../../src/lib/plugins/claude-plugin/assets/index.ts","../../src/lib/plugins/claude-plugin/claude-plugin.specification.ts","../../src/public_api.ts","../../src/valtimo-plugins-claude-plugin.ts"],"sourcesContent":["/*\n * Copyright 2026 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {PluginConfigurationData} from \"@valtimo/plugin\";\n\n/**\n * The models offered in the configuration dropdown. Not a closed set on the backend —\n * a configuration may name any model id the API accepts — but these are the ones worth\n * one click.\n */\nconst CLAUDE_MODELS = {\n OPUS_5: \"claude-opus-5\",\n SONNET_5: \"claude-sonnet-5\",\n HAIKU_4_5: \"claude-haiku-4-5\",\n} as const;\n\n/** `output_config.effort`; leaving it empty is the API's own default (`high`). */\nconst CLAUDE_EFFORTS = [\"low\", \"medium\", \"high\", \"xhigh\", \"max\"] as const;\n\ntype ClaudeEffort = (typeof CLAUDE_EFFORTS)[number];\n\ninterface ClaudePluginConfig extends PluginConfigurationData {\n apiKey: string;\n // All optional: every one of these has a default on the backend.\n baseUrl?: string;\n model?: string;\n maxTokens?: number;\n effort?: ClaudeEffort;\n thinking?: boolean;\n systemPrompt?: string;\n timeoutSeconds?: number;\n}\n\n/**\n * One line of the result mapping: `source` is a JSON pointer into Claude's answer,\n * `target` a value-resolver expression (`pv:urgency` or `doc:/zaak/urgentie`).\n */\ninterface ClaudeResultMapping {\n source: string;\n target: string;\n}\n\ninterface AskClaudeConfig {\n /**\n * The prompt as its lines, joined with newlines by the backend.\n *\n * An array rather than a string, and not a matter of taste: Valtimo runs every *textual*\n * action property through its value resolvers before the action runs, and reads a leading\n * `word:` as a resolver prefix — so a prompt opening \"Context: ...\" would fail the step\n * with \"No resolver factory found for value prefix Context\". An array is passed through\n * untouched.\n */\n prompt: string[];\n systemPrompt?: string[];\n // Valtimo resource id of a file to send along, usually `pv:resourceId`.\n documentResourceId?: string;\n resultVariable?: string;\n resultMappings?: ClaudeResultMapping[];\n}\n\nexport {AskClaudeConfig, CLAUDE_EFFORTS, CLAUDE_MODELS, ClaudeEffort, ClaudePluginConfig, ClaudeResultMapping};\n","/*\n * Copyright 2026 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from \"./config\";\n","/*\n * Copyright 2026 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, EventEmitter, Input, OnDestroy, OnInit, Output} from \"@angular/core\";\nimport {PluginConfigurationComponent, PluginConfigurationData} from \"@valtimo/plugin\";\nimport {SelectItem} from \"@valtimo/components\";\nimport {BehaviorSubject, combineLatest, filter, map, Observable, Subscription, switchMap, take} from \"rxjs\";\nimport {CLAUDE_EFFORTS, CLAUDE_MODELS, ClaudePluginConfig} from \"../../models\";\n\n@Component({\n standalone: false,\n selector: \"valtimo-claude-plugin-configuration\",\n templateUrl: \"./claude-plugin-configuration.component.html\",\n})\nexport class ClaudePluginConfigurationComponent implements PluginConfigurationComponent, OnInit, OnDestroy {\n @Input() save$!: Observable<void>;\n @Input() disabled$!: Observable<boolean>;\n @Input() pluginId!: string;\n @Input() prefillConfiguration$!: Observable<ClaudePluginConfig>;\n @Output() valid: EventEmitter<boolean> = new EventEmitter<boolean>();\n @Output() configuration: EventEmitter<PluginConfigurationData> = new EventEmitter<PluginConfigurationData>();\n\n readonly modelItems: SelectItem[] = [\n {id: CLAUDE_MODELS.OPUS_5, text: \"Claude Opus 5\"},\n {id: CLAUDE_MODELS.SONNET_5, text: \"Claude Sonnet 5\"},\n {id: CLAUDE_MODELS.HAIKU_4_5, text: \"Claude Haiku 4.5\"},\n ];\n\n readonly effortItems: SelectItem[] = CLAUDE_EFFORTS.map(effort => ({id: effort, text: effort}));\n\n private saveSubscription!: Subscription;\n private readonly formValue$ = new BehaviorSubject<ClaudePluginConfig | null>(null);\n private readonly valid$ = new BehaviorSubject<boolean>(false);\n\n ngOnInit(): void {\n this.openSaveSubscription();\n }\n\n ngOnDestroy(): void {\n this.saveSubscription?.unsubscribe();\n }\n\n formValueChange(formValue: ClaudePluginConfig): void {\n this.formValue$.next(formValue);\n this.handleValid(formValue);\n }\n\n /**\n * The API key is deliberately not part of the check. Like every secret it is not\n * returned when an existing configuration is edited, so requiring it here would make\n * such a configuration impossible to save again — the backend requires it instead.\n */\n private handleValid(formValue: ClaudePluginConfig): void {\n const valid = !!formValue.configurationTitle;\n this.valid$.next(valid);\n this.valid.emit(valid);\n }\n\n private openSaveSubscription(): void {\n this.saveSubscription = this.save$\n ?.pipe(\n switchMap(() => combineLatest([this.formValue$, this.valid$]).pipe(take(1))),\n filter(([_, valid]) => valid),\n map(([formValue]) => formValue)\n )\n .subscribe(formValue => {\n this.configuration.emit(formValue!);\n });\n }\n}\n","<!--\n ~ Copyright 2026 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<!--\n Every input is a direct child of <v-form>, never nested in a wrapper: v-form collects\n its fields with @ContentChildren(InputComponent), which defaults to descendants: false,\n so an input inside a <div> would silently drop out of the saved configuration.\n-->\n<v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefillConfiguration$ ? (prefillConfiguration$ | async) : null\n } as obs\"\n>\n <v-input\n name=\"configurationTitle\"\n [title]=\"'configurationTitle' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.configurationTitle\"\n [required]=\"true\"\n [tooltip]=\"'configurationTitleTooltip' | pluginTranslate: pluginId | async\"\n [widthPx]=\"350\"\n placeholder=\"Claude\"\n ></v-input>\n <v-input\n type=\"password\"\n name=\"apiKey\"\n [title]=\"'apiKey' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.apiKey\"\n [tooltip]=\"'apiKeyTooltip' | pluginTranslate: pluginId | async\"\n [widthPx]=\"350\"\n ></v-input>\n <v-input\n name=\"baseUrl\"\n [title]=\"'baseUrl' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.baseUrl\"\n [tooltip]=\"'baseUrlTooltip' | pluginTranslate: pluginId | async\"\n placeholder=\"https://api.anthropic.com\"\n ></v-input>\n <v-select\n name=\"model\"\n [items]=\"modelItems\"\n [title]=\"'model' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultSelectionId]=\"obs.prefill?.model\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'modelTooltip' | pluginTranslate: pluginId | async\"\n ></v-select>\n <v-select\n name=\"effort\"\n [items]=\"effortItems\"\n [title]=\"'effort' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultSelectionId]=\"obs.prefill?.effort\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'effortTooltip' | pluginTranslate: pluginId | async\"\n ></v-select>\n <v-input\n type=\"checkbox\"\n name=\"thinking\"\n [title]=\"'thinking' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.thinking ?? true\"\n [tooltip]=\"'thinkingTooltip' | pluginTranslate: pluginId | async\"\n ></v-input>\n <v-input\n type=\"number\"\n name=\"maxTokens\"\n [title]=\"'maxTokens' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.maxTokens\"\n [tooltip]=\"'maxTokensTooltip' | pluginTranslate: pluginId | async\"\n [min]=\"1\"\n [widthPx]=\"350\"\n placeholder=\"16000\"\n ></v-input>\n <v-input\n type=\"number\"\n name=\"timeoutSeconds\"\n [title]=\"'timeoutSeconds' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.timeoutSeconds\"\n [tooltip]=\"'timeoutSecondsTooltip' | pluginTranslate: pluginId | async\"\n [min]=\"1\"\n [widthPx]=\"350\"\n placeholder=\"600\"\n ></v-input>\n <!-- A textarea: v-input's text branch caps at [maxLength]=\"maxLength\" (250 by default). -->\n <v-input\n type=\"textarea\"\n name=\"systemPrompt\"\n [title]=\"'systemPrompt' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [disabled]=\"obs.disabled\"\n [defaultValue]=\"obs.prefill?.systemPrompt\"\n [tooltip]=\"'systemPromptTooltip' | pluginTranslate: pluginId | async\"\n [fullWidth]=\"true\"\n [rows]=\"4\"\n ></v-input>\n</v-form>\n","/*\n * Copyright 2026 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, EventEmitter, Input, OnDestroy, OnInit, Output} from \"@angular/core\";\nimport {FunctionConfigurationComponent, FunctionConfigurationData} from \"@valtimo/plugin\";\nimport {MultiInputKeyValue} from \"@valtimo/components\";\nimport {BehaviorSubject, combineLatest, filter, map, Observable, Subscription, switchMap, take} from \"rxjs\";\nimport {AskClaudeConfig} from \"../../models\";\n\n/**\n * What `v-form` emits: the textareas contribute one block of text rather than lines, and\n * the multi-input key/value rows rather than source/target.\n */\ntype AskClaudeFormValue = Omit<AskClaudeConfig, \"prompt\" | \"systemPrompt\" | \"resultMappings\"> & {\n prompt?: string;\n systemPrompt?: string;\n resultMappings?: MultiInputKeyValue[];\n};\n\nconst asText = (lines?: string[]): string => (lines ?? []).join(\"\\n\");\nconst asLines = (text?: string): string[] => (text ?? \"\").split(\"\\n\");\n\n@Component({\n standalone: false,\n selector: \"valtimo-ask-claude-configuration\",\n templateUrl: \"./ask-claude-configuration.component.html\",\n})\nexport class AskClaudeConfigurationComponent implements FunctionConfigurationComponent, OnInit, OnDestroy {\n @Input() save$!: Observable<void>;\n @Input() disabled$!: Observable<boolean>;\n @Input() pluginId!: string;\n @Input() prefillConfiguration$!: Observable<AskClaudeConfig>;\n @Output() valid: EventEmitter<boolean> = new EventEmitter<boolean>();\n @Output() configuration: EventEmitter<FunctionConfigurationData> = new EventEmitter<FunctionConfigurationData>();\n\n /**\n * The saved configuration in the shape the form's own fields take, resolved once per\n * prefill. Deliberately not method calls in the template: that would hand the\n * multi-input a new array on every change-detection run, and each one restarts its\n * value stream.\n */\n readonly prefill$ = new BehaviorSubject<AskClaudeFormValue>({resultMappings: []});\n\n private saveSubscription!: Subscription;\n private prefillSubscription!: Subscription;\n private readonly formValue$ = new BehaviorSubject<AskClaudeConfig | null>(null);\n private readonly valid$ = new BehaviorSubject<boolean>(false);\n\n ngOnInit(): void {\n this.openSaveSubscription();\n this.openPrefillSubscription();\n }\n\n ngOnDestroy(): void {\n this.saveSubscription?.unsubscribe();\n this.prefillSubscription?.unsubscribe();\n }\n\n formValueChange(formValue: AskClaudeFormValue): void {\n this.formValue$.next(this.toConfig(formValue));\n this.handleValid(formValue);\n }\n\n private handleValid(formValue: AskClaudeFormValue): void {\n const valid = !!formValue.prompt?.trim();\n this.valid$.next(valid);\n this.valid.emit(valid);\n }\n\n private openPrefillSubscription(): void {\n this.prefillSubscription = this.prefillConfiguration$?.subscribe(prefill => {\n this.prefill$.next({\n prompt: asText(prefill?.prompt),\n systemPrompt: asText(prefill?.systemPrompt),\n documentResourceId: prefill?.documentResourceId,\n resultVariable: prefill?.resultVariable,\n resultMappings: (prefill?.resultMappings ?? []).map(mapping => ({\n key: mapping.source,\n value: mapping.target,\n })),\n });\n });\n }\n\n /**\n * The form speaks text and key/value; the plugin action speaks lines and source/target.\n * Mapping rows that are only half filled in are dropped rather than saved as broken\n * mappings, and an empty system prompt is left out entirely so the action falls back to\n * the one on the plugin configuration.\n */\n private toConfig(formValue: AskClaudeFormValue): AskClaudeConfig {\n const {prompt, systemPrompt, resultMappings, ...rest} = formValue;\n return {\n ...rest,\n prompt: asLines(prompt),\n ...(systemPrompt?.trim() ? {systemPrompt: asLines(systemPrompt)} : {}),\n resultMappings: (resultMappings ?? [])\n .filter(row => !!row.key && !!row.value)\n .map(row => ({source: row.key!, target: row.value!})),\n };\n }\n\n private openSaveSubscription(): void {\n this.saveSubscription = this.save$\n ?.pipe(\n switchMap(() => combineLatest([this.formValue$, this.valid$]).pipe(take(1))),\n filter(([_, valid]) => valid),\n map(([formValue]) => formValue)\n )\n .subscribe(formValue => {\n this.configuration.emit(formValue!);\n });\n }\n}\n","<!--\n ~ Copyright 2026 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<p style=\"margin-bottom: 1.5rem\">{{ 'actionDescription' | pluginTranslate: pluginId | async }}</p>\n\n<v-form\n (valueChange)=\"formValueChange($event)\"\n *ngIf=\"{\n disabled: disabled$ | async,\n prefill: prefill$ | async\n } as obs\"\n>\n <!--\n A textarea, not a text input: v-input's text branch binds [maxLength]=\"maxLength\", whose\n default is 250 characters, and it is one line high. Neither is a prompt field. The\n textarea branch binds no maxLength at all.\n -->\n <v-input\n type=\"textarea\"\n name=\"prompt\"\n [title]=\"'prompt' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.prompt\"\n [disabled]=\"obs.disabled\"\n [required]=\"true\"\n [tooltip]=\"'promptTooltip' | pluginTranslate: pluginId | async\"\n [fullWidth]=\"true\"\n [rows]=\"8\"\n ></v-input>\n <v-input\n type=\"textarea\"\n name=\"systemPrompt\"\n [title]=\"'systemPrompt' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.systemPrompt\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'actionSystemPromptTooltip' | pluginTranslate: pluginId | async\"\n [fullWidth]=\"true\"\n [rows]=\"4\"\n ></v-input>\n <v-input\n name=\"documentResourceId\"\n [title]=\"'documentResourceId' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.documentResourceId\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'documentResourceIdTooltip' | pluginTranslate: pluginId | async\"\n placeholder=\"pv:resourceId\"\n ></v-input>\n <v-input\n name=\"resultVariable\"\n [title]=\"'resultVariable' | pluginTranslate: pluginId | async\"\n [margin]=\"true\"\n [defaultValue]=\"obs.prefill?.resultVariable\"\n [disabled]=\"obs.disabled\"\n [tooltip]=\"'resultVariableTooltip' | pluginTranslate: pluginId | async\"\n placeholder=\"claudeAnswer\"\n ></v-input>\n <valtimo-carbon-multi-input\n name=\"resultMappings\"\n type=\"keyValue\"\n [title]=\"'resultMappings' | pluginTranslate: pluginId | async\"\n [tooltip]=\"'resultMappingsTooltip' | pluginTranslate: pluginId | async\"\n [keyColumnTitle]=\"'resultMappingSource' | pluginTranslate: pluginId | async\"\n [valueColumnTitle]=\"'resultMappingTarget' | pluginTranslate: pluginId | async\"\n [addRowText]=\"'resultMappingAddRow' | pluginTranslate: pluginId | async\"\n [defaultValues]=\"obs.prefill?.resultMappings ?? []\"\n [disabled]=\"!!obs.disabled\"\n [margin]=\"true\"\n [fullWidth]=\"true\"\n ></valtimo-carbon-multi-input>\n</v-form>\n","/*\n * Copyright 2026 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from \"@angular/core\";\nimport {CommonModule} from \"@angular/common\";\nimport {PluginTranslatePipeModule} from \"@valtimo/plugin\";\nimport {\n CarbonMultiInputModule,\n FormModule,\n InputModule as ValtimoInputModule,\n ParagraphModule,\n SelectModule,\n} from \"@valtimo/components\";\nimport {ClaudePluginConfigurationComponent} from \"./components/claude-plugin-configuration/claude-plugin-configuration.component\";\nimport {AskClaudeConfigurationComponent} from \"./components/ask-claude-configuration/ask-claude-configuration.component\";\n\n@NgModule({\n declarations: [ClaudePluginConfigurationComponent, AskClaudeConfigurationComponent],\n imports: [\n CommonModule,\n PluginTranslatePipeModule,\n CarbonMultiInputModule,\n FormModule,\n ValtimoInputModule,\n ParagraphModule,\n SelectModule,\n ],\n exports: [ClaudePluginConfigurationComponent, AskClaudeConfigurationComponent],\n})\nexport class ClaudePluginModule {}\n","/*\n * Copyright 2026 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// An eight-ray burst in Anthropic's coral. Inline rather than a file in assets/,\n// because the plugin framework wants a data URI it can put straight into an <img src>.\nconst CLAUDE_PLUGIN_LOGO_BASE64 =\n \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjRDk3NzU3IiBzdHJva2Utd2lkdGg9IjIuMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIj48bGluZSB4MT0iMTIiIHkxPSIyLjgiIHgyPSIxMiIgeTI9IjIxLjIiLz48bGluZSB4MT0iMi44IiB5MT0iMTIiIHgyPSIyMS4yIiB5Mj0iMTIiLz48bGluZSB4MT0iNS41IiB5MT0iNS41IiB4Mj0iMTguNSIgeTI9IjE4LjUiLz48bGluZSB4MT0iMTguNSIgeTE9IjUuNSIgeDI9IjUuNSIgeTI9IjE4LjUiLz48L3N2Zz4=\";\n\nexport {CLAUDE_PLUGIN_LOGO_BASE64};\n","/*\n * Copyright 2026 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from \"./claude-plugin-logo\";\n","/*\n * Copyright 2026 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {PluginSpecification} from \"@valtimo/plugin\";\nimport {ClaudePluginConfigurationComponent} from \"./components/claude-plugin-configuration/claude-plugin-configuration.component\";\nimport {AskClaudeConfigurationComponent} from \"./components/ask-claude-configuration/ask-claude-configuration.component\";\nimport {CLAUDE_PLUGIN_LOGO_BASE64} from \"./assets\";\n\n// `pluginId` must equal ClaudePlugin.PLUGIN_KEY on the backend, and the keys of\n// functionConfigurationComponents must equal its @PluginAction keys.\nconst claudePluginSpecification: PluginSpecification = {\n pluginId: \"claude\",\n pluginConfigurationComponent: ClaudePluginConfigurationComponent,\n pluginLogoBase64: CLAUDE_PLUGIN_LOGO_BASE64,\n functionConfigurationComponents: {\n \"ask-claude\": AskClaudeConfigurationComponent,\n },\n pluginTranslations: {\n nl: {\n title: \"Claude\",\n description: \"Stel Claude een vraag vanuit een proces en gebruik het antwoord in de zaak.\",\n \"ask-claude\": \"Claude vragen\",\n configurationTitle: \"Configuratienaam\",\n configurationTitleTooltip:\n \"De naam van de huidige plugin-configuratie. Onder deze naam kan de configuratie in de rest van de \" +\n \"applicatie teruggevonden worden.\",\n apiKey: \"API-sleutel\",\n apiKeyTooltip:\n \"De Anthropic API-sleutel waarmee deze configuratie vragen stelt. Bij het bewerken van een bestaande \" +\n \"configuratie blijft dit veld leeg; laat het leeg om de opgeslagen sleutel te behouden.\",\n baseUrl: \"API-URL\",\n baseUrlTooltip:\n \"Optioneel: een afwijkende API-URL, bijvoorbeeld die van een gateway of proxy. Laat leeg voor de \" +\n \"Anthropic API zelf.\",\n model: \"Model\",\n modelTooltip: \"Het Claude-model dat de vraag beantwoordt. Laat leeg voor Claude Opus 5.\",\n effort: \"Inspanning\",\n effortTooltip:\n \"Hoeveel Claude aan een vraag mag besteden. Hoger betekent een beter antwoord, maar ook trager en \" +\n \"duurder. Laat leeg voor de standaard ('high').\",\n thinking: \"Nadenken (adaptive thinking)\",\n thinkingTooltip:\n \"Laat Claude zelf bepalen hoe lang het over een vraag nadenkt. Aanbevolen. Uitzetten kan alleen bij \" +\n \"inspanning 'low', 'medium' of 'high'.\",\n maxTokens: \"Maximumlengte antwoord (tokens)\",\n maxTokensTooltip:\n \"Het maximum aantal tokens in het antwoord. Wordt het antwoord hierdoor afgekapt, dan is \" +\n \"claudeStopReason 'max_tokens'. Laat leeg voor 16000.\",\n timeoutSeconds: \"Time-out (seconden)\",\n timeoutSecondsTooltip:\n \"Hoelang op een antwoord gewacht wordt. Een moeilijke vraag met hoge inspanning duurt lang. \" +\n \"Laat leeg voor 600 seconden.\",\n systemPrompt: \"Systeemprompt\",\n systemPromptTooltip:\n \"Optioneel: instructies die voor elke actie op deze configuratie gelden, bijvoorbeeld de rol of de \" +\n \"toon. Een actie kan dit overschrijven.\",\n actionDescription:\n \"Stelt Claude de onderstaande vraag en slaat het antwoord op als procesvariabele. Optioneel worden \" +\n \"velden uit een JSON-antwoord naar procesvariabelen of het zaakdossier geschreven.\",\n prompt: \"Vraag\",\n promptTooltip:\n \"De vraag aan Claude. Gebruik {{pv:variabele}} of {{doc:/pad}} om zaakgegevens in de tekst te \" +\n \"verwerken, bijv. 'Beoordeel {{doc:/vraag}} op spoed'.\",\n actionSystemPromptTooltip:\n \"Optioneel: overschrijft de systeemprompt van de plugin-configuratie voor deze ene actie. \" +\n \"Ondersteunt dezelfde {{pv:...}}- en {{doc:...}}-placeholders.\",\n documentResourceId: \"Document\",\n documentResourceIdTooltip:\n \"Optioneel: het Valtimo resource-id van een bestand dat met de vraag wordt meegestuurd, meestal \" +\n \"pv:resourceId. PDF, afbeelding of tekst; maximaal 10 MB (instelbaar).\",\n resultVariable: \"Procesvariabele voor het antwoord\",\n resultVariableTooltip: \"De naam waaronder het antwoord wordt opgeslagen. Laat leeg voor claudeAnswer.\",\n resultMappings: \"Antwoord verwerken\",\n resultMappingsTooltip:\n \"Optioneel: haal velden uit een JSON-antwoord en zet ze in een procesvariabele of het zaakdossier. \" +\n \"Werkt alleen als Claude JSON antwoordt — vraag daar in de prompt expliciet om.\",\n resultMappingSource: \"Veld in antwoord (bijv. /nettoBedrag)\",\n resultMappingTarget: \"Doel (pv:naam of doc:/pad)\",\n resultMappingAddRow: \"Regel toevoegen\",\n },\n en: {\n title: \"Claude\",\n description: \"Ask Claude a question from a process and use the answer in the case.\",\n \"ask-claude\": \"Ask Claude\",\n configurationTitle: \"Configuration name\",\n configurationTitleTooltip:\n \"The name of the current plugin configuration. Under this name, the configuration can be found in \" +\n \"the rest of the application.\",\n apiKey: \"API key\",\n apiKeyTooltip:\n \"The Anthropic API key this configuration asks with. When editing an existing configuration this \" +\n \"field stays empty; leave it empty to keep the stored key.\",\n baseUrl: \"API URL\",\n baseUrlTooltip:\n \"Optional: a different API URL, for instance that of a gateway or proxy. Leave empty for the \" +\n \"Anthropic API itself.\",\n model: \"Model\",\n modelTooltip: \"The Claude model that answers the question. Leave empty for Claude Opus 5.\",\n effort: \"Effort\",\n effortTooltip:\n \"How much Claude may spend on a question. Higher means a better answer, but also slower and more \" +\n \"expensive. Leave empty for the default ('high').\",\n thinking: \"Thinking (adaptive thinking)\",\n thinkingTooltip:\n \"Let Claude decide how long to think about a question. Recommended. Switching it off is only \" +\n \"accepted at effort 'low', 'medium' or 'high'.\",\n maxTokens: \"Maximum answer length (tokens)\",\n maxTokensTooltip:\n \"The maximum number of tokens in the answer. If the answer is cut off by this, claudeStopReason is \" +\n \"'max_tokens'. Leave empty for 16000.\",\n timeoutSeconds: \"Timeout (seconds)\",\n timeoutSecondsTooltip:\n \"How long to wait for an answer. A hard question at high effort takes a while. Leave empty for 600 \" +\n \"seconds.\",\n systemPrompt: \"System prompt\",\n systemPromptTooltip:\n \"Optional: instructions that apply to every action on this configuration, such as the role or the \" +\n \"tone. An action can override this.\",\n actionDescription:\n \"Asks Claude the question below and stores the answer as a process variable. Optionally writes \" +\n \"fields from a JSON answer to process variables or the case document.\",\n prompt: \"Question\",\n promptTooltip:\n \"The question for Claude. Use {{pv:variable}} or {{doc:/path}} to weave case data into the text, \" +\n \"e.g. 'Assess {{doc:/question}} for urgency'.\",\n actionSystemPromptTooltip:\n \"Optional: overrides the plugin configuration's system prompt for this one action. Supports the \" +\n \"same {{pv:...}} and {{doc:...}} placeholders.\",\n documentResourceId: \"Document\",\n documentResourceIdTooltip:\n \"Optional: the Valtimo resource id of a file to send along with the question, usually \" +\n \"pv:resourceId. PDF, image or text; maximum 10 MB (configurable).\",\n resultVariable: \"Process variable for the answer\",\n resultVariableTooltip: \"The name the answer is stored under. Leave empty for claudeAnswer.\",\n resultMappings: \"Process the answer\",\n resultMappingsTooltip:\n \"Optional: take fields out of a JSON answer and put them in a process variable or the case \" +\n \"document. Only works when Claude answers in JSON — ask for that explicitly in the prompt.\",\n resultMappingSource: \"Field in answer (e.g. /netAmount)\",\n resultMappingTarget: \"Target (pv:name or doc:/path)\",\n resultMappingAddRow: \"Add row\",\n },\n },\n};\n\nexport {claudePluginSpecification};\n","/*\n * Copyright 2026 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of claude-plugin\n */\n\nexport * from \"./lib/plugins/claude-plugin/models\";\nexport * from \"./lib/plugins/claude-plugin/claude-plugin-module\";\nexport * from \"./lib/plugins/claude-plugin/claude-plugin.specification\";\nexport * from \"./lib/plugins/claude-plugin/components/claude-plugin-configuration/claude-plugin-configuration.component\";\nexport * from \"./lib/plugins/claude-plugin/components/ask-claude-configuration/ask-claude-configuration.component\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["ValtimoInputModule"],"mappings":";;;;;;;;;;AAAA;;;;;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AAA,mBAAmB,EAAE,+BAA+B;AACpD,YAAA,mBAAmB,EAAE,SAAS;AAC/B,SAAA;AACF,KAAA;;;AC3JH;;;;;;;;;;;;;;AAcG;AAEH;;AAEG;;AClBH;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@valtimo-plugins/claude-plugin" />
5
+ export * from './public_api';
@@ -0,0 +1,2 @@
1
+ declare const CLAUDE_PLUGIN_LOGO_BASE64 = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjRDk3NzU3IiBzdHJva2Utd2lkdGg9IjIuMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIj48bGluZSB4MT0iMTIiIHkxPSIyLjgiIHgyPSIxMiIgeTI9IjIxLjIiLz48bGluZSB4MT0iMi44IiB5MT0iMTIiIHgyPSIyMS4yIiB5Mj0iMTIiLz48bGluZSB4MT0iNS41IiB5MT0iNS41IiB4Mj0iMTguNSIgeTI9IjE4LjUiLz48bGluZSB4MT0iMTguNSIgeTE9IjUuNSIgeDI9IjUuNSIgeTI9IjE4LjUiLz48L3N2Zz4=";
2
+ export { CLAUDE_PLUGIN_LOGO_BASE64 };
@@ -0,0 +1 @@
1
+ export * from "./claude-plugin-logo";
@@ -0,0 +1,11 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./components/claude-plugin-configuration/claude-plugin-configuration.component";
3
+ import * as i2 from "./components/ask-claude-configuration/ask-claude-configuration.component";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "@valtimo/plugin";
6
+ import * as i5 from "@valtimo/components";
7
+ export declare class ClaudePluginModule {
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClaudePluginModule, never>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ClaudePluginModule, [typeof i1.ClaudePluginConfigurationComponent, typeof i2.AskClaudeConfigurationComponent], [typeof i3.CommonModule, typeof i4.PluginTranslatePipeModule, typeof i5.CarbonMultiInputModule, typeof i5.FormModule, typeof i5.InputModule, typeof i5.ParagraphModule, typeof i5.SelectModule], [typeof i1.ClaudePluginConfigurationComponent, typeof i2.AskClaudeConfigurationComponent]>;
10
+ static ɵinj: i0.ɵɵInjectorDeclaration<ClaudePluginModule>;
11
+ }
@@ -0,0 +1,3 @@
1
+ import { PluginSpecification } from "@valtimo/plugin";
2
+ declare const claudePluginSpecification: PluginSpecification;
3
+ export { claudePluginSpecification };
@@ -0,0 +1,50 @@
1
+ import { EventEmitter, OnDestroy, OnInit } from "@angular/core";
2
+ import { FunctionConfigurationComponent, FunctionConfigurationData } from "@valtimo/plugin";
3
+ import { MultiInputKeyValue } from "@valtimo/components";
4
+ import { BehaviorSubject, Observable } from "rxjs";
5
+ import { AskClaudeConfig } from "../../models";
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * What `v-form` emits: the textareas contribute one block of text rather than lines, and
9
+ * the multi-input key/value rows rather than source/target.
10
+ */
11
+ type AskClaudeFormValue = Omit<AskClaudeConfig, "prompt" | "systemPrompt" | "resultMappings"> & {
12
+ prompt?: string;
13
+ systemPrompt?: string;
14
+ resultMappings?: MultiInputKeyValue[];
15
+ };
16
+ export declare class AskClaudeConfigurationComponent implements FunctionConfigurationComponent, OnInit, OnDestroy {
17
+ save$: Observable<void>;
18
+ disabled$: Observable<boolean>;
19
+ pluginId: string;
20
+ prefillConfiguration$: Observable<AskClaudeConfig>;
21
+ valid: EventEmitter<boolean>;
22
+ configuration: EventEmitter<FunctionConfigurationData>;
23
+ /**
24
+ * The saved configuration in the shape the form's own fields take, resolved once per
25
+ * prefill. Deliberately not method calls in the template: that would hand the
26
+ * multi-input a new array on every change-detection run, and each one restarts its
27
+ * value stream.
28
+ */
29
+ readonly prefill$: BehaviorSubject<AskClaudeFormValue>;
30
+ private saveSubscription;
31
+ private prefillSubscription;
32
+ private readonly formValue$;
33
+ private readonly valid$;
34
+ ngOnInit(): void;
35
+ ngOnDestroy(): void;
36
+ formValueChange(formValue: AskClaudeFormValue): void;
37
+ private handleValid;
38
+ private openPrefillSubscription;
39
+ /**
40
+ * The form speaks text and key/value; the plugin action speaks lines and source/target.
41
+ * Mapping rows that are only half filled in are dropped rather than saved as broken
42
+ * mappings, and an empty system prompt is left out entirely so the action falls back to
43
+ * the one on the plugin configuration.
44
+ */
45
+ private toConfig;
46
+ private openSaveSubscription;
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<AskClaudeConfigurationComponent, never>;
48
+ static ɵcmp: i0.ɵɵComponentDeclaration<AskClaudeConfigurationComponent, "valtimo-ask-claude-configuration", never, { "save$": { "alias": "save$"; "required": false; }; "disabled$": { "alias": "disabled$"; "required": false; }; "pluginId": { "alias": "pluginId"; "required": false; }; "prefillConfiguration$": { "alias": "prefillConfiguration$"; "required": false; }; }, { "valid": "valid"; "configuration": "configuration"; }, never, never, false, never>;
49
+ }
50
+ export {};
@@ -0,0 +1,31 @@
1
+ import { EventEmitter, OnDestroy, OnInit } from "@angular/core";
2
+ import { PluginConfigurationComponent, PluginConfigurationData } from "@valtimo/plugin";
3
+ import { SelectItem } from "@valtimo/components";
4
+ import { Observable } from "rxjs";
5
+ import { ClaudePluginConfig } from "../../models";
6
+ import * as i0 from "@angular/core";
7
+ export declare class ClaudePluginConfigurationComponent implements PluginConfigurationComponent, OnInit, OnDestroy {
8
+ save$: Observable<void>;
9
+ disabled$: Observable<boolean>;
10
+ pluginId: string;
11
+ prefillConfiguration$: Observable<ClaudePluginConfig>;
12
+ valid: EventEmitter<boolean>;
13
+ configuration: EventEmitter<PluginConfigurationData>;
14
+ readonly modelItems: SelectItem[];
15
+ readonly effortItems: SelectItem[];
16
+ private saveSubscription;
17
+ private readonly formValue$;
18
+ private readonly valid$;
19
+ ngOnInit(): void;
20
+ ngOnDestroy(): void;
21
+ formValueChange(formValue: ClaudePluginConfig): void;
22
+ /**
23
+ * The API key is deliberately not part of the check. Like every secret it is not
24
+ * returned when an existing configuration is edited, so requiring it here would make
25
+ * such a configuration impossible to save again — the backend requires it instead.
26
+ */
27
+ private handleValid;
28
+ private openSaveSubscription;
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClaudePluginConfigurationComponent, never>;
30
+ static ɵcmp: i0.ɵɵComponentDeclaration<ClaudePluginConfigurationComponent, "valtimo-claude-plugin-configuration", never, { "save$": { "alias": "save$"; "required": false; }; "disabled$": { "alias": "disabled$"; "required": false; }; "pluginId": { "alias": "pluginId"; "required": false; }; "prefillConfiguration$": { "alias": "prefillConfiguration$"; "required": false; }; }, { "valid": "valid"; "configuration": "configuration"; }, never, never, false, never>;
31
+ }
@@ -0,0 +1,49 @@
1
+ import { PluginConfigurationData } from "@valtimo/plugin";
2
+ /**
3
+ * The models offered in the configuration dropdown. Not a closed set on the backend —
4
+ * a configuration may name any model id the API accepts — but these are the ones worth
5
+ * one click.
6
+ */
7
+ declare const CLAUDE_MODELS: {
8
+ readonly OPUS_5: "claude-opus-5";
9
+ readonly SONNET_5: "claude-sonnet-5";
10
+ readonly HAIKU_4_5: "claude-haiku-4-5";
11
+ };
12
+ /** `output_config.effort`; leaving it empty is the API's own default (`high`). */
13
+ declare const CLAUDE_EFFORTS: readonly ["low", "medium", "high", "xhigh", "max"];
14
+ type ClaudeEffort = (typeof CLAUDE_EFFORTS)[number];
15
+ interface ClaudePluginConfig extends PluginConfigurationData {
16
+ apiKey: string;
17
+ baseUrl?: string;
18
+ model?: string;
19
+ maxTokens?: number;
20
+ effort?: ClaudeEffort;
21
+ thinking?: boolean;
22
+ systemPrompt?: string;
23
+ timeoutSeconds?: number;
24
+ }
25
+ /**
26
+ * One line of the result mapping: `source` is a JSON pointer into Claude's answer,
27
+ * `target` a value-resolver expression (`pv:urgency` or `doc:/zaak/urgentie`).
28
+ */
29
+ interface ClaudeResultMapping {
30
+ source: string;
31
+ target: string;
32
+ }
33
+ interface AskClaudeConfig {
34
+ /**
35
+ * The prompt as its lines, joined with newlines by the backend.
36
+ *
37
+ * An array rather than a string, and not a matter of taste: Valtimo runs every *textual*
38
+ * action property through its value resolvers before the action runs, and reads a leading
39
+ * `word:` as a resolver prefix — so a prompt opening "Context: ..." would fail the step
40
+ * with "No resolver factory found for value prefix Context". An array is passed through
41
+ * untouched.
42
+ */
43
+ prompt: string[];
44
+ systemPrompt?: string[];
45
+ documentResourceId?: string;
46
+ resultVariable?: string;
47
+ resultMappings?: ClaudeResultMapping[];
48
+ }
49
+ export { AskClaudeConfig, CLAUDE_EFFORTS, CLAUDE_MODELS, ClaudeEffort, ClaudePluginConfig, ClaudeResultMapping };
@@ -0,0 +1 @@
1
+ export * from "./config";
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@valtimo-plugins/claude-plugin",
3
+ "license": "EUPL-1.2",
4
+ "version": "0.1.0",
5
+ "peerDependencies": {
6
+ "@angular/common": "19.2.20",
7
+ "@angular/core": "19.2.20"
8
+ },
9
+ "dependencies": {
10
+ "@angular/forms": "19.2.20",
11
+ "tslib": "2.8.1"
12
+ },
13
+ "module": "fesm2022/valtimo-plugins-claude-plugin.mjs",
14
+ "typings": "index.d.ts",
15
+ "exports": {
16
+ "./package.json": {
17
+ "default": "./package.json"
18
+ },
19
+ ".": {
20
+ "types": "./index.d.ts",
21
+ "default": "./fesm2022/valtimo-plugins-claude-plugin.mjs"
22
+ }
23
+ },
24
+ "sideEffects": false
25
+ }
@@ -0,0 +1,5 @@
1
+ export * from "./lib/plugins/claude-plugin/models";
2
+ export * from "./lib/plugins/claude-plugin/claude-plugin-module";
3
+ export * from "./lib/plugins/claude-plugin/claude-plugin.specification";
4
+ export * from "./lib/plugins/claude-plugin/components/claude-plugin-configuration/claude-plugin-configuration.component";
5
+ export * from "./lib/plugins/claude-plugin/components/ask-claude-configuration/ask-claude-configuration.component";