@whoz-oss/coday-client 0.122.0 → 0.124.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.
Files changed (105) hide show
  1. package/3rdpartylicenses.txt +19 -19
  2. package/browser/chunk-2WJFXA53.js +1 -0
  3. package/browser/chunk-3D3KN52V.js +1 -0
  4. package/browser/chunk-3JGMGRXW.js +5 -0
  5. package/browser/chunk-3U3QVZEU.js +2 -0
  6. package/browser/chunk-4VZIFCB6.js +83 -0
  7. package/browser/chunk-53STPEYQ.js +3 -0
  8. package/browser/chunk-6LO3ANKL.js +1 -0
  9. package/browser/chunk-7MXZXY4I.js +1 -0
  10. package/browser/{chunk-VNGIXNER.js → chunk-AJOXSD6I.js} +1 -1
  11. package/browser/chunk-AK6F2DC7.js +5 -0
  12. package/browser/chunk-AQ3SEH2N.js +1 -0
  13. package/browser/{chunk-CBU7DNMV.js → chunk-B2FFL2F7.js} +1 -1
  14. package/browser/chunk-B2QA6UZX.js +9 -0
  15. package/browser/chunk-BRHVMM4O.js +1 -0
  16. package/browser/{chunk-OK747ZMT.js → chunk-CRBPOP52.js} +1 -1
  17. package/browser/{chunk-P5TSPSCB.js → chunk-DE5MXWYR.js} +1 -1
  18. package/browser/{chunk-NO2ODJHX.js → chunk-DRBOHCTP.js} +3 -3
  19. package/browser/{chunk-UGVRFJHC.js → chunk-EPA5P2I6.js} +1 -1
  20. package/browser/chunk-ESGUJDS6.js +1 -0
  21. package/browser/chunk-EWEA7F46.js +270 -0
  22. package/browser/chunk-FOWPCPU3.js +2 -0
  23. package/browser/chunk-GAZJZBKP.js +1 -0
  24. package/browser/chunk-H5JE6Y2U.js +1 -0
  25. package/browser/chunk-H6OBD3IB.js +1 -0
  26. package/browser/chunk-HCG45H7O.js +2 -0
  27. package/browser/chunk-HSNVFCBN.js +1 -0
  28. package/browser/chunk-HTG2SANG.js +1 -0
  29. package/browser/chunk-HTRRBKXE.js +2 -0
  30. package/browser/chunk-I5EEQETN.js +1 -0
  31. package/browser/chunk-I5OT3IGD.js +1 -0
  32. package/browser/{chunk-MQ3QG7VF.js → chunk-IFXDK4GQ.js} +1 -1
  33. package/browser/chunk-IXD43YQI.js +2 -0
  34. package/browser/chunk-IZFHJAEI.js +1 -0
  35. package/browser/chunk-J44N4WCW.js +1 -0
  36. package/browser/chunk-JFRMX4TL.js +1 -0
  37. package/browser/chunk-JUPV65PP.js +1 -0
  38. package/browser/chunk-KKEITF3S.js +1 -0
  39. package/browser/chunk-KTPX26DH.js +2 -0
  40. package/browser/chunk-KYPWHL43.js +1 -0
  41. package/browser/chunk-MWWLTJ77.js +1 -0
  42. package/browser/{chunk-7RF7FEOC.js → chunk-NAQEVUOV.js} +1 -1
  43. package/browser/chunk-O2IJMHBE.js +2 -0
  44. package/browser/chunk-O3U2KGCT.js +1 -0
  45. package/browser/chunk-OPGZ37VP.js +1 -0
  46. package/browser/chunk-PWDBCAQS.js +2 -0
  47. package/browser/{chunk-4UEZ3CNG.js → chunk-Q3YY3NFM.js} +1 -1
  48. package/browser/{chunk-UXXLDXN3.js → chunk-QSQYSFNQ.js} +1 -1
  49. package/browser/chunk-QWMDAFBN.js +1 -0
  50. package/browser/chunk-QXZ6AR76.js +1 -0
  51. package/browser/chunk-SHHNG775.js +1 -0
  52. package/browser/chunk-SPIWOGE3.js +1 -0
  53. package/browser/chunk-SZNIOJIK.js +1 -0
  54. package/browser/chunk-TLXAJ2J2.js +1 -0
  55. package/browser/chunk-TNUQQNZR.js +1 -0
  56. package/browser/{chunk-OMLFSDJ5.js → chunk-U4662WTU.js} +1 -1
  57. package/browser/chunk-UDGUWWGZ.js +1 -0
  58. package/browser/chunk-UKAN3Y3I.js +2 -0
  59. package/browser/{chunk-FCCT54AP.js → chunk-UORJVNGU.js} +1 -1
  60. package/browser/chunk-VNCIHM33.js +1 -0
  61. package/browser/chunk-VOCIDXAB.js +1 -0
  62. package/browser/{chunk-5UOZGBZ2.js → chunk-WNNKQ2DH.js} +4 -4
  63. package/browser/chunk-WPC6XC7P.js +2 -0
  64. package/browser/chunk-XIQ3L6H6.js +1 -0
  65. package/browser/chunk-XJUBZLY2.js +1 -0
  66. package/browser/chunk-XQ4PJULE.js +1 -0
  67. package/browser/chunk-YZSDQIEK.js +7 -0
  68. package/browser/chunk-ZAM3WGZM.js +3 -0
  69. package/browser/chunk-ZL64I3EB.js +4 -0
  70. package/browser/index.html +2 -2
  71. package/browser/main-PMTICERL.js +1 -0
  72. package/browser/{styles-HC545BYS.css → styles-THLRUXCP.css} +1 -1
  73. package/package.json +1 -1
  74. package/browser/chunk-2DE3OXG3.js +0 -1
  75. package/browser/chunk-3TOJSAQM.js +0 -1
  76. package/browser/chunk-4LFZBXC3.js +0 -1
  77. package/browser/chunk-4OMSGXSL.js +0 -1
  78. package/browser/chunk-5CTKRMM2.js +0 -2
  79. package/browser/chunk-6NFS2ZCV.js +0 -1
  80. package/browser/chunk-DJBCK5D7.js +0 -5
  81. package/browser/chunk-FPUSD6J7.js +0 -1
  82. package/browser/chunk-G5XS2TEE.js +0 -1
  83. package/browser/chunk-GT5UFSUE.js +0 -2
  84. package/browser/chunk-H2Q3V5BR.js +0 -1
  85. package/browser/chunk-IHHVFGPF.js +0 -1
  86. package/browser/chunk-JPWWZVYZ.js +0 -1
  87. package/browser/chunk-JW6LSUP2.js +0 -1
  88. package/browser/chunk-KYPMYRHP.js +0 -1
  89. package/browser/chunk-LVEC3TBP.js +0 -1
  90. package/browser/chunk-MJEQQZDO.js +0 -1
  91. package/browser/chunk-N5LTGEF5.js +0 -1
  92. package/browser/chunk-PKKHLHXJ.js +0 -10
  93. package/browser/chunk-PWN5O4WY.js +0 -1
  94. package/browser/chunk-S3ZG6FUN.js +0 -1
  95. package/browser/chunk-S5LR3GBS.js +0 -2
  96. package/browser/chunk-SNTJSECZ.js +0 -1
  97. package/browser/chunk-T357ITNZ.js +0 -1
  98. package/browser/chunk-TE3JOGRA.js +0 -2
  99. package/browser/chunk-UMDZZGIC.js +0 -1
  100. package/browser/chunk-VWD2QH4N.js +0 -1
  101. package/browser/chunk-W4VYO3E2.js +0 -1
  102. package/browser/chunk-XPK5V34V.js +0 -1
  103. package/browser/chunk-YDXVLOQW.js +0 -11
  104. package/browser/chunk-Z7DC3UIO.js +0 -1
  105. package/browser/main-3X4E54YE.js +0 -361
