@codemieai/code 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +17 -6
  2. package/dist/agents/plugins/claude/plugin/skills/codemie-analytics/SKILL.md +641 -0
  3. package/dist/agents/plugins/claude/plugin/skills/codemie-analytics/references/leaderboard-dashboard-report.md +225 -0
  4. package/dist/agents/plugins/claude/plugin/skills/codemie-analytics/references/people-spending-dashboard-report.md +746 -0
  5. package/dist/agents/plugins/claude/plugin/skills/codemie-analytics/references/people-spending-dashboard-template.html +3270 -0
  6. package/dist/agents/plugins/claude/plugin/skills/codemie-analytics/scripts/analytics-cli.js +893 -0
  7. package/dist/agents/plugins/claude/plugin/skills/codemie-analytics/scripts/inspect-schema.js +211 -0
  8. package/dist/agents/plugins/claude/plugin/skills/codemie-html-report/README.md +39 -0
  9. package/dist/agents/plugins/claude/plugin/skills/codemie-html-report/SKILL.md +117 -26
  10. package/dist/agents/plugins/claude/plugin/skills/codemie-html-report/scripts/inject-css.js +40 -0
  11. package/dist/agents/plugins/claude/plugin/skills/codemie-html-report/scripts/inject-data.js +68 -0
  12. package/dist/agents/plugins/claude/plugin/skills/codemie-html-report/style-guide/css/bundle.css +1 -0
  13. package/dist/agents/plugins/claude/plugin/skills/codemie-sdk/SKILL.md +240 -0
  14. package/dist/agents/plugins/claude/plugin/skills/codemie-sdk/examples/assistants.md +256 -0
  15. package/dist/agents/plugins/claude/plugin/skills/codemie-sdk/examples/categories.md +101 -0
  16. package/dist/agents/plugins/claude/plugin/skills/codemie-sdk/examples/datasources.md +401 -0
  17. package/dist/agents/plugins/claude/plugin/skills/codemie-sdk/examples/integrations.md +242 -0
  18. package/dist/agents/plugins/claude/plugin/skills/codemie-sdk/examples/skills.md +191 -0
  19. package/dist/agents/plugins/claude/plugin/skills/codemie-sdk/examples/users.md +38 -0
  20. package/dist/agents/plugins/claude/plugin/skills/codemie-sdk/examples/workflows.md +151 -0
  21. package/dist/cli/commands/profile/display.d.ts.map +1 -1
  22. package/dist/cli/commands/profile/display.js +1 -0
  23. package/dist/cli/commands/profile/display.js.map +1 -1
  24. package/dist/cli/commands/proxy/connectors/desktop.d.ts.map +1 -1
  25. package/dist/cli/commands/proxy/connectors/desktop.js +20 -10
  26. package/dist/cli/commands/proxy/connectors/desktop.js.map +1 -1
  27. package/dist/cli/commands/sdk/assistants.d.ts +3 -0
  28. package/dist/cli/commands/sdk/assistants.d.ts.map +1 -0
  29. package/dist/cli/commands/sdk/assistants.js +211 -0
  30. package/dist/cli/commands/sdk/assistants.js.map +1 -0
  31. package/dist/cli/commands/sdk/categories.d.ts +3 -0
  32. package/dist/cli/commands/sdk/categories.d.ts.map +1 -0
  33. package/dist/cli/commands/sdk/categories.js +186 -0
  34. package/dist/cli/commands/sdk/categories.js.map +1 -0
  35. package/dist/cli/commands/sdk/datasources.d.ts +3 -0
  36. package/dist/cli/commands/sdk/datasources.d.ts.map +1 -0
  37. package/dist/cli/commands/sdk/datasources.js +276 -0
  38. package/dist/cli/commands/sdk/datasources.js.map +1 -0
  39. package/dist/cli/commands/sdk/index.d.ts +3 -0
  40. package/dist/cli/commands/sdk/index.d.ts.map +1 -0
  41. package/dist/cli/commands/sdk/index.js +23 -0
  42. package/dist/cli/commands/sdk/index.js.map +1 -0
  43. package/dist/cli/commands/sdk/integrations.d.ts +3 -0
  44. package/dist/cli/commands/sdk/integrations.d.ts.map +1 -0
  45. package/dist/cli/commands/sdk/integrations.js +220 -0
  46. package/dist/cli/commands/sdk/integrations.js.map +1 -0
  47. package/dist/cli/commands/sdk/llm.d.ts +3 -0
  48. package/dist/cli/commands/sdk/llm.d.ts.map +1 -0
  49. package/dist/cli/commands/sdk/llm.js +48 -0
  50. package/dist/cli/commands/sdk/llm.js.map +1 -0
  51. package/dist/cli/commands/sdk/services/assistants.d.ts +13 -0
  52. package/dist/cli/commands/sdk/services/assistants.d.ts.map +1 -0
  53. package/dist/cli/commands/sdk/services/assistants.js +60 -0
  54. package/dist/cli/commands/sdk/services/assistants.js.map +1 -0
  55. package/dist/cli/commands/sdk/services/categories.d.ts +8 -0
  56. package/dist/cli/commands/sdk/services/categories.d.ts.map +1 -0
  57. package/dist/cli/commands/sdk/services/categories.js +19 -0
  58. package/dist/cli/commands/sdk/services/categories.js.map +1 -0
  59. package/dist/cli/commands/sdk/services/datasources.d.ts +33 -0
  60. package/dist/cli/commands/sdk/services/datasources.d.ts.map +1 -0
  61. package/dist/cli/commands/sdk/services/datasources.js +268 -0
  62. package/dist/cli/commands/sdk/services/datasources.js.map +1 -0
  63. package/dist/cli/commands/sdk/services/index.d.ts +6 -0
  64. package/dist/cli/commands/sdk/services/index.d.ts.map +1 -0
  65. package/dist/cli/commands/sdk/services/index.js +6 -0
  66. package/dist/cli/commands/sdk/services/index.js.map +1 -0
  67. package/dist/cli/commands/sdk/services/integrations.d.ts +27 -0
  68. package/dist/cli/commands/sdk/services/integrations.d.ts.map +1 -0
  69. package/dist/cli/commands/sdk/services/integrations.js +59 -0
  70. package/dist/cli/commands/sdk/services/integrations.js.map +1 -0
  71. package/dist/cli/commands/sdk/services/llm.d.ts +4 -0
  72. package/dist/cli/commands/sdk/services/llm.d.ts.map +1 -0
  73. package/dist/cli/commands/sdk/services/llm.js +7 -0
  74. package/dist/cli/commands/sdk/services/llm.js.map +1 -0
  75. package/dist/cli/commands/sdk/services/skills.d.ts +23 -0
  76. package/dist/cli/commands/sdk/services/skills.d.ts.map +1 -0
  77. package/dist/cli/commands/sdk/services/skills.js +69 -0
  78. package/dist/cli/commands/sdk/services/skills.js.map +1 -0
  79. package/dist/cli/commands/sdk/services/users.d.ts +4 -0
  80. package/dist/cli/commands/sdk/services/users.d.ts.map +1 -0
  81. package/dist/cli/commands/sdk/services/users.js +7 -0
  82. package/dist/cli/commands/sdk/services/users.js.map +1 -0
  83. package/dist/cli/commands/sdk/services/workflows.d.ts +7 -0
  84. package/dist/cli/commands/sdk/services/workflows.d.ts.map +1 -0
  85. package/dist/cli/commands/sdk/services/workflows.js +34 -0
  86. package/dist/cli/commands/sdk/services/workflows.js.map +1 -0
  87. package/dist/cli/commands/sdk/skills.d.ts +3 -0
  88. package/dist/cli/commands/sdk/skills.d.ts.map +1 -0
  89. package/dist/cli/commands/sdk/skills.js +492 -0
  90. package/dist/cli/commands/sdk/skills.js.map +1 -0
  91. package/dist/cli/commands/sdk/users.d.ts +3 -0
  92. package/dist/cli/commands/sdk/users.d.ts.map +1 -0
  93. package/dist/cli/commands/sdk/users.js +81 -0
  94. package/dist/cli/commands/sdk/users.js.map +1 -0
  95. package/dist/cli/commands/sdk/utils/cli-utils.d.ts +35 -0
  96. package/dist/cli/commands/sdk/utils/cli-utils.d.ts.map +1 -0
  97. package/dist/cli/commands/sdk/utils/cli-utils.js +110 -0
  98. package/dist/cli/commands/sdk/utils/cli-utils.js.map +1 -0
  99. package/dist/cli/commands/sdk/utils/datasource-types.d.ts +9 -0
  100. package/dist/cli/commands/sdk/utils/datasource-types.d.ts.map +1 -0
  101. package/dist/cli/commands/sdk/utils/datasource-types.js +61 -0
  102. package/dist/cli/commands/sdk/utils/datasource-types.js.map +1 -0
  103. package/dist/cli/commands/sdk/utils/file-utils.d.ts +8 -0
  104. package/dist/cli/commands/sdk/utils/file-utils.d.ts.map +1 -0
  105. package/dist/cli/commands/sdk/utils/file-utils.js +21 -0
  106. package/dist/cli/commands/sdk/utils/file-utils.js.map +1 -0
  107. package/dist/cli/commands/sdk/utils/render.d.ts +82 -0
  108. package/dist/cli/commands/sdk/utils/render.d.ts.map +1 -0
  109. package/dist/cli/commands/sdk/utils/render.js +149 -0
  110. package/dist/cli/commands/sdk/utils/render.js.map +1 -0
  111. package/dist/cli/commands/sdk/workflows.d.ts +3 -0
  112. package/dist/cli/commands/sdk/workflows.d.ts.map +1 -0
  113. package/dist/cli/commands/sdk/workflows.js +170 -0
  114. package/dist/cli/commands/sdk/workflows.js.map +1 -0
  115. package/dist/cli/index.js +2 -0
  116. package/dist/cli/index.js.map +1 -1
  117. package/package.json +1 -1