@@ -0,0 +1,270 @@
1
+ import{b as k}from"./chunk-XIQ3L6H6.js";import{Rc as A,Z as S,ca as C}from"./chunk-3JGMGRXW.js";var P=class t{http=C(A);projectState=C(k);getBaseUrl(){return`/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/threads`}listThreads(){return this.http.get(this.getBaseUrl())}listAllThreads(){return this.http.get("/api/threads")}getThread(e){return this.http.get(`${this.getBaseUrl()}/${e}`)}createThread(e){let s=e?{name:e}:{};return this.http.post(this.getBaseUrl(),s)}updateThread(e,s){return this.http.put(`${this.getBaseUrl()}/${e}`,{name:s})}updateThreadUsers(e,s){return this.http.put(`${this.getBaseUrl()}/${e}`,{users:s})}starThread(e){return this.http.post(`${this.getBaseUrl()}/${e}/star`,{})}unstarThread(e){return this.http.delete(`${this.getBaseUrl()}/${e}/star`)}deleteThread(e){return this.http.delete(`${this.getBaseUrl()}/${e}`)}stopThread(e){return this.http.post(`${this.getBaseUrl()}/${e}/stop`,{})}getThreadMessages(e){return this.http.get(`${this.getBaseUrl()}/${e}/messages`)}static \u0275fac=function(s){return new(s||t)};static \u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"})};function R(t,e=80){if(t.length<=e)return t;try{if(t.trim().startsWith("{")||t.trim().startsWith("[")){let s=JSON.parse(t),n=JSON.stringify(s);return n.length<=e?n:n.substring(0,e)+`...(${n.length} chars)`}}catch(s){}return t.substring(0,e)+"..."}var r=class{constructor(e,s){this.type=s;if(e.timestamp)this.timestamp=e.timestamp;else{let n=Math.random().toString(36).substring(2,7);this.timestamp=`${new Date().toISOString()}-${n}`}this.parentKey=e.parentKey,this.threadId=e.threadId,this.length=0}timestamp;parentKey;static type;length;threadId;get date(){let e=this.timestamp.lastIndexOf("-");if(e>0){let s=this.timestamp.substring(e+1);if(s.length===5&&/^[a-z0-9]+$/.test(s))return new Date(this.timestamp.substring(0,e))}return new Date(this.timestamp)}},v=class extends r{invite;constructor(e,s){super(e,s),this.invite=e.invite}buildAnswer(e){return new i({answer:e,parentKey:this.timestamp,invite:this.invite})}},T=class t extends r{static type="heartbeat";constructor(e){super(e,t.type)}},a=class t extends v{defaultValue;static type="invite";constructor(e){super(e,t.type),this.defaultValue=e.defaultValue}},W="InviteEventDefault",i=class t extends r{answer;invite;name;static type="answer";constructor(e){super(e,t.type),this.answer=e.answer??"No answer",this.invite=e.invite,this.name=e.name}},p=class t extends r{speaker;text;static type="text";constructor(e){super(e,t.type),this.speaker=e.speaker,this.text=e.text}},b=class t extends r{chunk;static type="text_chunk";constructor(e){super(e,t.type),this.chunk=e.chunk,this.length=this.chunk.length}},g=class t extends r{warning;static type="warn";constructor(e){super(e,t.type),this.warning=e.warning}},h=class t extends r{error;static type="error";constructor(e){super(e,t.type),this.error=e.error}},c=class t extends v{options;optionalQuestion;allowFreeText;static type="choice";constructor(e){super(e,t.type),this.options=Array.isArray(e.options)?e.options:[],this.optionalQuestion=e.optionalQuestion,this.allowFreeText=e.allowFreeText??!1}},d=class t extends r{toolRequestId;name;args;static type="tool_request";constructor(e){super(e,t.type),this.toolRequestId=e.toolRequestId??this.timestamp,this.name=e.name,this.args=e.args,this.length=this.args.length+this.name.length+this.toolRequestId.length+20}buildResponse(e){return new o({output:e,toolRequestId:this.toolRequestId,parentKey:this.timestamp})}toSingleLineString(e=50){let s=R(this.args,e);return`\u{1F527} ${this.name}(${s})`}},o=class t extends r{toolRequestId;output;static type="tool_response";constructor(e){if(super(e,t.type),this.toolRequestId=e.toolRequestId||this.timestamp||new Date().toISOString(),this.output=e.output,typeof this.output=="string")this.length=this.output.length+this.toolRequestId.length+20;else if(this.output.type==="text")this.length=this.output.content.length+this.toolRequestId.length+20;else if(this.output.type==="image"){let s=(this.output.width??0)*(this.output.height??0)/750;this.length=(s?s*3.5:this.output.content.length)+this.toolRequestId.length+20}else this.length=this.toolRequestId.length+20}getTextOutput(){return typeof this.output=="string"?this.output:this.output.type==="text"?this.output.content:this.output.type==="image"?`[Image: ${this.output.mimeType}]`:""}toSingleLineString(e=50){let s=this.getTextOutput(),n=R(s,e),$=typeof this.output!="string"&&this.output.type==="image"?" [image]":"";return`\u2B91 ${n}${$}`}},f=class t extends r{static type="thinking";static debounce=5e3;constructor(e){super(e,t.type)}},l=class t extends r{summary;static type="summary";constructor(e){super(e,t.type),this.summary=e.summary,this.length=this.summary.length}toSingleLineString(e=80){return`\u{1F4CB} Summary: ${R(this.summary,e)}`}},u=class t extends r{role;name;content;static type="message";constructor(e){super(e,t.type),this.role=e.role,this.name=e.name,this.content=e.content,this.length=this.content.map(s=>{if(s.type==="text")return s.content.length;if(s.type==="image"){let n=(s.width||0)*(s.height||0)/750;return n?n*3.5:s.content.length}return 0}).reduce((s,n)=>s+n,0)}getTextContent(){return this.content.filter(e=>e.type==="text").map(e=>e.content).join(`
2
+ `)}},x=class t extends r{threadId;name;summary;users;static type="thread_update";constructor(e){super(e,t.type),this.threadId=e.threadId,this.name=e.name,this.summary=e.summary,this.users=e.users}},w=class t extends r{filename;operation;size;mimeType;static type="file";constructor(e){super(e,t.type),this.filename=e.filename,this.operation=e.operation,this.size=e.size,this.mimeType=e.mimeType}toSingleLineString(){let e=this.operation==="created"?"\u{1F4C4}":this.operation==="updated"?"\u{1F4DD}":"\u{1F5D1}\uFE0F",s=this.size?` (${(this.size/1024).toFixed(1)} KB)`:"";return`${e} ${this.operation}: ${this.filename}${s}`}},E=class t extends r{authUrl;state;integrationName;static type="oauth_request";constructor(e){super(e,t.type),this.authUrl=e.authUrl,this.state=e.state,this.integrationName=e.integrationName}},m=class t extends r{subThreadId;agentName;static type="delegation";constructor(e){super(e,t.type),this.subThreadId=e.subThreadId,this.agentName=e.agentName}},I=class t extends r{code;state;integrationName;error;errorDescription;static type="oauth_callback";constructor(e){super(e,t.type),this.code=e.code,this.state=e.state,this.integrationName=e.integrationName,this.error=e.error,this.errorDescription=e.errorDescription}},O={[u.type]:u,[i.type]:i,[c.type]:c,[m.type]:m,[h.type]:h,[T.type]:T,[a.type]:a,[d.type]:d,[o.type]:o,[p.type]:p,[b.type]:b,[f.type]:f,[g.type]:g,[x.type]:x,[l.type]:l,[w.type]:w,[E.type]:E,[I.type]:I};function q(t){let e=O[t.type];return e?new e(t):void 0}var Y=[{id:"builtin-plan",name:"plan",description:"Build a plan to complete the given task",source:"builtin",commands:[`@ We start a 3 phase process to build a comprehensive execution plan for the following task:
3
+
4
+ <task>
5
+ {{PARAMETERS}}
6
+ </task>
7
+
8
+ There will be 3 phases:
9
+ 1. Research and understanding
10
+ 2. Clarifying questions
11
+ 3. Plan creation
12
+
13
+ Do not try to do all at once, wait for my request at each time.
14
+
15
+ Now we start with phase 1:
16
+
17
+ 1. **Analyze the request** to identify:
18
+ - Core requirements and objectives
19
+ - Implicit assumptions or expectations
20
+ - Technical scope and constraints
21
+
22
+ 2. **Research relevant context** using available tools:
23
+ - Use whatever tools you have available (file reading, API calls, search, etc.)
24
+ - Gather information about existing patterns, structures, and conventions
25
+ - Identify relevant files, modules, or resources
26
+ - Document key findings briefly
27
+
28
+ 3. **Assess feasibility**:
29
+ - Identify potential challenges or blockers
30
+ - Note any dependencies or prerequisites
31
+ - Consider alternative approaches if applicable
32
+
33
+ Do not assume you have specific tools - use what's available to you.
34
+
35
+ Do not produce any document at this stage as you will have access to the accumulated research results later.
36
+ `,`@ let's continue with Phase 2: Clarifying Questions regarding the initial task.
37
+
38
+ <task>
39
+ {{PARAMETERS}}
40
+ </task>
41
+
42
+ Based on your research and understanding:
43
+
44
+ 1. **Identify ambiguities** or missing information that could impact the completion of the task
45
+ - no boundaries
46
+ - insufficient definition of done
47
+ - lack of pre-requisites
48
+
49
+ 2. **Ask focused questions** if clarification is needed:
50
+ - Use the 'invite' or 'choice' tools for user input
51
+ - Keep questions concise and specific
52
+ - Prioritize questions that significantly impact the approach
53
+
54
+ 3. **Skip this phase** if the requirements are clear enough to proceed
55
+
56
+ Remember: Only ask questions that are truly necessary to create a solid plan.`,`@ finish with Phase 3: Plan Creation
57
+
58
+ Break down the task into 3-10 clear, actionable steps. Each step should be substantial enough to represent meaningful progress, but focused enough to be completed in one session.
59
+
60
+ Create a detailed execution plan:
61
+ - if you have access to the exchange area, save the plan there as 'plan.md'.
62
+ - otherwise, output the plan in the conversation.
63
+ - do not write any other document
64
+
65
+ The plan must follow this Markdown structure:
66
+
67
+ # Execution Plan: [Task Title]
68
+
69
+ ## Overview
70
+ 1-2 sentence summary of what will be accomplished.
71
+
72
+ ## Context
73
+ Key information and constraints identified during research:
74
+ - Relevant patterns/conventions found
75
+ - Constraints or limitations
76
+ - Dependencies or prerequisites
77
+ - Key resources or materials involved
78
+
79
+ ## Steps
80
+
81
+ ### Step 1: [Step Title]
82
+ - **What to do**: Clear description of the action to take
83
+ - **Resources needed**: List files, tools, information, or materials required
84
+ - **Expected outcome**: What should be produced or achieved
85
+ - **Validation**: How to verify this step is complete
86
+ - **Dependencies**: Which previous steps must complete first (or "None")
87
+
88
+ ### Step 2: [Step Title]
89
+ [Same structure as Step 1]
90
+
91
+ [Continue for all steps...]
92
+
93
+ ## Success Criteria
94
+ How to verify the task is fully complete:
95
+ 1. Objective measures of completion
96
+ 2. Quality checks or review points
97
+ 3. Final validation steps
98
+
99
+ ## Risks & Considerations
100
+ - Potential challenges or obstacles
101
+ - Alternative approaches considered
102
+ - Areas requiring special attention
103
+ - Future improvements or follow-up items
104
+
105
+ ---
106
+
107
+ After outputting the plan in the right place (in exchange or in conversation or according to user directives):
108
+ - do not produce other outputs nor documents
109
+ - do not start executing the plan`],createdBy:"system",createdAt:new Date("2024-01-01").toISOString(),webhookEnabled:!1,parameterFormat:""},{id:"builtin-execute-plan",name:"execute-plan",description:"Execute a previously created plan step by step, with validation and progress tracking.",source:"builtin",commands:[`@ Execute the plan from the exchange area or outlined previously in the conversation:
110
+
111
+ ## Preparation
112
+ 1. **Load the plan**: Read from exchange area (plan.md) or use previously discussed plan
113
+ 2. **Review**: Understand the overall objective, context, and step sequence
114
+ 3. **Pre-check**: Verify prerequisites are met; report any obvious issues
115
+
116
+ ## Step-by-Step Execution
117
+
118
+ For each step in order:
119
+
120
+ 1. **Announce**: State which step you're starting and what you'll do
121
+ 2. **Check dependencies**: Verify required previous steps are complete
122
+ 3. **Execute**: Perform the actions specified in the step
123
+ 4. **Validate**: Apply the validation criteria from the plan
124
+ 5. **Report**: Confirm completion and note any deviations
125
+
126
+ **For significant or risky steps**: Ask user confirmation before proceeding (use 'choice' tool)
127
+
128
+ ## Issue Handling
129
+
130
+ If a step fails:
131
+ - Report the issue clearly
132
+ - Suggest solutions (retry, skip if non-critical, or stop)
133
+ - Use 'choice' tool to ask how to proceed if needed
134
+
135
+ ## Completion
136
+
137
+ 1. **Final verification**: Apply success criteria from the plan
138
+ 2. **Summary**: Report what was accomplished, any deviations, validation results, and next steps
139
+
140
+ ## Guidelines
141
+ - Follow the plan's order unless circumstances require adaptation
142
+ - Communicate progress clearly at each step, without excessive details
143
+ - Ask for guidance when the plan is unclear or issues arise`],createdBy:"system",createdAt:new Date("2024-01-01").toISOString(),webhookEnabled:!1,parameterFormat:""},{id:"builtin-re-prompt",name:"re-prompt",description:"Transform a vague request into a detailed, actionable prompt",source:"builtin",commands:[`@ I need you to analyze and reformulate the following request to make it more precise and actionable.
144
+
145
+ ## User's initial request
146
+
147
+ {{PARAMETERS}}
148
+
149
+ ## Your task
150
+
151
+ 1. **Analyze the request** to identify:
152
+ - What is explicitly stated
153
+ - What is implicit or assumed
154
+ - What information is missing or ambiguous
155
+ - The likely intent behind the request
156
+
157
+ 2. **Ask clarifying questions** if needed:
158
+ - If the request is too vague or has multiple interpretations
159
+ - If critical information is missing
160
+ - Use the 'invite' or 'choice' tools to gather necessary details
161
+
162
+ 3. **Reformulate the request** into a clear, detailed, and actionable prompt:
163
+ - Make implicit requirements explicit
164
+ - Add relevant context from the current project
165
+ - Specify expected outcomes or deliverables
166
+ - Break down complex requests into clear steps if needed
167
+ - Use precise technical terminology when appropriate
168
+
169
+ 4. **Present the reformulated request** and ask for confirmation:
170
+ - Show the enhanced version clearly
171
+ - Explain key changes or additions you made
172
+ - Ask if this matches the user's intent
173
+
174
+ The goal is to transform a rough idea into a well-defined request that will produce better AI responses.`],createdBy:"system",createdAt:new Date("2024-01-01").toISOString(),webhookEnabled:!1,parameterFormat:""},{id:"builtin-memory-learn",name:"memory-learn",description:"Extract and memorize new knowledge gained from recent context",source:"builtin",commands:[`@ Learn about the following topic and memorize relevant insights if defined:
175
+
176
+ <topic>
177
+ {{PARAMETERS}}
178
+ </topic>
179
+
180
+ If no specific topic is provided, extract learnings from the entire recent conversation context.
181
+
182
+ ## Process
183
+
184
+ 1. **Identify new knowledge**: From the recent conversation context, identify what you learned that:
185
+ - Was not in the initially given context
186
+ - Is specific to this user or project (not generic knowledge)
187
+ - Is useful and worth remembering
188
+ - Represents understanding, not just file copies
189
+
190
+ 2. **Organize insights**: Split the knowledge into cohesive subjects, each with:
191
+ - **Title**: Short and descriptive (one sentence maximum)
192
+ - **Content**: Detailed explanation of what was learned
193
+ - Length: at most 3 paragraphs or short extracts and notes
194
+ - Format: Well-structured markdown
195
+ - Focus: Specific patterns, decisions, constraints, or insights
196
+
197
+ 3. **Check for redundancy**: Before memorizing:
198
+ - Review the list of existing memories to avoid duplication
199
+ - If a similar memory exists, consider updating it instead of creating a new one
200
+ - delete memories if needed
201
+
202
+ 4. **Memorize**: Use the memorization tools to save each subject:
203
+ - Choose appropriate level if available (PROJECT or USER)
204
+ - Ensure clear structure and completeness
205
+ - Memorize one subject at a time
206
+
207
+ ## Guidelines
208
+ - Focus on actionable insights, not generic facts
209
+ - Ensure memories are self-contained and clear
210
+ - Avoid redundancy with existing memories
211
+ - Prioritize quality over quantity`],createdBy:"system",createdAt:new Date("2024-01-01").toISOString(),webhookEnabled:!1,parameterFormat:""},{id:"builtin-memory-curate",name:"memory-curate",description:"Analyze and clean up the memory system by consolidating redundancies and removing outdated information",source:"builtin",commands:[`@ we start a 4 phase memory curation process. Complete only the requested phase at each time.
212
+
213
+ Phase 1: Analyze redundancies
214
+
215
+ Review all current memories to identify:
216
+
217
+ 1. **Redundant memories** that:
218
+ - Cover similar or overlapping topics
219
+ - Contain duplicate information
220
+ - Could be consolidated for better clarity
221
+
222
+ 2. **For each group of redundant memories**:
223
+ - List the memory titles involved
224
+ - Explain the redundancy briefly
225
+ - Propose a consolidation approach
226
+
227
+ Do not make changes yet - just analyze and report findings.`,`@ Phase 2: Consolidate redundancies
228
+
229
+ Based on the analysis from Phase 1:
230
+
231
+ 1. **For each identified redundancy**:
232
+ - Delete the individual redundant memories using deleteMemory
233
+ - Create a new consolidated memory that:
234
+ - Maintains all critical details from the originals
235
+ - Provides clear, well-structured content
236
+ - Uses appropriate level (PROJECT or USER)
237
+ - Explain your consolidation reasoning
238
+
239
+ 2. **Be proactive but careful**: Preserve important details while eliminating duplication.`,`@ Phase 3: Check for outdated information
240
+
241
+ Review remaining memories for accuracy and relevance:
242
+
243
+ 1. **Compare each memory against**:
244
+ - Other memories for inconsistencies
245
+ - Current project context for outdated information
246
+ - Core documentation for misalignments
247
+
248
+ 2. **For each problematic memory**:
249
+ - List the memory title with brief explanation of the issue
250
+ - Take appropriate action:
251
+ - Delete if outdated or incorrect
252
+ - Update if incomplete or partially incorrect
253
+ - Consolidate if it fits better elsewhere
254
+ - Explain your reasoning clearly
255
+
256
+ Be thorough in your analysis.`,`@ Phase 4: Final verification
257
+
258
+ Verify the memory system's overall health:
259
+
260
+ 1. **Review the current state**:
261
+ - Check overall structure and organization
262
+ - Verify each memory for completeness and validity
263
+ - Confirm proper categorization (PROJECT vs USER)
264
+
265
+ 2. **Document the results**:
266
+ - Summarize what was consolidated or removed
267
+ - List any remaining issues or concerns
268
+ - Provide recommendations for maintaining memory quality
269
+
270
+ This ensures the memory system stays efficient and valuable.`],createdBy:"system",createdAt:new Date("2024-01-01").toISOString(),webhookEnabled:!1,parameterFormat:""}];var ue=[u.type,d.type,o.type,l.type,a.type,c.type,i.type,m.type];var M={CONFLUENCE:[],GIT:[],GIT_WORKTREE:[],GITLAB:[],JIRA:[],SLACK:[],ZENDESK:[],BASECAMP:[]},ke=Object.keys(M).filter(t=>M[t]?.length===0);export{P as a,T as b,a as c,W as d,i as e,p as f,b as g,g as h,h as i,c as j,d as k,o as l,f as m,u as n,x as o,w as p,E as q,m as r,I as s,q as t};
@@ -0,0 +1,2 @@
1
+ import"./chunk-PWDBCAQS.js";import{a as ot,b as rt}from"./chunk-O2IJMHBE.js";import{a as lt,b as st}from"./chunk-KTPX26DH.js";import{a as H}from"./chunk-AQ3SEH2N.js";import{a as ft,b as _t,c as vt}from"./chunk-UKAN3Y3I.js";import{e as dt,f as ct,g as ut,h as mt,i as gt,j as pt,k as ht,l as bt}from"./chunk-ZL64I3EB.js";import"./chunk-ZAM3WGZM.js";import"./chunk-AJOXSD6I.js";import{a as nt,e as at,j as it}from"./chunk-53STPEYQ.js";import{c as $e,d as He,i as qe,j as Qe,m as et,n as tt}from"./chunk-AK6F2DC7.js";import{a as Be,b as De,d as Re,e as Ve,f as Ae,g as Le,h as We}from"./chunk-DRBOHCTP.js";import"./chunk-IXD43YQI.js";import{a as N,b as U}from"./chunk-WPC6XC7P.js";import{A as Je,C as $,a as Ke,c as Xe,g as z,m as j,o as Ye,z as Ze}from"./chunk-XJUBZLY2.js";import{b as je}from"./chunk-XIQ3L6H6.js";import{A as Ee,E as Pe,K as Fe,M as Ge,N as Ne,O as W,P as Ue,Q as ze,S as G,h as we,i as Ie,t as ne,u as Oe}from"./chunk-B2QA6UZX.js";import{$b as _e,Bb as x,Cc as xe,Db as g,Fb as u,Gb as pe,Hb as he,Ib as be,Jb as fe,Jc as ke,Ka as d,Kb as Z,Lb as J,Pb as F,Rb as ee,Rc as Te,Tb as s,Ub as O,Vb as w,Wa as I,Xa as de,Xb as f,Y as oe,Ya as ce,Yb as _,Z as re,Zb as v,_ as le,aa as K,ab as X,ac as ve,bc as ye,ca as c,ga as p,ha as h,hc as Me,jb as V,kc as Se,lb as M,mb as S,mc as Ce,nb as ue,oa as R,pb as A,qb as L,rb as b,sb as o,sc as te,ta as k,tb as r,tc as C,ub as Y,ya as se,yb as me,zb as ge}from"./chunk-3JGMGRXW.js";var E=class l{http=c(Te);projectState=c(je);getBaseUrl(){return`/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/schedulers`}listSchedulers(){return this.http.get(this.getBaseUrl())}getScheduler(a){return this.http.get(`${this.getBaseUrl()}/${a}`)}createScheduler(a){return this.http.post(this.getBaseUrl(),a)}updateScheduler(a,e){return this.http.put(`${this.getBaseUrl()}/${a}`,e)}deleteScheduler(a){return this.http.delete(`${this.getBaseUrl()}/${a}`)}enableScheduler(a){return this.http.post(`${this.getBaseUrl()}/${a}/enable`,{})}disableScheduler(a){return this.http.post(`${this.getBaseUrl()}/${a}/disable`,{})}runSchedulerNow(a){return this.http.post(`${this.getBaseUrl()}/${a}/run-now`,{})}static \u0275fac=function(e){return new(e||l)};static \u0275prov=re({token:l,factory:l.\u0275fac,providedIn:"root"})};var Pt=["button"],Ft=["*"];function Bt(l,a){if(l&1&&(o(0,"div",2),Y(1,"mat-pseudo-checkbox",6),r()),l&2){let e=u();d(),b("disabled",e.disabled)}}var yt=new K("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:()=>({hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1})}),Mt=new K("MatButtonToggleGroup"),Dt={provide:Ke,useExisting:oe(()=>ie),multi:!0},q=class{source;value;constructor(a,e){this.source=a,this.value=e}},ie=(()=>{class l{_changeDetector=c(te);_dir=c(Ee,{optional:!0});_multiple=!1;_disabled=!1;_disabledInteractive=!1;_selectionModel;_rawValue;_controlValueAccessorChangeFn=()=>{};_onTouched=()=>{};_buttonToggles;appearance;get name(){return this._name}set name(e){this._name=e,this._markButtonsForCheck()}_name=c(ne).getId("mat-button-toggle-group-");vertical=!1;get value(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e.map(t=>t.value):e[0]?e[0].value:void 0}set value(e){this._setSelectionByValue(e),this.valueChange.emit(this.value)}valueChange=new R;get selected(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e:e[0]||null}get multiple(){return this._multiple}set multiple(e){this._multiple=e,this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._markButtonsForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e,this._markButtonsForCheck()}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}change=new R;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._markButtonsForCheck()}_hideSingleSelectionIndicator;get hideMultipleSelectionIndicator(){return this._hideMultipleSelectionIndicator}set hideMultipleSelectionIndicator(e){this._hideMultipleSelectionIndicator=e,this._markButtonsForCheck()}_hideMultipleSelectionIndicator;constructor(){let e=c(yt,{optional:!0});this.appearance=e&&e.appearance?e.appearance:"standard",this._hideSingleSelectionIndicator=e?.hideSingleSelectionIndicator??!1,this._hideMultipleSelectionIndicator=e?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new it(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(e=>e.checked)),this.multiple||this._initializeTabIndex()}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_keydown(e){if(this.multiple||this.disabled||Oe(e))return;let n=e.target.id,i=this._buttonToggles.toArray().findIndex(T=>T.buttonId===n),m=null;switch(e.keyCode){case 32:case 13:m=this._buttonToggles.get(i)||null;break;case 38:m=this._getNextButton(i,-1);break;case 37:m=this._getNextButton(i,this.dir==="ltr"?-1:1);break;case 40:m=this._getNextButton(i,1);break;case 39:m=this._getNextButton(i,this.dir==="ltr"?1:-1);break;default:return}m&&(e.preventDefault(),m._onButtonClick(),m.focus())}_emitChangeEvent(e){let t=new q(e,this.value);this._rawValue=t.value,this._controlValueAccessorChangeFn(t.value),this.change.emit(t)}_syncButtonToggle(e,t,n=!1,i=!1){!this.multiple&&this.selected&&!e.checked&&(this.selected.checked=!1),this._selectionModel?t?this._selectionModel.select(e):this._selectionModel.deselect(e):i=!0,i?Promise.resolve().then(()=>this._updateModelValue(e,n)):this._updateModelValue(e,n)}_isSelected(e){return this._selectionModel&&this._selectionModel.isSelected(e)}_isPrechecked(e){return typeof this._rawValue>"u"?!1:this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(t=>e.value!=null&&t===e.value):e.value===this._rawValue}_initializeTabIndex(){if(this._buttonToggles.forEach(e=>{e.tabIndex=-1}),this.selected)this.selected.tabIndex=0;else for(let e=0;e<this._buttonToggles.length;e++){let t=this._buttonToggles.get(e);if(!t.disabled){t.tabIndex=0;break}}}_getNextButton(e,t){let n=this._buttonToggles;for(let i=1;i<=n.length;i++){let m=(e+t*i+n.length)%n.length,T=n.get(m);if(T&&!T.disabled)return T}return null}_setSelectionByValue(e){if(this._rawValue=e,!this._buttonToggles)return;let t=this._buttonToggles.toArray();if(this.multiple&&e?(Array.isArray(e),this._clearSelection(),e.forEach(n=>this._selectValue(n,t))):(this._clearSelection(),this._selectValue(e,t)),!this.multiple&&t.every(n=>n.tabIndex===-1)){for(let n of t)if(!n.disabled){n.tabIndex=0;break}}}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(e=>{e.checked=!1,this.multiple||(e.tabIndex=-1)})}_selectValue(e,t){for(let n of t)if(n.value===e){n.checked=!0,this._selectionModel.select(n),this.multiple||(n.tabIndex=0);break}}_updateModelValue(e,t){t&&this._emitChangeEvent(e),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(e=>e._markForCheck())}static \u0275fac=function(t){return new(t||l)};static \u0275dir=ce({type:l,selectors:[["mat-button-toggle-group"]],contentQueries:function(t,n,i){if(t&1&&be(i,Q,5),t&2){let m;Z(m=J())&&(n._buttonToggles=m)}},hostAttrs:[1,"mat-button-toggle-group"],hostVars:6,hostBindings:function(t,n){t&1&&g("keydown",function(m){return n._keydown(m)}),t&2&&(V("role",n.multiple?"group":"radiogroup")("aria-disabled",n.disabled),ee("mat-button-toggle-vertical",n.vertical)("mat-button-toggle-group-appearance-standard",n.appearance==="standard"))},inputs:{appearance:"appearance",name:"name",vertical:[2,"vertical","vertical",C],value:"value",multiple:[2,"multiple","multiple",C],disabled:[2,"disabled","disabled",C],disabledInteractive:[2,"disabledInteractive","disabledInteractive",C],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",C],hideMultipleSelectionIndicator:[2,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",C]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[_e([Dt,{provide:Mt,useExisting:l}])]})}return l})(),Q=(()=>{class l{_changeDetectorRef=c(te);_elementRef=c(se);_focusMonitor=c(we);_idGenerator=c(ne);_animationDisabled=Fe();_checked=!1;ariaLabel;ariaLabelledby=null;_buttonElement;buttonToggleGroup;get buttonId(){return`${this.id}-button`}id;name;value;get tabIndex(){return this._tabIndex()}set tabIndex(e){this._tabIndex.set(e)}_tabIndex;disableRipple=!1;get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(e){this._appearance=e}_appearance;get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(e){e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(e){this._disabled=e}_disabled=!1;get disabledInteractive(){return this._disabledInteractive||this.buttonToggleGroup!==null&&this.buttonToggleGroup.disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e}_disabledInteractive;change=new R;constructor(){c(Ie).load(Ne);let e=c(Mt,{optional:!0}),t=c(new Ce("tabindex"),{optional:!0})||"",n=c(yt,{optional:!0});this._tabIndex=k(parseInt(t)||0),this.buttonToggleGroup=e,this._appearance=n&&n.appearance?n.appearance:"standard",this._disabledInteractive=n?.disabledInteractive??!1}ngOnInit(){let e=this.buttonToggleGroup;this.id=this.id||this._idGenerator.getId("mat-button-toggle-"),e&&(e._isPrechecked(this)?this.checked=!0:e._isSelected(this)!==this._checked&&e._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._animationDisabled||this._elementRef.nativeElement.classList.add("mat-button-toggle-animations-enabled"),this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let e=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),e&&e._isSelected(this)&&e._syncButtonToggle(this,!1,!1,!0)}focus(e){this._buttonElement.nativeElement.focus(e)}_onButtonClick(){if(this.disabled)return;let e=this.isSingleSelector()?!0:!this._checked;if(e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.isSingleSelector()){let t=this.buttonToggleGroup._buttonToggles.find(n=>n.tabIndex===0);t&&(t.tabIndex=-1),this.tabIndex=0}this.change.emit(new q(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this.isSingleSelector()?this.buttonToggleGroup.name:this.name||null}isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=I({type:l,selectors:[["mat-button-toggle"]],viewQuery:function(t,n){if(t&1&&fe(Pt,5),t&2){let i;Z(i=J())&&(n._buttonElement=i.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:14,hostBindings:function(t,n){t&1&&g("focus",function(){return n.focus()}),t&2&&(V("aria-label",null)("aria-labelledby",null)("id",n.id)("name",null),ee("mat-button-toggle-standalone",!n.buttonToggleGroup)("mat-button-toggle-checked",n.checked)("mat-button-toggle-disabled",n.disabled)("mat-button-toggle-disabled-interactive",n.disabledInteractive)("mat-button-toggle-appearance-standard",n.appearance==="standard"))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",disableRipple:[2,"disableRipple","disableRipple",C],appearance:"appearance",checked:[2,"checked","checked",C],disabled:[2,"disabled","disabled",C],disabledInteractive:[2,"disabledInteractive","disabledInteractive",C]},outputs:{change:"change"},exportAs:["matButtonToggle"],ngContentSelectors:Ft,decls:7,vars:13,consts:[["button",""],["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"click","id","disabled"],[1,"mat-button-toggle-checkbox-wrapper"],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"],["state","checked","aria-hidden","true","appearance","minimal",3,"disabled"]],template:function(t,n){if(t&1&&(pe(),o(0,"button",1,0),g("click",function(){return n._onButtonClick()}),M(2,Bt,2,1,"div",2),o(3,"span",3),he(4),r()(),Y(5,"span",4)(6,"span",5)),t&2){let i=F(1);b("id",n.buttonId)("disabled",n.disabled&&!n.disabledInteractive||null),V("role",n.isSingleSelector()?"radio":"button")("tabindex",n.disabled&&!n.disabledInteractive?-1:n.tabIndex)("aria-pressed",n.isSingleSelector()?null:n.checked)("aria-checked",n.isSingleSelector()?n.checked:null)("name",n._getButtonName())("aria-label",n.ariaLabel)("aria-labelledby",n.ariaLabelledby)("aria-disabled",n.disabled&&n.disabledInteractive?"true":null),d(2),S(n.buttonToggleGroup&&(!n.buttonToggleGroup.multiple&&!n.buttonToggleGroup.hideSingleSelectionIndicator||n.buttonToggleGroup.multiple&&!n.buttonToggleGroup.hideMultipleSelectionIndicator)?2:-1),d(4),b("matRippleTrigger",i)("matRippleDisabled",n.disableRipple||n.disabled)}},dependencies:[Ge,nt],styles:[`.mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);border-radius:var(--mat-button-toggle-legacy-shape);transform:translateZ(0)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}@media(forced-colors: active){.mat-button-toggle-standalone,.mat-button-toggle-group{outline:solid 1px}}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}@media(forced-colors: active){.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-button-toggle-legacy-text-color);font-family:var(--mat-button-toggle-legacy-label-text-font);font-size:var(--mat-button-toggle-legacy-label-text-size);line-height:var(--mat-button-toggle-legacy-label-text-line-height);font-weight:var(--mat-button-toggle-legacy-label-text-weight);letter-spacing:var(--mat-button-toggle-legacy-label-text-tracking);--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-legacy-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-legacy-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle-checkbox-wrapper{display:inline-block;justify-content:flex-start;align-items:center;width:0;height:18px;line-height:18px;overflow:hidden;box-sizing:border-box;position:absolute;top:50%;left:16px;transform:translate3d(0, -50%, 0)}[dir=rtl] .mat-button-toggle-checkbox-wrapper{left:auto;right:16px}.mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:12px}[dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:auto;right:12px}.mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper{width:18px}.mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper{transition:width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper{transition:none}.mat-button-toggle-checked{color:var(--mat-button-toggle-legacy-selected-state-text-color);background-color:var(--mat-button-toggle-legacy-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-button-toggle-legacy-disabled-state-text-color);background-color:var(--mat-button-toggle-legacy-disabled-state-background-color);--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-legacy-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-button-toggle-legacy-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-button-toggle-background-color, transparent);font-family:var(--mat-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-button-toggle-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-button-toggle-legacy-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-button-toggle-height, 40px)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-button-toggle-legacy-state-layer-color)}@media(forced-colors: active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-animations-enabled .mat-button-toggle-button{transition:padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-button{transition:none}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:30px}[dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0;padding-right:30px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius: var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}
2
+ `],encapsulation:2,changeDetection:0})}return l})(),St=(()=>{class l{static \u0275fac=function(t){return new(t||l)};static \u0275mod=de({type:l});static \u0275inj=le({imports:[Ue,Q,Pe]})}return l})();var Gt=(l,a)=>a.id,Nt=(l,a)=>a.value;function Ut(l,a){if(l&1&&(o(0,"mat-option",5),s(1),r()),l&2){let e=a.$implicit;b("value",e.id),d(),w(" ",e.name," ")}}function zt(l,a){if(l&1){let e=x();o(0,"mat-checkbox",35),g("change",function(){let n=p(e).$implicit,i=u();return h(i.toggleDayOfWeek(n.value))}),s(1),r()}if(l&2){let e=a.$implicit,t=u();b("checked",t.isDaySelected(e.value)),d(),w(" ",e.label," ")}}function jt(l,a){if(l&1){let e=x();o(0,"mat-form-field",2)(1,"mat-label"),s(2,"Number of Occurrences"),r(),o(3,"input",10),v("ngModelChange",function(n){p(e);let i=u();return _(i.endOccurrences,n)||(i.endOccurrences=n),h(n)}),r()()}if(l&2){let e=u();d(3),f("ngModel",e.endOccurrences)}}function $t(l,a){if(l&1){let e=x();o(0,"mat-form-field",2)(1,"mat-label"),s(2,"End Date"),r(),o(3,"input",36),v("ngModelChange",function(n){p(e);let i=u();return _(i.endTimestamp,n)||(i.endTimestamp=n),h(n)}),r()()}if(l&2){let e=u();d(3),f("ngModel",e.endTimestamp)}}function Ht(l,a){if(l&1){let e=x();o(0,"div")(1,"mat-form-field",2)(2,"mat-label"),s(3,"Parameter Value"),r(),o(4,"input",37),v("ngModelChange",function(n){p(e);let i=u();return _(i.simpleParameter,n)||(i.simpleParameter=n),h(n)}),r(),o(5,"mat-hint"),s(6),r()()()}if(l&2){let e=u();d(4),f("ngModel",e.simpleParameter),d(2),w("Simple value for ","{{PARAMETERS}}"," placeholder or appended to first command")}}function qt(l,a){if(l&1){let e=x();o(0,"div",40)(1,"mat-form-field",41)(2,"mat-label"),s(3,"Key"),r(),o(4,"input",42),v("ngModelChange",function(n){let i=p(e).$implicit;return _(i.key,n)||(i.key=n),h(n)}),r()(),o(5,"mat-form-field",43)(6,"mat-label"),s(7,"Value"),r(),o(8,"input",44),v("ngModelChange",function(n){let i=p(e).$implicit;return _(i.value,n)||(i.value=n),h(n)}),r()(),o(9,"button",45),g("click",function(){let n=p(e).$index,i=u(3);return h(i.removeParameter(n))}),o(10,"mat-icon"),s(11,"delete"),r()()()}if(l&2){let e=a.$implicit;d(4),f("ngModel",e.key),d(4),f("ngModel",e.value)}}function Qt(l,a){if(l&1&&(o(0,"div",39),A(1,qt,12,2,"div",40,ue),r()),l&2){let e=u(2);d(),L(e.parameters)}}function Kt(l,a){if(l&1){let e=x();o(0,"div")(1,"div",26)(2,"button",38),g("click",function(){p(e);let n=u();return h(n.addParameter())}),o(3,"mat-icon"),s(4,"add"),r()()(),M(5,Qt,3,0,"div",39),o(6,"p",19),s(7),r()()}if(l&2){let e=u();d(5),S(e.parameters.length>0?5:-1),d(2),w("Key-value pairs for ","{{key}}"," placeholders in prompt commands")}}function Xt(l,a){if(l&1&&(o(0,"div",31)(1,"mat-icon"),s(2,"error"),r(),o(3,"span"),s(4),r()()),l&2){let e=u();d(4),O(e.errorMessage)}}var B=class l{schedulerApi=c(E);promptApi=c(H);dialogRef=c(Be);availablePrompts=[];isLoadingPrompts=!1;name="";promptId="";enabled=!0;startTimestamp="";intervalValue=1;intervalUnit="h";daysOfWeek=[];endConditionType="none";endOccurrences=10;endTimestamp="";parameterMode="simple";simpleParameter="";parameters=[];isSaving=!1;errorMessage="";isEditMode=!1;schedulerId="";data=c(De);daysOfWeekOptions=[{value:0,label:"Sunday"},{value:1,label:"Monday"},{value:2,label:"Tuesday"},{value:3,label:"Wednesday"},{value:4,label:"Thursday"},{value:5,label:"Friday"},{value:6,label:"Saturday"}];constructor(){this.isEditMode=this.data.mode==="edit"}ngOnInit(){if(this.loadPrompts(),this.isEditMode||(this.startTimestamp=this.formatDateForInput(new Date)),this.isEditMode&&this.data.scheduler){if(this.schedulerId=this.data.scheduler.id,this.name=this.data.scheduler.name,this.promptId=this.data.scheduler.promptId,this.enabled=this.data.scheduler.enabled,this.data.scheduler.schedule.startTimestamp){let e=new Date(this.data.scheduler.schedule.startTimestamp);this.startTimestamp=this.formatDateForInput(e)}let a=this.data.scheduler.schedule.interval.match(/^(\d+)(min|h|d|M)$/);a&&a[1]&&a[2]&&(this.intervalValue=parseInt(a[1],10),this.intervalUnit=a[2]),this.daysOfWeek=this.data.scheduler.schedule.daysOfWeek||[],this.data.scheduler.schedule.endCondition&&(this.endConditionType=this.data.scheduler.schedule.endCondition.type,this.endConditionType==="occurrences"?this.endOccurrences=this.data.scheduler.schedule.endCondition.value:this.endConditionType==="endTimestamp"&&(this.endTimestamp=this.data.scheduler.schedule.endCondition.value)),this.data.scheduler.parameters&&(typeof this.data.scheduler.parameters=="object"&&Object.keys(this.data.scheduler.parameters).length===1&&"PARAMETERS"in this.data.scheduler.parameters?(this.parameterMode="simple",this.simpleParameter=String(this.data.scheduler.parameters.PARAMETERS)):(this.parameterMode="structured",this.parameters=Object.entries(this.data.scheduler.parameters).map(([e,t])=>({key:e,value:String(t)}))))}}loadPrompts(){this.isLoadingPrompts=!0,this.promptApi.listPrompts().subscribe({next:a=>{this.availablePrompts=a,this.isLoadingPrompts=!1},error:a=>{console.error("Error loading prompts:",a),this.errorMessage="Failed to load prompts",this.isLoadingPrompts=!1}})}toggleDayOfWeek(a){let e=this.daysOfWeek.indexOf(a);e>-1?this.daysOfWeek.splice(e,1):this.daysOfWeek.push(a),this.daysOfWeek.sort()}isDaySelected(a){return this.daysOfWeek.includes(a)}addParameter(){this.parameters.push({key:"",value:""})}removeParameter(a){this.parameters.splice(a,1)}trackByIndex(a){return a}formatDateForInput(a){let e=a.getFullYear(),t=String(a.getMonth()+1).padStart(2,"0"),n=String(a.getDate()).padStart(2,"0"),i=String(a.getHours()).padStart(2,"0"),m=String(a.getMinutes()).padStart(2,"0");return`${e}-${t}-${n}T${i}:${m}`}validateForm(){if(!this.name.trim())return this.errorMessage="Name is required",!1;if(!this.promptId)return this.errorMessage="Prompt is required",!1;if(this.intervalValue<1)return this.errorMessage="Interval must be at least 1",!1;switch(this.intervalUnit){case"min":if(this.intervalValue>59)return this.errorMessage="Minutes interval must be between 1 and 59 (use hours for longer)",!1;break;case"h":if(this.intervalValue>24)return this.errorMessage="Hours interval must be between 1 and 24 (use days for longer)",!1;break;case"d":if(this.intervalValue>31)return this.errorMessage="Days interval must be between 1 and 31 (use months for longer)",!1;break;case"M":if(this.intervalValue>12)return this.errorMessage="Months interval must be between 1 and 12",!1;break}return this.endConditionType==="occurrences"&&this.endOccurrences<1?(this.errorMessage="Occurrences must be at least 1",!1):this.endConditionType==="endTimestamp"&&!this.endTimestamp?(this.errorMessage="End date is required",!1):!0}buildSchedule(){let e={startTimestamp:(this.startTimestamp?new Date(this.startTimestamp):new Date).toISOString(),interval:`${this.intervalValue}${this.intervalUnit}`};return this.daysOfWeek.length>0&&(e.daysOfWeek=[...this.daysOfWeek]),this.endConditionType==="occurrences"?e.endCondition={type:"occurrences",value:this.endOccurrences}:this.endConditionType==="endTimestamp"&&(e.endCondition={type:"endTimestamp",value:this.endTimestamp}),e}buildParameters(){if(this.parameterMode==="simple")return this.simpleParameter.trim()?{PARAMETERS:this.simpleParameter.trim()}:void 0;let a=this.parameters.filter(t=>t.key.trim());if(a.length===0)return;let e={};return a.forEach(t=>{e[t.key]=t.value}),e}save(){if(this.errorMessage="",!this.validateForm())return;let a=this.buildSchedule(),e=this.buildParameters();this.isSaving=!0,this.isEditMode&&this.schedulerId?this.schedulerApi.updateScheduler(this.schedulerId,{name:this.name.trim(),enabled:this.enabled,promptId:this.promptId,schedule:a,parameters:e}).subscribe({next:()=>{this.isSaving=!1,this.dialogRef.close(!0)},error:t=>{console.error("Error updating scheduler:",t),this.errorMessage=t?.error?.error||t?.message||"Failed to update scheduler",this.isSaving=!1}}):this.schedulerApi.createScheduler({name:this.name.trim(),promptId:this.promptId,schedule:a,parameters:e,enabled:this.enabled}).subscribe({next:()=>{this.isSaving=!1,this.dialogRef.close(!0)},error:t=>{console.error("Error creating scheduler:",t),this.errorMessage=t?.error?.error||t?.message||"Failed to create scheduler",this.isSaving=!1}})}cancel(){this.dialogRef.close(!1)}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=I({type:l,selectors:[["app-scheduler-form"]],decls:89,vars:17,consts:[["mat-dialog-title",""],[1,"form-container"],["appearance","outline",1,"full-width"],["matInput","","placeholder","My Scheduler","required","",3,"ngModelChange","ngModel"],["required","",3,"ngModelChange","ngModel"],[3,"value"],["matInput","","type","datetime-local",3,"ngModelChange","ngModel"],[1,"interval-section"],[1,"interval-fields"],["appearance","outline",1,"interval-value"],["matInput","","type","number","min","1","required","",3,"ngModelChange","ngModel"],["appearance","outline",1,"interval-unit"],["value","min"],["value","h"],["value","d"],["value","M"],[1,"days-section"],[1,"days-checkboxes"],[3,"checked"],[1,"hint"],[1,"end-condition-section"],[3,"ngModelChange","ngModel"],["value","none"],["value","occurrences"],["value","endTimestamp"],[1,"parameters-section"],[1,"section-header"],[1,"mode-toggle",3,"ngModelChange","ngModel"],["value","simple"],["value","structured"],[1,"enabled-section"],[1,"error-message"],["align","end"],["mat-button","",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],[3,"change","checked"],["matInput","","type","datetime-local","required","",3,"ngModelChange","ngModel"],["matInput","","placeholder","e.g., 1234 or staging",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Add parameter",3,"click"],[1,"parameters-list"],[1,"parameter-item"],["appearance","outline",1,"param-key"],["matInput","","placeholder","parameterName",3,"ngModelChange","ngModel"],["appearance","outline",1,"param-value"],["matInput","","placeholder","value",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Remove parameter",1,"remove-btn",3,"click"]],template:function(e,t){e&1&&(o(0,"h2",0),s(1),r(),o(2,"mat-dialog-content")(3,"div",1)(4,"mat-form-field",2)(5,"mat-label"),s(6,"Name"),r(),o(7,"input",3),v("ngModelChange",function(i){return _(t.name,i)||(t.name=i),i}),r(),o(8,"mat-hint"),s(9,"A descriptive name for this scheduler"),r()(),o(10,"mat-form-field",2)(11,"mat-label"),s(12,"Prompt"),r(),o(13,"mat-select",4),v("ngModelChange",function(i){return _(t.promptId,i)||(t.promptId=i),i}),A(14,Ut,2,2,"mat-option",5,Gt),r(),o(16,"mat-hint"),s(17,"Select the prompt to execute"),r()(),o(18,"mat-form-field",2)(19,"mat-label"),s(20,"Start Date & Time"),r(),o(21,"input",6),v("ngModelChange",function(i){return _(t.startTimestamp,i)||(t.startTimestamp=i),i}),r(),o(22,"mat-hint"),s(23,"When to start the scheduler (leave empty for now)"),r()(),o(24,"div",7)(25,"h3"),s(26,"Schedule Interval"),r(),o(27,"div",8)(28,"mat-form-field",9)(29,"mat-label"),s(30,"Every"),r(),o(31,"input",10),v("ngModelChange",function(i){return _(t.intervalValue,i)||(t.intervalValue=i),i}),r()(),o(32,"mat-form-field",11)(33,"mat-label"),s(34,"Unit"),r(),o(35,"mat-select",4),v("ngModelChange",function(i){return _(t.intervalUnit,i)||(t.intervalUnit=i),i}),o(36,"mat-option",12),s(37,"Minutes (1-59)"),r(),o(38,"mat-option",13),s(39,"Hours (1-24)"),r(),o(40,"mat-option",14),s(41,"Days (1-31)"),r(),o(42,"mat-option",15),s(43,"Months (1-12)"),r()()()()(),o(44,"div",16)(45,"h3"),s(46,"Days of Week (Optional)"),r(),o(47,"div",17),A(48,zt,2,2,"mat-checkbox",18,Nt),r(),o(50,"p",19),s(51,"Leave empty to run every day"),r()(),o(52,"div",20)(53,"h3"),s(54,"End Condition (Optional)"),r(),o(55,"mat-form-field",2)(56,"mat-label"),s(57,"End Type"),r(),o(58,"mat-select",21),v("ngModelChange",function(i){return _(t.endConditionType,i)||(t.endConditionType=i),i}),o(59,"mat-option",22),s(60,"Never (run indefinitely)"),r(),o(61,"mat-option",23),s(62,"After X occurrences"),r(),o(63,"mat-option",24),s(64,"Until specific date"),r()()(),M(65,jt,4,1,"mat-form-field",2),M(66,$t,4,1,"mat-form-field",2),r(),o(67,"div",25)(68,"div",26)(69,"h3"),s(70,"Parameters (Optional)"),r(),o(71,"mat-button-toggle-group",27),v("ngModelChange",function(i){return _(t.parameterMode,i)||(t.parameterMode=i),i}),o(72,"mat-button-toggle",28),s(73,"Simple"),r(),o(74,"mat-button-toggle",29),s(75,"Structured"),r()()(),M(76,Ht,7,2,"div"),M(77,Kt,8,2,"div"),r(),o(78,"div",30)(79,"mat-checkbox",21),v("ngModelChange",function(i){return _(t.enabled,i)||(t.enabled=i),i}),s(80,"Enabled"),r(),o(81,"p",19),s(82,"Scheduler will only run if enabled"),r()(),M(83,Xt,5,1,"div",31),r()(),o(84,"mat-dialog-actions",32)(85,"button",33),g("click",function(){return t.cancel()}),s(86,"Cancel"),r(),o(87,"button",34),g("click",function(){return t.save()}),s(88),r()()),e&2&&(d(),O(t.isEditMode?"Edit Scheduler":"Create Scheduler"),d(6),f("ngModel",t.name),d(6),f("ngModel",t.promptId),d(),L(t.availablePrompts),d(7),f("ngModel",t.startTimestamp),d(10),f("ngModel",t.intervalValue),d(4),f("ngModel",t.intervalUnit),d(13),L(t.daysOfWeekOptions),d(10),f("ngModel",t.endConditionType),d(7),S(t.endConditionType==="occurrences"?65:-1),d(),S(t.endConditionType==="endTimestamp"?66:-1),d(5),f("ngModel",t.parameterMode),d(5),S(t.parameterMode==="simple"?76:-1),d(),S(t.parameterMode==="structured"?77:-1),d(2),f("ngModel",t.enabled),d(4),S(t.errorMessage?83:-1),d(2),b("disabled",t.isSaving),d(2),b("disabled",t.isSaving),d(),w(" ",t.isSaving?"Saving...":"Save"," "))},dependencies:[ke,$,Xe,Ye,z,Je,Ze,j,We,Ve,Le,Ae,G,ze,W,tt,et,qe,$e,He,Qe,U,N,rt,ot,at,st,lt,St,ie,Q],styles:[".form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0;min-width:600px}@media(max-width:768px){.form-container[_ngcontent-%COMP%]{min-width:auto}}.full-width[_ngcontent-%COMP%]{width:100%}.interval-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .5rem;font-size:1rem;font-weight:600}.interval-section[_ngcontent-%COMP%] .interval-fields[_ngcontent-%COMP%]{display:flex;gap:1rem}.interval-section[_ngcontent-%COMP%] .interval-fields[_ngcontent-%COMP%] .interval-value[_ngcontent-%COMP%], .interval-section[_ngcontent-%COMP%] .interval-fields[_ngcontent-%COMP%] .interval-unit[_ngcontent-%COMP%]{flex:1}.days-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .5rem;font-size:1rem;font-weight:600}.days-section[_ngcontent-%COMP%] .days-checkboxes[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1rem;margin-bottom:.5rem}.days-section[_ngcontent-%COMP%] .days-checkboxes[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{min-width:120px}.days-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary)}.end-condition-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .5rem;font-size:1rem;font-weight:600}.parameters-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}.parameters-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:600}.parameters-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%] .mode-toggle[_ngcontent-%COMP%]{height:32px}.parameters-section[_ngcontent-%COMP%] .parameters-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.parameters-section[_ngcontent-%COMP%] .parameter-item[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.parameters-section[_ngcontent-%COMP%] .parameter-item[_ngcontent-%COMP%] .param-key[_ngcontent-%COMP%]{flex:1}.parameters-section[_ngcontent-%COMP%] .parameter-item[_ngcontent-%COMP%] .param-value[_ngcontent-%COMP%]{flex:2}.parameters-section[_ngcontent-%COMP%] .parameter-item[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{margin-top:8px}.parameters-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:.5rem 0 0;font-size:.85rem;color:var(--color-text-secondary)}.enabled-section[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.enabled-section[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{display:block;margin-bottom:.5rem}.enabled-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary)}.error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:#f443361a;border:1px solid var(--color-error);border-radius:4px;color:var(--color-error)}.error-message[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}"]})};var Yt=()=>[],Zt=l=>({id:l});function Jt(l,a){if(l&1&&(o(0,"div",6),s(1),r()),l&2){let e=u();d(),O(e.errorMessage())}}function en(l,a){if(l&1){let e=x();o(0,"ds-entity-card",8),g("selected",function(n){p(e);let i=u();return h(i.onEdit(n))}),me(1,9),o(2,"button",10),g("click",function(n){return n.stopPropagation()}),o(3,"mat-icon"),s(4,"more_vert"),r()(),ge(),r()}if(l&2){let e=a.$implicit;u();let t=F(11);b("id",e.id)("name",e.name)("description",e.description)("badges",e.badges??ve(6,Yt)),d(2),b("matMenuTriggerFor",t)("matMenuTriggerData",ye(7,Zt,e.id))}}function tn(l,a){if(l&1){let e=x();o(0,"button",11),g("click",function(){let n=p(e).id,i=u();return h(i.onEdit(n))}),o(1,"mat-icon"),s(2,"edit"),r(),s(3," Edit "),r(),o(4,"button",11),g("click",function(){let n=p(e).id,i=u();return h(i.onToggleEnabled(n))}),o(5,"mat-icon"),s(6),r(),s(7),r(),o(8,"button",11),g("click",function(){let n=p(e).id,i=u();return h(i.onRunNow(n))}),o(9,"mat-icon"),s(10,"play_arrow"),r(),s(11," Run now "),r(),o(12,"button",12),g("click",function(){let n=p(e).id,i=u();return h(i.onDelete(n))}),o(13,"mat-icon"),s(14,"delete"),r(),s(15," Delete "),r()}if(l&2){let e=a.id,t=u();d(6),O(t.isEnabled(e)?"pause_circle":"play_circle"),d(),w(" ",t.isEnabled(e)?"Disable":"Enable"," ")}}var Ct=class l{schedulerApi=c(E);promptApi=c(H);configApi=c(ft);location=c(xe);dialog=c(Re);schedulers=k([]);prompts=k([]);isLoading=k(!1);errorMessage=k(null);showOnlyMine=k(!0);currentUsername=k("");schedulerItems=Se(()=>{let a=this.schedulers(),e=this.currentUsername(),n=this.showOnlyMine()&&e?a.filter(y=>this.isMyScheduler(y)):a,m=[...new Set(n.map(y=>y.createdBy))].sort((y,P)=>y===e&&P!==e?-1:P===e&&y!==e?1:y.localeCompare(P)),T=[];for(let y of m){let P=y===e?`${y} (you)`:y;for(let D of n.filter(xt=>xt.createdBy===y))T.push({id:D.id,name:D.name,description:this.buildDescription(D),badges:this.buildBadges(D),groupKey:y,groupLabel:P})}return T});ngOnInit(){this.configApi.getUserConfig().subscribe({next:a=>this.currentUsername.set(a.username??""),error:()=>{}}),this.loadPrompts(),this.loadSchedulers()}loadPrompts(){this.promptApi.listPrompts().subscribe({next:a=>this.prompts.set(a),error:()=>{}})}loadSchedulers(){this.isLoading.set(!0),this.schedulerApi.listSchedulers().subscribe({next:a=>{this.schedulers.set(a),this.isLoading.set(!1)},error:a=>{this.errorMessage.set(a?.error?.error??"Failed to load schedulers"),this.isLoading.set(!1)}})}onBack(){this.location.back()}onCreate(){this.dialog.open(B,{width:"700px",maxHeight:"90vh",data:{mode:"create"}}).afterClosed().subscribe(e=>{e&&this.loadSchedulers()})}onEdit(a){this.schedulerApi.getScheduler(a).subscribe({next:e=>{this.dialog.open(B,{width:"700px",maxHeight:"90vh",data:{mode:"edit",scheduler:e}}).afterClosed().subscribe(n=>{n&&this.loadSchedulers()})},error:e=>this.errorMessage.set(e?.error?.error??"Failed to load scheduler")})}onToggleEnabled(a){let e=this.schedulers().find(n=>n.id===a);if(!e)return;(e.enabled?this.schedulerApi.disableScheduler(a):this.schedulerApi.enableScheduler(a)).subscribe({next:()=>this.loadSchedulers(),error:n=>this.errorMessage.set(n?.error?.error??"Failed to toggle scheduler")})}onRunNow(a){this.schedulerApi.runSchedulerNow(a).subscribe({next:e=>{alert(`Scheduler executed successfully! Thread ID: ${e.threadId}`),this.loadSchedulers()},error:e=>this.errorMessage.set(e?.error?.error??"Failed to run scheduler")})}onDelete(a){confirm("Are you sure you want to delete this scheduler?")&&this.schedulerApi.deleteScheduler(a).subscribe({next:()=>this.loadSchedulers(),error:e=>this.errorMessage.set(e?.error?.error??"Failed to delete scheduler")})}isEnabled(a){return this.schedulers().find(e=>e.id===a)?.enabled??!1}buildDescription(a){let e=this.getPromptName(a.promptId),t=this.formatInterval(a.schedule.interval),n=a.nextRun?new Date(a.nextRun).toLocaleString():"Expired";return`${e} \xB7 ${t} \xB7 Next: ${n}`}buildBadges(a){return[a.enabled?{label:"enabled",variant:"success"}:{label:"disabled",variant:"warning"}]}getPromptName(a){let e=this.prompts().find(t=>t.id===a);return e?e.name:a}formatInterval(a){let e=/^(\d+)(min|h|d|M)$/.exec(a);if(!e)return a;let[,t,n]=e;if(!t||!n)return a;let m={min:"minute",h:"hour",d:"day",M:"month"}[n]??n;return`Every ${t} ${m}${parseInt(t,10)>1?"s":""}`}isMyScheduler(a){let e=t=>t.replace(/[.\s]+/g,"_").toLowerCase();return e(a.createdBy)===e(this.currentUsername())}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=I({type:l,selectors:[["app-scheduler-list"]],decls:13,vars:5,consts:[["schedulerCard",""],["cardMenu","matMenu"],[1,"scheduler-list-page"],["title","Schedulers","cardMinWidth","384px","contentMaxWidth","1400px","searchPlaceholder","Filter schedulers\u2026","emptyMessage","No schedulers found.",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","mat-icon-button","","title","Back",3,"click"],["toolbar-extras","","color","primary",1,"scheduler-list__mine-toggle",3,"ngModelChange","ngModel"],[1,"scheduler-list__error"],["matMenuContent",""],[3,"selected","id","name","description","badges"],["dsCardActions",""],["mat-icon-button","",3,"click","matMenuTriggerFor","matMenuTriggerData"],["mat-menu-item","",3,"click"],["mat-menu-item","",1,"scheduler-list__delete-item",3,"click"]],template:function(e,t){if(e&1&&(o(0,"div",2)(1,"ds-entity-list",3),g("createRequested",function(){return t.onCreate()}),o(2,"button",4),g("click",function(){return t.onBack()}),o(3,"mat-icon"),s(4,"chevron_left"),r()(),o(5,"mat-slide-toggle",5),g("ngModelChange",function(i){return t.showOnlyMine.set(i)}),s(6," Mine "),r()(),M(7,Jt,2,1,"div",6),r(),X(8,en,5,9,"ng-template",null,0,Me),o(10,"mat-menu",null,1),X(12,tn,16,2,"ng-template",7),r()),e&2){let n=F(9);d(),b("items",t.schedulerItems())("showCreate",!0)("itemTemplate",n),d(4),b("ngModel",t.showOnlyMine()),d(2),S(t.errorMessage()?7:-1)}},dependencies:[ut,ct,dt,G,W,U,N,vt,_t,bt,pt,mt,gt,ht,$,z,j],styles:["[_nghost-%COMP%]{display:block;width:100%;min-height:100vh;background:var(--color-bg);overflow-y:auto}.scheduler-list__mine-toggle[_ngcontent-%COMP%]{flex-shrink:0;font-size:.875rem}.scheduler-list__delete-item[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30)}.scheduler-list__delete-item[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit}.scheduler-list__error[_ngcontent-%COMP%]{margin:1rem auto;max-width:900px;padding:.75rem 1rem;background:#dc262614;border:1px solid rgba(220,38,38,.25);border-radius:8px;color:var(--color-error, #ff3b30);font-size:.875rem}"]})};export{Ct as SchedulerListComponent};
@@ -0,0 +1 @@
1
+ import{Oc as k,Pc as u,Rc as j,Z as A,a as b,aa as D,b as f,ba as x,ca as O,da as G,g as _,pa as L}from"./chunk-3JGMGRXW.js";var y=class{apiKeys;username;password;accessToken;basePath;withCredentials;encoder;encodeParam;credentials;constructor({accessToken:h,apiKeys:n,basePath:a,credentials:i,encodeParam:o,encoder:t,password:e,username:c,withCredentials:l}={}){n&&(this.apiKeys=n),c!==void 0&&(this.username=c),e!==void 0&&(this.password=e),h!==void 0&&(this.accessToken=h),a!==void 0&&(this.basePath=a),l!==void 0&&(this.withCredentials=l),t&&(this.encoder=t),this.encodeParam=o??(r=>this.defaultEncodeParam(r)),this.credentials=i??{}}selectHeaderContentType(h){if(h.length===0)return;let n=h.find(a=>this.isJsonMime(a));return n===void 0?h[0]:n}selectHeaderAccept(h){if(h.length===0)return;let n=h.find(a=>this.isJsonMime(a));return n===void 0?h[0]:n}isJsonMime(h){let n=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return h!==null&&(n.test(h)||h.toLowerCase()==="application/json-patch+json")}lookupCredential(h){let n=this.credentials[h];return typeof n=="function"?n():n}addCredentialToHeaders(h,n,a,i){let o=this.lookupCredential(h);return o?a.set(n,(i??"")+o):a}addCredentialToQuery(h,n,a){let i=this.lookupCredential(h);return i?a.set(n,i):a}defaultEncodeParam(h){let n=h.dataFormat==="date-time"&&h.value instanceof Date?h.value.toISOString():h.value;return encodeURIComponent(String(n))}};var v=new D("basePath");var V=class{encodeKey(h){return encodeURIComponent(h)}encodeValue(h){return encodeURIComponent(h)}decodeKey(h){return decodeURIComponent(h)}decodeValue(h){return decodeURIComponent(h)}};var m=class{basePath="http://localhost:8124";defaultHeaders=new k;configuration;encoder;constructor(h,n){if(this.configuration=n||new y,typeof this.configuration.basePath!="string"){let a=Array.isArray(h)?h[0]:void 0;a!=null&&(h=a),typeof h!="string"&&(h=this.basePath),this.configuration.basePath=h}this.encoder=this.configuration.encoder||new V}canConsumeForm(h){return h.indexOf("multipart/form-data")!==-1}addToHttpParams(h,n,a,i=!1){return typeof n=="object"&&!(n instanceof Date)?this.addToHttpParamsRecursive(h,n,i?a:void 0,i):this.addToHttpParamsRecursive(h,n,a)}addToHttpParamsRecursive(h,n,a,i=!1){if(n==null)return h;if(typeof n=="object"){if(a!=null)return i?Object.keys(n).reduce((o,t)=>o.append(`${a}[${t}]`,n[t]),h):h.append(a,JSON.stringify(n));if(Array.isArray(n))n.forEach(o=>h=this.addToHttpParamsRecursive(h,o,a));else if(n instanceof Date)if(a!=null)h=h.append(a,n.toISOString());else throw Error("key may not be null if value is Date");else Object.keys(n).forEach(o=>{let t=a?`${a}.${o}`:o;h=this.addToHttpParamsRecursive(h,n[o],t)});return h}else if(a!=null)return h.append(a,n);throw Error("key may not be null if value is not object or array")}};var R=class C extends m{constructor(n,a,i){super(a,i);this.httpClient=n}createAiModel(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter aiModel was null or undefined when calling createAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let p="/api/ai-models",{basePath:H,withCredentials:g}=this.configuration;return this.httpClient.request("post",`${H}${p}`,f(b({context:c,body:n,responseType:s},g?{withCredentials:g}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}deleteAiModel(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/ai-models/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}getByIdAiModel(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/ai-models/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}getByIdsAiModel(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let p="/api/ai-models/by-ids",{basePath:H,withCredentials:g}=this.configuration;return this.httpClient.request("post",`${H}${p}`,f(b({context:c,body:n,responseType:s},g?{withCredentials:g}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}listByNamespaceIdAiModel(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling listByNamespaceIdAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/ai-models/by-namespaceId/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}listByParentAiModel(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/ai-models/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}updateAiModel(n,a,i="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAiModel.");if(a==null)throw new Error("Required parameter aiModel was null or undefined when calling updateAiModel.");let e=this.defaultHeaders,c=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);c!==void 0&&(e=e.set("Accept",c));let l=t?.context??new u,r=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";c&&(c.startsWith("text")?p="text":this.configuration.isJsonMime(c)?p="json":p="blob");let H=`/api/ai-models/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:g,withCredentials:P}=this.configuration;return this.httpClient.request("put",`${g}${H}`,f(b({context:l,body:a,responseType:p},P?{withCredentials:P}:{}),{headers:e,observe:i,transferCache:r,reportProgress:o}))}static \u0275fac=function(a){return new(a||C)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var E=class C extends m{constructor(n,a,i){super(a,i);this.httpClient=n}createAiProvider(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter aiProvider was null or undefined when calling createAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let p="/api/ai-providers",{basePath:H,withCredentials:g}=this.configuration;return this.httpClient.request("post",`${H}${p}`,f(b({context:c,body:n,responseType:s},g?{withCredentials:g}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}deleteAiProvider(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/ai-providers/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}getByIdAiProvider(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/ai-providers/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}getByIdsAiProvider(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let p="/api/ai-providers/by-ids",{basePath:H,withCredentials:g}=this.configuration;return this.httpClient.request("post",`${H}${p}`,f(b({context:c,body:n,responseType:s},g?{withCredentials:g}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}listByNamespaceIdAiProvider(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling listByNamespaceIdAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/ai-providers/by-namespaceId/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}listByParentAiProvider(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/ai-providers/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}listByUserIdAiProvider(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter userId was null or undefined when calling listByUserIdAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/ai-providers/by-userId/${this.configuration.encodeParam({name:"userId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}updateAiProvider(n,a,i="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAiProvider.");if(a==null)throw new Error("Required parameter aiProvider was null or undefined when calling updateAiProvider.");let e=this.defaultHeaders,c=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);c!==void 0&&(e=e.set("Accept",c));let l=t?.context??new u,r=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";c&&(c.startsWith("text")?p="text":this.configuration.isJsonMime(c)?p="json":p="blob");let H=`/api/ai-providers/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:g,withCredentials:P}=this.configuration;return this.httpClient.request("put",`${g}${H}`,f(b({context:l,body:a,responseType:p},P?{withCredentials:P}:{}),{headers:e,observe:i,transferCache:r,reportProgress:o}))}static \u0275fac=function(a){return new(a||C)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var B=class C extends m{constructor(n,a,i){super(a,i);this.httpClient=n}addMessageCase(n,a,i="body",o=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling addMessageCase.");if(a==null)throw new Error("Required parameter addMessageRequest was null or undefined when calling addMessageCase.");let e=this.defaultHeaders,c=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);c!==void 0&&(e=e.set("Accept",c));let l=t?.context??new u,r=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";c&&(c.startsWith("text")?p="text":this.configuration.isJsonMime(c)?p="json":p="blob");let H=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/messages`,{basePath:g,withCredentials:P}=this.configuration;return this.httpClient.request("post",`${g}${H}`,f(b({context:l,body:a,responseType:p},P?{withCredentials:P}:{}),{headers:e,observe:i,transferCache:r,reportProgress:o}))}createCase(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter _case was null or undefined when calling createCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let p="/api/cases",{basePath:H,withCredentials:g}=this.configuration;return this.httpClient.request("post",`${H}${p}`,f(b({context:c,body:n,responseType:s},g?{withCredentials:g}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}deleteCase(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}getByIdCase(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}getByIdsCase(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let p="/api/cases/by-ids",{basePath:H,withCredentials:g}=this.configuration;return this.httpClient.request("post",`${H}${p}`,f(b({context:c,body:n,responseType:s},g?{withCredentials:g}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}interruptCase(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling interruptCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/interrupt`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}killCase(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling killCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/kill`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}listByParentCase(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/cases/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}updateCase(n,a,i="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateCase.");if(a==null)throw new Error("Required parameter _case was null or undefined when calling updateCase.");let e=this.defaultHeaders,c=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);c!==void 0&&(e=e.set("Accept",c));let l=t?.context??new u,r=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";c&&(c.startsWith("text")?p="text":this.configuration.isJsonMime(c)?p="json":p="blob");let H=`/api/cases/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:g,withCredentials:P}=this.configuration;return this.httpClient.request("put",`${g}${H}`,f(b({context:l,body:a,responseType:p},P?{withCredentials:P}:{}),{headers:e,observe:i,transferCache:r,reportProgress:o}))}static \u0275fac=function(a){return new(a||C)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var $=class C extends m{constructor(n,a,i){super(a,i);this.httpClient=n}createIntegrationConfig(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter integrationConfig was null or undefined when calling createIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let p="/api/integration-configs",{basePath:H,withCredentials:g}=this.configuration;return this.httpClient.request("post",`${H}${p}`,f(b({context:c,body:n,responseType:s},g?{withCredentials:g}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}deleteIntegrationConfig(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/integration-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}getByIdIntegrationConfig(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/integration-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}getByIdsIntegrationConfig(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let p="/api/integration-configs/by-ids",{basePath:H,withCredentials:g}=this.configuration;return this.httpClient.request("post",`${H}${p}`,f(b({context:c,body:n,responseType:s},g?{withCredentials:g}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}listByParentIntegrationConfig(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/integration-configs/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}updateIntegrationConfig(n,a,i="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateIntegrationConfig.");if(a==null)throw new Error("Required parameter integrationConfig was null or undefined when calling updateIntegrationConfig.");let e=this.defaultHeaders,c=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);c!==void 0&&(e=e.set("Accept",c));let l=t?.context??new u,r=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";c&&(c.startsWith("text")?p="text":this.configuration.isJsonMime(c)?p="json":p="blob");let H=`/api/integration-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:g,withCredentials:P}=this.configuration;return this.httpClient.request("put",`${g}${H}`,f(b({context:l,body:a,responseType:p},P?{withCredentials:P}:{}),{headers:e,observe:i,transferCache:r,reportProgress:o}))}static \u0275fac=function(a){return new(a||C)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var M=class C extends m{constructor(n,a,i){super(a,i);this.httpClient=n}getTypeIntegrationType(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter type was null or undefined when calling getTypeIntegrationType.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/integration-types/${this.configuration.encodeParam({name:"type",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}listTypesIntegrationType(n="body",a=!1,i){let o=this.defaultHeaders,t=i?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=i?.context??new u,c=i?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let r="/api/integration-types",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${r}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:c,reportProgress:a}))}static \u0275fac=function(a){return new(a||C)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var q=class C extends m{constructor(n,a,i){super(a,i);this.httpClient=n}createNamespace(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter namespace was null or undefined when calling createNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let p="/api/namespaces",{basePath:H,withCredentials:g}=this.configuration;return this.httpClient.request("post",`${H}${p}`,f(b({context:c,body:n,responseType:s},g?{withCredentials:g}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}deleteNamespace(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/namespaces/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}getByIdNamespace(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/namespaces/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}getByIdsNamespace(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let p="/api/namespaces/by-ids",{basePath:H,withCredentials:g}=this.configuration;return this.httpClient.request("post",`${H}${p}`,f(b({context:c,body:n,responseType:s},g?{withCredentials:g}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}listAllNamespace(n="body",a=!1,i){let o=this.defaultHeaders,t=i?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=i?.context??new u,c=i?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let r="/api/namespaces",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${r}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:c,reportProgress:a}))}listByParentNamespace(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/namespaces/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}updateNamespace(n,a,i="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateNamespace.");if(a==null)throw new Error("Required parameter namespace was null or undefined when calling updateNamespace.");let e=this.defaultHeaders,c=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);c!==void 0&&(e=e.set("Accept",c));let l=t?.context??new u,r=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";c&&(c.startsWith("text")?p="text":this.configuration.isJsonMime(c)?p="json":p="blob");let H=`/api/namespaces/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:g,withCredentials:P}=this.configuration;return this.httpClient.request("put",`${g}${H}`,f(b({context:l,body:a,responseType:p},P?{withCredentials:P}:{}),{headers:e,observe:i,transferCache:r,reportProgress:o}))}static \u0275fac=function(a){return new(a||C)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var K=(a=>(a.OpenAI="OpenAI",a.Anthropic="Anthropic",a.Gemini="Gemini",a))(K||{});var S=class C extends m{constructor(n,a,i){super(a,i);this.httpClient=n}createAgentConfig(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter agentConfig was null or undefined when calling createAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let p="/api/agent-configs",{basePath:H,withCredentials:g}=this.configuration;return this.httpClient.request("post",`${H}${p}`,f(b({context:c,body:n,responseType:s},g?{withCredentials:g}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}deleteAgentConfig(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}getByIdAgentConfig(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}getByIdsAgentConfig(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let p="/api/agent-configs/by-ids",{basePath:H,withCredentials:g}=this.configuration;return this.httpClient.request("post",`${H}${p}`,f(b({context:c,body:n,responseType:s},g?{withCredentials:g}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}listByParentAgentConfig(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/agent-configs/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}updateAgentConfig(n,a,i="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAgentConfig.");if(a==null)throw new Error("Required parameter agentConfig was null or undefined when calling updateAgentConfig.");let e=this.defaultHeaders,c=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);c!==void 0&&(e=e.set("Accept",c));let l=t?.context??new u,r=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";c&&(c.startsWith("text")?p="text":this.configuration.isJsonMime(c)?p="json":p="blob");let H=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:g,withCredentials:P}=this.configuration;return this.httpClient.request("put",`${g}${H}`,f(b({context:l,body:a,responseType:p},P?{withCredentials:P}:{}),{headers:e,observe:i,transferCache:r,reportProgress:o}))}static \u0275fac=function(a){return new(a||C)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var N=class C extends m{constructor(n,a,i){super(a,i);this.httpClient=n}getByIdCaseEventRest(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdCaseEventRest.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/case-events/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}getByIdsCaseEventRest(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsCaseEventRest.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let p="/api/case-events/by-ids",{basePath:H,withCredentials:g}=this.configuration;return this.httpClient.request("post",`${H}${p}`,f(b({context:c,body:n,responseType:s},g?{withCredentials:g}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}listByCaseCaseEventRest(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling listByCaseCaseEventRest.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/case-events/by-parentId/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}static \u0275fac=function(a){return new(a||C)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var U=class C extends m{constructor(n,a,i){super(a,i);this.httpClient=n}debugAllPlugins(n="body",a=!1,i){let o=this.defaultHeaders,t=i?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=i?.context??new u,c=i?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let r="/api/plugins/debug",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${r}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:c,reportProgress:a}))}debugPlugin(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling debugPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/debug`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}getAllPlugins(n="body",a=!1,i){let o=this.defaultHeaders,t=i?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=i?.context??new u,c=i?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let r="/api/plugins",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${r}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:c,reportProgress:a}))}getPlugin(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling getPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}reloadAllAgentsPlugin(n="body",a=!1,i){let o=this.defaultHeaders,t=i?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=i?.context??new u,c=i?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let r="/api/plugins/reload-agents",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("post",`${d}${r}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:c,reportProgress:a}))}reloadPlugin(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling reloadPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/reload`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}startPlugin(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling startPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/start`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}stopPlugin(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling stopPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/stop`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}unloadPlugin(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling unloadPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}uploadPlugin(n="body",a=!1,i){let o=this.defaultHeaders,t=i?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=i?.context??new u,c=i?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let r="/api/plugins/upload",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("post",`${d}${r}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:c,reportProgress:a}))}static \u0275fac=function(a){return new(a||C)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var J=class C extends m{constructor(n,a,i){super(a,i);this.httpClient=n}streamEventsCaseEventSse(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling streamEventsCaseEventSse.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["text/event-stream"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/events`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}static \u0275fac=function(a){return new(a||C)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var W=class C extends m{constructor(n,a,i){super(a,i);this.httpClient=n}createUser(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter user was null or undefined when calling createUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let p="/api/users",{basePath:H,withCredentials:g}=this.configuration;return this.httpClient.request("post",`${H}${p}`,f(b({context:c,body:n,responseType:s},g?{withCredentials:g}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}deleteUser(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/users/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}getByIdUser(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/users/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}getByIdsUser(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let p="/api/users/by-ids",{basePath:H,withCredentials:g}=this.configuration;return this.httpClient.request("post",`${H}${p}`,f(b({context:c,body:n,responseType:s},g?{withCredentials:g}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}getMeUser(n="body",a=!1,i){let o=this.defaultHeaders,t=i?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=i?.context??new u,c=i?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let r="/api/users/me",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${r}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:c,reportProgress:a}))}listAllUser(n="body",a=!1,i){let o=this.defaultHeaders,t=i?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=i?.context??new u,c=i?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let r="/api/users",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${r}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:c,reportProgress:a}))}listByParentUser(n,a="body",i=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let c=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/users/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:c,responseType:r},p?{withCredentials:p}:{}),{headers:t,observe:a,transferCache:l,reportProgress:i}))}updateUser(n,a,i="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateUser.");if(a==null)throw new Error("Required parameter user was null or undefined when calling updateUser.");let e=this.defaultHeaders,c=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);c!==void 0&&(e=e.set("Accept",c));let l=t?.context??new u,r=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";c&&(c.startsWith("text")?p="text":this.configuration.isJsonMime(c)?p="json":p="blob");let H=`/api/users/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:g,withCredentials:P}=this.configuration;return this.httpClient.request("put",`${g}${H}`,f(b({context:l,body:a,responseType:p},P?{withCredentials:P}:{}),{headers:e,observe:i,transferCache:r,reportProgress:o}))}static \u0275fac=function(a){return new(a||C)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};function no(C){return G([typeof C=="string"?{provide:v,useValue:C}:{provide:y,useValue:new y(b({},C))}])}var F=class C{config=O(y);zone=O(L);connect(h){let n=`${this.config.basePath}/api/cases/${h}/events`;return new _(a=>{let i=this.zone.runOutsideAngular(()=>new EventSource(n));return i.onmessage=o=>{try{let t=JSON.parse(o.data);this.zone.run(()=>a.next(t))}catch(t){this.zone.run(()=>a.error(new Error(`Failed to parse SSE event: ${t}`)))}},i.onerror=o=>{i.readyState===EventSource.CLOSED?this.zone.run(()=>a.complete()):this.zone.run(()=>a.error(new Error(`SSE connection error for case ${h}`))),i.close()},()=>i.close()})}static \u0275fac=function(n){return new(n||C)};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};export{y as a,R as b,E as c,B as d,$ as e,M as f,q as g,U as h,W as i,K as j,no as k};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-SZNIOJIK.js";import"./chunk-GAZJZBKP.js";import"./chunk-QWMDAFBN.js";import"./chunk-ZL64I3EB.js";import"./chunk-ZAM3WGZM.js";import"./chunk-AJOXSD6I.js";import"./chunk-53STPEYQ.js";import"./chunk-AK6F2DC7.js";import"./chunk-IXD43YQI.js";import"./chunk-WPC6XC7P.js";import"./chunk-XJUBZLY2.js";import"./chunk-B2QA6UZX.js";import"./chunk-3JGMGRXW.js";export{a as CaseHomeComponent};
@@ -0,0 +1 @@
1
+ import{e as $}from"./chunk-GAZJZBKP.js";import{b as q,d as I}from"./chunk-QWMDAFBN.js";import{b as y,g as A}from"./chunk-ZL64I3EB.js";import"./chunk-ZAM3WGZM.js";import{a as x}from"./chunk-AJOXSD6I.js";import"./chunk-53STPEYQ.js";import"./chunk-AK6F2DC7.js";import"./chunk-IXD43YQI.js";import"./chunk-WPC6XC7P.js";import"./chunk-XJUBZLY2.js";import"./chunk-B2QA6UZX.js";import{Bb as p,Db as s,Fb as c,Gc as B,Ka as d,Pb as P,S as M,Tb as C,Ub as h,Wa as f,ab as k,ac as N,ca as m,dc as S,ec as V,ga as l,ha as g,hc as O,i as w,lb as _,ma as E,mb as u,oa as T,rb as v,sb as r,t as D,ta as R,tb as a}from"./chunk-3JGMGRXW.js";function U(n,t){if(n&1){let e=p();r(0,"span",5),C(1,"Delete?"),a(),r(2,"ds-icon-button",6),s("action",function(){l(e);let i=c();return g(i.onDeleteConfirmed())}),a(),r(3,"ds-icon-button",7),s("action",function(){l(e);let i=c();return g(i.onDeleteCancelled())}),a()}}function W(n,t){if(n&1){let e=p();r(0,"ds-icon-button",8),s("action",function(){l(e);let i=c();return g(i.onEdit())}),a(),r(1,"ds-icon-button",9),s("action",function(){l(e);let i=c();return g(i.onDeleteArmed())}),a()}}var b=class n{router=m(I);config;namespaceId;deleteRequested=new T;pendingDelete=R(!1);onEdit(){this.router.navigate(["/agentos",this.namespaceId,"integrations",this.config.id,"edit"])}onDeleteArmed(){this.pendingDelete.set(!0)}onDeleteConfirmed(){this.pendingDelete.set(!1),this.deleteRequested.emit(this.config)}onDeleteCancelled(){this.pendingDelete.set(!1)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=f({type:n,selectors:[["agentos-integration-config-item"]],inputs:{config:"config",namespaceId:"namespaceId"},outputs:{deleteRequested:"deleteRequested"},decls:9,vars:3,consts:[["role","listitem",1,"integration-config-item"],[1,"integration-config-item__body"],[1,"integration-config-item__name"],[1,"integration-config-item__type"],[1,"integration-config-item__actions"],[1,"integration-config-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],["icon","edit","title","Edit integration",3,"action"],["icon","delete","variant","danger","title","Delete integration",3,"action"]],template:function(e,o){e&1&&(r(0,"div",0)(1,"div",1)(2,"span",2),C(3),a(),r(4,"span",3),C(5),a()(),r(6,"div",4),_(7,U,4,0)(8,W,2,0),a()()),e&2&&(d(3),h(o.config.name),d(2),h(o.config.integrationType),d(2),u(o.pendingDelete()?7:8))},dependencies:[y],styles:[".integration-config-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));transition:background .15s ease,border-color .15s ease}.integration-config-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.integration-config-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.integration-config-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.integration-config-item__type[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary, #6e6e73);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.integration-config-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.integration-config-item[_ngcontent-%COMP%]:hover .integration-config-item__actions[_ngcontent-%COMP%], .integration-config-item[_ngcontent-%COMP%]:focus-within .integration-config-item__actions[_ngcontent-%COMP%]{opacity:1}.integration-config-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error, #ff3b30);margin-right:.25rem;white-space:nowrap}"],changeDetection:0})};var G=()=>[];function H(n,t){if(n&1){let e=p();r(0,"agentos-integration-config-item",4),s("deleteRequested",function(i){l(e);let j=c(2);return g(j.deleteConfig(i))}),a()}if(n&2){let e=c(2);v("config",t)("namespaceId",e.namespaceId)}}function J(n,t){if(n&1&&_(0,H,1,2,"agentos-integration-config-item",3),n&2){let e,o=t.$implicit,i=c();u((e=i.resolveConfig(o.id))?0:-1,e)}}var F=class n{route=m(q);router=m(I);destroyRef=m(E);integrationConfigController=m($);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new w(void 0);configs$=this.refresh$.pipe(M(()=>this.integrationConfigController.listByParentIntegrationConfig(this.namespaceId)));configItems$=this.configs$.pipe(D(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.integrationType}))));configsById=new Map;constructor(){this.configs$.pipe(x(this.destroyRef)).subscribe(t=>{this.configsById=new Map(t.map(e=>[e.id??"",e]))})}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"integrations","new"])}deleteConfig(t){this.integrationConfigController.deleteIntegrationConfig(t.id??"").pipe(x(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveConfig(t){return this.configsById.get(t)??null}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=f({type:n,selectors:[["agentos-namespace-integrations"]],decls:5,vars:6,consts:[["integrationItemTpl",""],["title","Integrations","emptyMessage","No integrations configured yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"config","namespaceId"],[3,"deleteRequested","config","namespaceId"]],template:function(e,o){if(e&1&&(r(0,"ds-entity-list",1),S(1,"async"),s("createRequested",function(){return o.openCreateForm()}),r(2,"ds-icon-button",2),s("action",function(){return o.goBack()}),a()(),k(3,J,1,1,"ng-template",null,0,O)),e&2){let i=P(4);v("items",V(1,3,o.configItems$)??N(5,G))("showCreate",!0)("itemTemplate",i)}},dependencies:[A,b,y,B],encapsulation:2})};export{F as NamespaceIntegrationsComponent};