@@ -0,0 +1,240 @@
1
+ ---
2
+ name: codemie-sdk
3
+ description: >-
4
+ Manage CodeMie platform assets (assistants, workflows, datasources, integrations, skills, users, assistant-categories) directly from CLI
5
+ using CodeMie SDK. Use when user says "create assistant", "list workflows", "update datasource",
6
+ "delete assistant", "show my assistants", "get workflow details", "manage integrations",
7
+ "create integration", "list integrations", "list llm models", "list embedding models",
8
+ "list skills", "get skill", "create skill", "update skill", "delete skill", "publish skill",
9
+ "import skill", "export skill", "attach skill", "list assistant categories", "get assistant category",
10
+ "create assistant category", "delete assistant category", "who am i", "current user", "my profile", "user info",
11
+ or any request to manage CodeMie platform resources.
12
+ NOTE: For analytics requests (usage analytics, summaries, spending, users activity, leaderboards, etc.) use the codemie-analytics skill instead.
13
+ ---
14
+
15
+ # CodeMie SDK Asset Management
16
+
17
+ Manage CodeMie platform assets from the CLI.
18
+
19
+ > **Analytics requests** (usage data, summaries, spending, activity, etc.) are handled by the **codemie-analytics** skill — use that instead.
20
+
21
+ **Asset Types:** `assistants`, `workflows`, `datasources`, `integrations`, `skills`, `users`, `assistant-categories`
22
+
23
+ **Operations:** `list`, `get`, `create`, `update`, `delete`
24
+
25
+ ---
26
+
27
+ ## 🚨 Project Clarification (MANDATORY)
28
+
29
+ **Before proceeding with any work, you must determine which project to use by following these steps:**
30
+
31
+ ### Step 1 — Fetch the User Profile
32
+
33
+ ```bash
34
+ codemie sdk users me --json
35
+ ```
36
+
37
+ This command returns `user_id`, `username`, `email`, `is_admin`, `applications`, and `applications_admin`.
38
+
39
+ ### Step 2 — Identify Available Projects
40
+
41
+ - If `is_admin = true`: the user can access **all** projects on the platform, not just those listed in `applications`.
42
+ - If `is_admin = false`: the user can only work with projects listed in `applications`.
43
+ - The **default project** is the one matching the user's email (e.g., for `alice@acme.com`, the default project is `alice@acme.com`).
44
+
45
+ ### Step 3 — Confirm the Project Selection
46
+
47
+ - If the user **explicitly** states a project name, or uses phrases like **"use my project"** or **"in my project"**, proceed with the identified project (use the default project for phrases like "my project" or "my default project").
48
+ - In **all other cases**, ALWAYS ask the user which project to use.
49
+
50
+ Aks the user what project to use with the options as follows:
51
+
52
+ 1. **Default project** — `<user-email>` *(personal default project)*
53
+ 2. **Choose a different project** — let the user to manually type the project name.
54
+
55
+ **Example prompt:**
56
+ > *Which project should I use?*
57
+ > *1. alice@acme.com (your default project)*
58
+ > *2. Choose a different project*
59
+
60
+ ---
61
+
62
+ **Note:**
63
+ Only select a project automatically if the user has explicitly named it, or used clear phrases indicating the default (e.g., "my project", "my default project"). In all other situations, always ask for project clarification.
64
+
65
+ ### Step 4 — Proceed
66
+
67
+ Once the project is known, use it in all subsequent commands:
68
+ - Assistants, skills, assistant-categories: `"project": "<name>"`
69
+ - Workflows, datasources, integrations: `"project_name": "<name>"`
70
+
71
+ ---
72
+
73
+ ## 📖 Consult Examples Before Working on an Asset (MANDATORY)
74
+
75
+ **Before creating, updating, or querying any asset**, read the corresponding example file for complete field references, schemas, and commands to fetch referenced assets.
76
+
77
+ | Asset | Example file |
78
+ |-------|-------------|
79
+ | Assistants | [examples/assistants.md](${CLAUDE_PLUGIN_ROOT}/skills/codemie-sdk/examples/assistants.md) |
80
+ | Workflows | [examples/workflows.md](${CLAUDE_PLUGIN_ROOT}/skills/codemie-sdk/examples/workflows.md) |
81
+ | Datasources | [examples/datasources.md](${CLAUDE_PLUGIN_ROOT}/skills/codemie-sdk/examples/datasources.md) |
82
+ | Integrations | [examples/integrations.md](${CLAUDE_PLUGIN_ROOT}/skills/codemie-sdk/examples/integrations.md) |
83
+ | Skills | [examples/skills.md](${CLAUDE_PLUGIN_ROOT}/skills/codemie-sdk/examples/skills.md) |
84
+ | Users | [examples/users.md](${CLAUDE_PLUGIN_ROOT}/skills/codemie-sdk/examples/users.md) |
85
+ | Assistant Categories | [examples/categories.md](${CLAUDE_PLUGIN_ROOT}/skills/codemie-sdk/examples/categories.md) |
86
+
87
+ Do **not** guess field names or skip this step — all required/optional fields, nested schemas, and asset cross-reference commands are documented there.
88
+
89
+ ---
90
+
91
+ ## Input / Output
92
+
93
+ **Two ways to pass data:**
94
+ - Inline JSON: `--data '{"key":"value"}'`
95
+ - From file: `--json path/to/config.json`
96
+
97
+ **IDs are UUIDs**, e.g. `bc1a4b75-955c-48a5-b26d-bf702c1fee5d`
98
+
99
+ **Create does not return the new ID** in the output. After creating, use `list --search` to find the new asset's ID.
100
+
101
+ **Update replaces non-primitive values in full** — arrays and objects are not merged with existing values; the value you provide replaces the entire field. To preserve existing entries, either do not provide the value at all or fetch the current state first (`get <id> --json`), merge locally, then send the full updated value.
102
+
103
+ ---
104
+
105
+ ## Assistants
106
+
107
+ > See [examples/assistants.md](${CLAUDE_PLUGIN_ROOT}/skills/codemie-sdk/examples/assistants.md) for full field reference and examples.
108
+
109
+ ```bash
110
+ codemie sdk assistants list [--scope visible_to_user|marketplace] [--search <text>] [--projects <name>] [--page <n>] [--per-page <n>] [--full-response] [--json]
111
+ codemie sdk assistants get <id> [--json]
112
+ codemie sdk assistants get-tools [--json]
113
+ codemie sdk assistants create --data '<json>' | --json <file>
114
+ codemie sdk assistants update <id> --data '<json>' | --json <file>
115
+ codemie sdk assistants delete <id>
116
+ ```
117
+
118
+ **Required on create:** `name`, `project`, `system_prompt`
119
+
120
+ ---
121
+
122
+ ## Workflows
123
+
124
+ > See [examples/workflows.md](${CLAUDE_PLUGIN_ROOT}/skills/codemie-sdk/examples/workflows.md) for full field reference and examples.
125
+
126
+ ```bash
127
+ codemie sdk workflows list [--search <text>] [--projects <name>] [--page <n>] [--per-page <n>] [--json]
128
+ codemie sdk workflows get <id> [--json]
129
+ codemie sdk workflows create --data '<json>' --config '<yaml>' | --config path/to/config.yaml
130
+ codemie sdk workflows update <id> --data '<json>' [--config '<yaml>' | --config path/to/config.yaml]
131
+ codemie sdk workflows delete <id>
132
+ ```
133
+
134
+ **Required on create:** `name`, `project`, `mode` (`"Sequential"`), `shared` (boolean), plus `--config` with YAML graph definition
135
+
136
+ ---
137
+
138
+ ## Datasources
139
+
140
+ > See [examples/datasources.md](${CLAUDE_PLUGIN_ROOT}/skills/codemie-sdk/examples/datasources.md) for full field reference and examples.
141
+
142
+ Type subcommands for create/update: `confluence`, `jira`, `file`, `code`, `google`, `provider`, `azure-devops-wiki`, `azure-devops-work-item`, `xray`, `sharepoint`
143
+
144
+ ```bash
145
+ codemie sdk datasources list [--search <text>] [--projects <name>] [--status <status>] [--datasource-types <types>] [--sort-key date|update_date] [--sort-order asc|desc] [--page <n>] [--per-page <n>] [--json]
146
+ codemie sdk datasources get <id> [--json]
147
+ codemie sdk datasources create <type> --data '<json>' | --json <file>
148
+ codemie sdk datasources update <type> <id> --data '<json>' | --json <file>
149
+ codemie sdk datasources delete <id>
150
+ # file type only: --file ./doc.pdf (repeatable, max 10)
151
+ ```
152
+
153
+ **Required on create (all types):** `name` (no spaces, use hyphens), `project_name`, plus type-specific required fields
154
+
155
+ ---
156
+
157
+ ## Integrations
158
+
159
+ > See [examples/integrations.md](${CLAUDE_PLUGIN_ROOT}/skills/codemie-sdk/examples/integrations.md) for full field reference and examples.
160
+
161
+ ```bash
162
+ codemie sdk integrations list [--setting-type user|project] [--search <text>] [--projects <name>] [--page <n>] [--per-page <n>] [--json]
163
+ codemie sdk integrations get <id> [--setting-type user|project] [--json]
164
+ codemie sdk integrations get-by-alias <alias> [--setting-type user|project] [--json]
165
+ codemie sdk integrations create --data '<json>' | --json <file>
166
+ codemie sdk integrations update <id> --data '<json>' | --json <file>
167
+ codemie sdk integrations delete <id> [--setting-type user|project]
168
+ ```
169
+
170
+ **Required on create:** `credential_type`, `project_name`, `credential_values` (must include `{"key":"alias","value":"<alias>"}`)
171
+
172
+ ---
173
+
174
+ ## LLM Models
175
+
176
+ ```bash
177
+ codemie sdk llm list [--json]
178
+ codemie sdk llm list --embeddings [--json]
179
+ ```
180
+
181
+ Use `base_name` when setting `llm_model_type` on an assistant or `embeddings_model`/`summarization_model` on a datasource.
182
+
183
+ ---
184
+
185
+ ## Skills
186
+
187
+ > See [examples/skills.md](${CLAUDE_PLUGIN_ROOT}/skills/codemie-sdk/examples/skills.md) for full field reference and examples.
188
+
189
+ ```bash
190
+ codemie sdk skills list [--scope marketplace|project|project_with_marketplace] [--page <n>] [--per-page <n>] [--json]
191
+ codemie sdk skills get <id> [--json]
192
+ codemie sdk skills create --data '<json>' | --json <file>
193
+ codemie sdk skills update <id> --data '<json>' | --json <file>
194
+ codemie sdk skills delete <id>
195
+ codemie sdk skills import <file.md> --project <name> [--visibility private|project|public] [--json]
196
+ codemie sdk skills export <id>
197
+ codemie sdk skills attach <assistant-id> <skill-id>
198
+ codemie sdk skills detach <assistant-id> <skill-id>
199
+ codemie sdk skills list-assistant-skills <assistant-id> [--json]
200
+ codemie sdk skills bulk-attach <skill-id> --assistant-ids <id1>,<id2>,...
201
+ codemie sdk skills get-assistants <skill-id> [--json]
202
+ codemie sdk skills publish <id> [--categories <cat1>,<cat2>]
203
+ codemie sdk skills unpublish <id>
204
+ codemie sdk skills list-categories [--json]
205
+ codemie sdk skills get-users [--json]
206
+ codemie sdk skills react <id> --reaction like|dislike
207
+ codemie sdk skills remove-reactions <id>
208
+ ```
209
+
210
+ **Required on create:** `name` (kebab-case, 3–64 chars), `description` (10–1000 chars), `content` (markdown, min 100 chars), `project`
211
+
212
+ ---
213
+
214
+ ## Users
215
+
216
+ > See [examples/users.md](${CLAUDE_PLUGIN_ROOT}/skills/codemie-sdk/examples/users.md) for full field reference and examples.
217
+
218
+ ```bash
219
+ codemie sdk users me [--json]
220
+ codemie sdk users data [--json]
221
+ ```
222
+
223
+ ---
224
+
225
+ ## Assistant Categories
226
+
227
+ > See [examples/categories.md](${CLAUDE_PLUGIN_ROOT}/skills/codemie-sdk/examples/categories.md) for full field reference and examples.
228
+
229
+ **Note:** Categories can only be used for assistants (set via the `categories` field on create/update).
230
+
231
+ ```bash
232
+ codemie sdk assistant-categories list [--paginated] [--page <n>] [--per-page <n>] [--json]
233
+ codemie sdk assistant-categories get <id> [--json]
234
+ codemie sdk assistant-categories create --data '<json>' | --json <file>
235
+ codemie sdk assistant-categories update <id> --data '<json>' | --json <file>
236
+ codemie sdk assistant-categories delete <id>
237
+ ```
238
+
239
+ **Required on create:** `name` (1–255 chars)
240
+
@@ -0,0 +1,256 @@
1
+ # Assistants Examples
2
+
3
+ ## List
4
+
5
+ ```bash
6
+ # Basic list
7
+ codemie sdk assistants list
8
+
9
+ # Search by name
10
+ codemie sdk assistants list --search 'Code Review'
11
+
12
+ # Filter by project
13
+ codemie sdk assistants list --projects MyProject
14
+
15
+ # Marketplace assistants
16
+ codemie sdk assistants list --scope marketplace
17
+
18
+ # JSON output with pagination
19
+ codemie sdk assistants list --page 0 --per-page 20 --json
20
+
21
+ # Full assistant details in list
22
+ codemie sdk assistants list --full-response --json
23
+ ```
24
+
25
+ **JSON output fields (list):** `id`, `name`, `slug`, `type`, `description`, `shared`, `is_global`, `categories`, `created_by`
26
+
27
+ ## Get
28
+
29
+ ```bash
30
+ codemie sdk assistants get bc1a4b75-955c-48a5-b26d-bf702c1fee5d
31
+ codemie sdk assistants get bc1a4b75-955c-48a5-b26d-bf702c1fee5d --json
32
+ ```
33
+
34
+ **Additional fields in get:** `project`, `llm_model_type`, `system_prompt`, `temperature`, `toolkits`, `skill_ids`
35
+
36
+ ## Create
37
+
38
+ ```bash
39
+ # Minimal (required fields only)
40
+ codemie sdk assistants create --data '{"name":"My Assistant","project":"MyProject","system_prompt":"You are a helpful assistant."}'
41
+
42
+ # Full example from file
43
+ codemie sdk assistants create --json assistant.json
44
+ ```
45
+
46
+ **Field reference:**
47
+
48
+ | Field | Required | Type | Description |
49
+ |-------|----------|------|-------------|
50
+ | `name` | ✅ | string | Display name of the assistant |
51
+ | `project` | ✅ | string | Project to create the assistant in |
52
+ | `system_prompt` | ✅ | string | Instruction text that defines the assistant's persona and behavior |
53
+ | `description` | — | string | Short description shown in list and marketplace views |
54
+ | `icon_url` | — | string | URL to an image used as the assistant's avatar |
55
+ | `shared` | — | boolean | `true` = visible to all project members; `false` = private (default) |
56
+ | `is_global` | — | boolean | `true` = available across all projects platform-wide |
57
+ | `is_react` | — | boolean | Use ReAct (reasoning + acting) agent pattern; requires a model with `react_agent: true` |
58
+ | `slug` | — | string | URL-friendly identifier for deep-linking to this assistant |
59
+ | `llm_model_type` | — | string | Model `base_name` — if omitted, the platform default is used |
60
+ | `temperature` | — | number | Sampling temperature 0.0–1.0; lower = more deterministic outputs |
61
+ | `top_p` | — | number | Nucleus sampling 0.0–1.0; use either `temperature` or `top_p`, not both |
62
+ | `conversation_starters` | — | string[] | Suggested prompts displayed to users as quick-start buttons |
63
+ | `context` | — | array | Datasources attached as knowledge — see schema below |
64
+ | `toolkits` | — | array | Integration toolkits (Git, Jira, etc.) — see schema below |
65
+ | `mcp_servers` | — | array | MCP server connections for additional tools — see schema below |
66
+ | `assistant_ids` | — | string[] | Sub-assistant IDs for orchestration (multi-agent workflows) |
67
+ | `prompt_variables` | — | array | Dynamic `{{variable}}` placeholders in the system prompt — see schema below |
68
+ | `categories` | — | string[] | Label IDs for marketplace classification (e.g. `["devops", "code-review"]`). You can manage assistants categories via codemie sdk assistant-categories command (get, create, update and so on). Only categories listed via this command can be used in this field |
69
+ | `skill_ids` | — | string[] | Built-in platform skill IDs — **not** datasource IDs |
70
+ | `skip_integration_validation` | — | boolean | Skip credential validation when attaching toolkits (useful with test credentials) |
71
+
72
+ **Get available models:**
73
+ ```bash
74
+ codemie sdk llm list --json | jq -r '.[] | "\(.base_name) (\(.label))"'
75
+ ```
76
+
77
+ **`context` entry schema** — attach datasources:
78
+ ```json
79
+ { "id": "<datasource-id>", "context_type": "knowledge_base", "name": "<datasource-name>" }
80
+ ```
81
+ Valid `context_type`: `"knowledge_base"` (file/confluence/jira/google), `"code"` (code repository).
82
+ ```bash
83
+ # Get datasource IDs
84
+ codemie sdk datasources list --projects MyProject --json | jq -r '.[] | "\(.id) \(.name)"'
85
+ ```
86
+
87
+ **`toolkits` entry schema** — get the exact structure from the platform:
88
+ ```bash
89
+ codemie sdk assistants get-tools --json
90
+ ```
91
+ Then pick the desired toolkit object(s) and include them in your payload. Each entry looks like:
92
+ ```json
93
+ {
94
+ "toolkit": "Jira",
95
+ "label": "Jira",
96
+ "settings_config": false,
97
+ "is_external": false,
98
+ "tools": [
99
+ { "name": "jira_get_issue", "settings_config": false },
100
+ { "name": "jira_search", "settings_config": false }
101
+ ]
102
+ }
103
+ ```
104
+
105
+ **`mcp_servers` entry schema:**
106
+ ```json
107
+ {
108
+ "name": "my-mcp-server",
109
+ "description": "Custom tool server",
110
+ "enabled": true,
111
+ "config": {
112
+ "url": "https://mcp.example.com",
113
+ "auth_token": "<optional-token>",
114
+ "env": {}
115
+ },
116
+ "tools_tokens_size_limit": 4096
117
+ }
118
+ ```
119
+
120
+ **`assistant_ids`** — for multi-agent orchestration, reference other assistant IDs:
121
+ ```bash
122
+ codemie sdk assistants list --projects MyProject --json | jq -r '.[] | "\(.id) \(.name)"'
123
+ ```
124
+
125
+ **`prompt_variables` entry schema:**
126
+ ```json
127
+ { "key": "language", "description": "Programming language to focus on", "default_value": "TypeScript" }
128
+ ```
129
+ Reference in system prompt as `{{language}}`.
130
+
131
+ **Full `assistant.json` example:**
132
+ ```json
133
+ {
134
+ "name": "Code Reviewer",
135
+ "project": "Engineering",
136
+ "description": "Reviews code for best practices and security",
137
+ "system_prompt": "You are a {{language}} code review assistant. Focus on {{focus_area}}.",
138
+ "shared": true,
139
+ "llm_model_type": "claude-3-7-sonnet",
140
+ "temperature": 0.3,
141
+ "conversation_starters": [
142
+ "Review my latest PR",
143
+ "Check this function for security issues"
144
+ ],
145
+ "context": [
146
+ { "id": "<datasource-id>", "context_type": "knowledge_base", "name": "Engineering Docs" }
147
+ ],
148
+ "toolkits": [
149
+ {
150
+ "toolkit": "Jira",
151
+ "label": "Jira",
152
+ "settings_config": false,
153
+ "is_external": false,
154
+ "tools": [
155
+ { "name": "jira_get_issue", "settings_config": false },
156
+ { "name": "jira_search", "settings_config": false }
157
+ ]
158
+ }
159
+ ],
160
+ "prompt_variables": [
161
+ { "key": "language", "description": "Primary language", "default_value": "TypeScript" },
162
+ { "key": "focus_area", "description": "Review focus", "default_value": "security and performance" }
163
+ ],
164
+ "categories": ["code-review", "engineering"]
165
+ }
166
+ ```
167
+
168
+ Output: `✓ Specified assistant saved` — **no ID is returned**. Find the new ID via:
169
+ ```bash
170
+ codemie sdk assistants list --search 'My Assistant' --json | jq -r '.[0].id'
171
+ ```
172
+
173
+ ## Update
174
+
175
+ ```bash
176
+ codemie sdk assistants update <id> --data '{"name":"Updated Name","shared":true}'
177
+ codemie sdk assistants update <id> --json updates.json
178
+ ```
179
+
180
+ ## Delete
181
+
182
+ ```bash
183
+ # Always verify before deleting
184
+ codemie sdk assistants get <id>
185
+ codemie sdk assistants delete <id>
186
+ ```
187
+
188
+ ## Linking a Datasource
189
+
190
+ Datasources are attached via the `context` field — **not** `skill_ids`. Each entry requires `id`, `context_type`, and `name`.
191
+
192
+ Valid `context_type` values: `"knowledge_base"` (file/confluence/jira datasources), `"code"` (code repository datasources).
193
+
194
+ ```bash
195
+ # Get the datasource ID first
196
+ codemie sdk datasources list --search 'my-docs' --json
197
+
198
+ # Attach to assistant
199
+ codemie sdk assistants update <id> --data '{
200
+ "context": [
201
+ {
202
+ "id": "<datasource-id>",
203
+ "context_type": "knowledge_base",
204
+ "name": "<datasource-name>"
205
+ }
206
+ ]
207
+ }'
208
+ ```
209
+
210
+ > **Note:** `skill_ids` holds built-in platform skills, not datasources. Do not use it to attach datasources.
211
+
212
+ ## Linking a Toolkit (Integration)
213
+
214
+ Use the `toolkits` array to attach integrations (Git, Jira, etc.) to an assistant.
215
+
216
+ Known toolkit names: `"Git"`, `"Jira"`, `"Confluence"`, `"Access Management"`, `"Codebase Tools"`, `"Project Management"`, `"Research"`.
217
+
218
+ ```bash
219
+ # Attach Git toolkit
220
+ codemie sdk assistants update <id> --data '{
221
+ "toolkits": [
222
+ {
223
+ "toolkit": "Git",
224
+ "label": "Git",
225
+ "settings_config": true,
226
+ "is_external": false,
227
+ "tools": [{ "name": "git_tools", "settings_config": false }]
228
+ }
229
+ ]
230
+ }'
231
+ ```
232
+
233
+ If the integration credentials can't be validated (test/fake credentials), add `"skip_integration_validation": true` at the top level:
234
+
235
+ ```bash
236
+ codemie sdk assistants update <id> --data '{
237
+ "toolkits": [...],
238
+ "skip_integration_validation": true
239
+ }'
240
+ ```
241
+
242
+ ## Scripting
243
+
244
+ ```bash
245
+ # Create then immediately fetch the new ID
246
+ codemie sdk assistants create --data '{"name":"My Bot","project":"Eng","system_prompt":"You are helpful."}'
247
+ ID=$(codemie sdk assistants list --search 'My Bot' --json | jq -r '.[0].id')
248
+
249
+ # Find assistant by name
250
+ codemie sdk assistants list --search 'My Bot' --json | jq -r '.[].id'
251
+
252
+ # Update all assistants in a project to shared
253
+ codemie sdk assistants list --projects Engineering --json | jq -r '.[].id' | while read id; do
254
+ codemie sdk assistants update "$id" --data '{"shared":true}'
255
+ done
256
+ ```
@@ -0,0 +1,101 @@
1
+ # Categories Examples
2
+
3
+ > **Note:** Categories can only be used for **assistants**. Set a category on an assistant via the `categories` field (array of category IDs) when creating or updating.
4
+
5
+ ## List
6
+
7
+ ```bash
8
+ # List all categories (public, no admin required)
9
+ codemie sdk assistant-categories list
10
+ codemie sdk assistant-categories list --json
11
+
12
+ # Paginated list with assistant counts (admin required)
13
+ codemie sdk assistant-categories list --paginated
14
+ codemie sdk assistant-categories list --paginated --page 0 --per-page 25 --json
15
+ ```
16
+
17
+ **Non-paginated JSON fields:** `id`, `name`, `description`
18
+
19
+ **Paginated JSON fields:** `categories[]` (with `id`, `name`, `description`, `marketplaceAssistantCount`, `projectAssistantCount`, `createdAt`, `updatedAt`), `page`, `per_page`, `total`, `pages`
20
+
21
+ ## Get
22
+
23
+ ```bash
24
+ codemie sdk assistant-categories get <id>
25
+ codemie sdk assistant-categories get <id> --json
26
+ ```
27
+
28
+ Admin access required. Returns `id`, `name`, `description`, `marketplaceAssistantCount`, `projectAssistantCount`, `createdAt`, `updatedAt`.
29
+
30
+ ## Create
31
+
32
+ ```bash
33
+ # Minimal (name only)
34
+ codemie sdk assistant-categories create --data '{"name":"DevOps"}'
35
+
36
+ # With description
37
+ codemie sdk assistant-categories create --data '{"name":"Code Review","description":"Skills for reviewing code quality and security"}'
38
+
39
+ # From file
40
+ codemie sdk assistant-categories create --json category.json
41
+ ```
42
+
43
+ **Field reference:**
44
+
45
+ | Field | Required | Type | Description |
46
+ |-------|----------|------|-------------|
47
+ | `name` | ✅ | string | 1–255 chars |
48
+ | `description` | — | string | Optional, max 1000 chars |
49
+
50
+ Admin access required.
51
+
52
+ ## Update
53
+
54
+ ```bash
55
+ codemie sdk assistant-categories update <id> --data '{"name":"Updated Name"}'
56
+ codemie sdk assistant-categories update <id> --data '{"name":"DevOps","description":"Updated description"}'
57
+ ```
58
+
59
+ Admin access required.
60
+
61
+ ## Delete
62
+
63
+ ```bash
64
+ # Verify before deleting
65
+ codemie sdk assistant-categories get <id>
66
+ codemie sdk assistant-categories delete <id>
67
+ ```
68
+
69
+ Admin access required. Fails with **409** if any assistants are still assigned to this category — reassign or remove those assistants first.
70
+
71
+ ## Using Categories with Assistants
72
+
73
+ Categories are referenced by their `id` in the assistant `categories` field.
74
+
75
+ ```bash
76
+ # Get available category IDs
77
+ codemie sdk assistant-categories list --json | jq -r '.[] | "\(.id) \(.name)"'
78
+
79
+ # Create an assistant with categories
80
+ codemie sdk assistants create --data '{
81
+ "name": "Code Reviewer",
82
+ "project": "Engineering",
83
+ "system_prompt": "You are a code review assistant.",
84
+ "categories": ["<category-id-1>", "<category-id-2>"]
85
+ }'
86
+
87
+ # Update an assistant to add categories
88
+ codemie sdk assistants update <assistant-id> --data '{
89
+ "categories": ["<category-id>"]
90
+ }'
91
+ ```
92
+
93
+ ## Scripting
94
+
95
+ ```bash
96
+ # Find category ID by name
97
+ codemie sdk assistant-categories list --json | jq -r '.[] | select(.name == "DevOps") | .id'
98
+
99
+ # List all categories with assistant counts (admin)
100
+ codemie sdk assistant-categories list --paginated --json | jq -r '.categories[] | "\(.name): \(.marketplaceAssistantCount) marketplace, \(.projectAssistantCount) project"'
101
+ ```