Packages
opencode_sdk
0.1.19
0.1.84
0.1.83
0.1.82
0.1.81
0.1.80
0.1.79
0.1.78
0.1.77
0.1.76
0.1.75
0.1.74
0.1.73
0.1.72
0.1.71
0.1.70
0.1.69
0.1.68
0.1.67
0.1.66
0.1.65
0.1.64
0.1.63
0.1.62
0.1.61
0.1.60
0.1.59
0.1.58
0.1.57
0.1.56
0.1.55
0.1.54
0.1.53
0.1.52
0.1.51
0.1.50
0.1.49
0.1.48
0.1.47
0.1.46
0.1.45
0.1.44
0.1.43
0.1.42
0.1.41
0.1.40
0.1.39
0.1.38
0.1.37
0.1.36
0.1.35
0.1.34
0.1.33
0.1.32
0.1.31
0.1.30
0.1.29
0.1.28
0.1.27
0.1.26
0.1.25
0.1.24
0.1.23
0.1.22
0.1.21
0.1.20
0.1.19
0.1.18
0.1.17
0.1.16
0.1.15
0.1.14
0.1.13
0.1.12
0.1.11
0.1.10
0.1.9
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
Unofficial OpenCode SDK for Elixir. A complete Elixir SDK for OpenCode, providing server creation, session management, messaging, file operations, and more. Mirrors the functionality of the official JavaScript SDK (@opencode-ai/sdk). Not affiliated with or built by the OpenCode team.
Current section
85 Versions
Jump to
Current section
85 Versions
Compare versions
4
files changed
+181
additions
-180
deletions
| @@ -12,7 +12,7 @@ Add `opencode_sdk` to your dependencies in `mix.exs`: | |
| 12 12 | ```elixir |
| 13 13 | def deps do |
| 14 14 | [ |
| 15 | - {:opencode_sdk, "~> 0.1.18"} |
| 15 | + {:opencode_sdk, "~> 0.1.19"} |
| 16 16 | ] |
| 17 17 | end |
| 18 18 | ``` |
| @@ -2,7 +2,7 @@ | |
| 2 2 | [{<<"GitHub">>,<<"https://github.com/UtkarshUsername/opencode-sdk-elixir">>}, |
| 3 3 | {<<"OpenCode">>,<<"https://opencode.ai">>}]}. |
| 4 4 | {<<"name">>,<<"opencode_sdk">>}. |
| 5 | - {<<"version">>,<<"0.1.18">>}. |
| 5 | + {<<"version">>,<<"0.1.19">>}. |
| 6 6 | {<<"description">>, |
| 7 7 | <<"Unofficial OpenCode SDK for Elixir. A complete Elixir SDK for OpenCode,\nproviding server creation, session management, messaging, file operations, and more.\nMirrors the functionality of the official JavaScript SDK (@opencode-ai/sdk).\nNot affiliated with or built by the OpenCode team.">>}. |
| 8 8 | {<<"elixir">>,<<"~> 1.15">>}. |
| @@ -1,7 +1,7 @@ | |
| 1 1 | defmodule OpenCode.MixProject do |
| 2 2 | use Mix.Project |
| 3 3 | |
| 4 | - @version "0.1.18" |
| 4 | + @version "0.1.19" |
| 5 5 | @source_url "https://github.com/UtkarshUsername/opencode-sdk-elixir" |
| 6 6 | |
| 7 7 | def project do |
| @@ -7062,96 +7062,6 @@ | |
| 7062 7062 | }, |
| 7063 7063 | "required": ["type", "properties"] |
| 7064 7064 | }, |
| 7065 | - "PermissionRequest": { |
| 7066 | - "type": "object", |
| 7067 | - "properties": { |
| 7068 | - "id": { |
| 7069 | - "type": "string", |
| 7070 | - "pattern": "^per.*" |
| 7071 | - }, |
| 7072 | - "sessionID": { |
| 7073 | - "type": "string", |
| 7074 | - "pattern": "^ses.*" |
| 7075 | - }, |
| 7076 | - "permission": { |
| 7077 | - "type": "string" |
| 7078 | - }, |
| 7079 | - "patterns": { |
| 7080 | - "type": "array", |
| 7081 | - "items": { |
| 7082 | - "type": "string" |
| 7083 | - } |
| 7084 | - }, |
| 7085 | - "metadata": { |
| 7086 | - "type": "object", |
| 7087 | - "propertyNames": { |
| 7088 | - "type": "string" |
| 7089 | - }, |
| 7090 | - "additionalProperties": {} |
| 7091 | - }, |
| 7092 | - "always": { |
| 7093 | - "type": "array", |
| 7094 | - "items": { |
| 7095 | - "type": "string" |
| 7096 | - } |
| 7097 | - }, |
| 7098 | - "tool": { |
| 7099 | - "type": "object", |
| 7100 | - "properties": { |
| 7101 | - "messageID": { |
| 7102 | - "type": "string", |
| 7103 | - "pattern": "^msg.*" |
| 7104 | - }, |
| 7105 | - "callID": { |
| 7106 | - "type": "string" |
| 7107 | - } |
| 7108 | - }, |
| 7109 | - "required": ["messageID", "callID"] |
| 7110 | - } |
| 7111 | - }, |
| 7112 | - "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"] |
| 7113 | - }, |
| 7114 | - "Event.permission.asked": { |
| 7115 | - "type": "object", |
| 7116 | - "properties": { |
| 7117 | - "type": { |
| 7118 | - "type": "string", |
| 7119 | - "const": "permission.asked" |
| 7120 | - }, |
| 7121 | - "properties": { |
| 7122 | - "$ref": "#/components/schemas/PermissionRequest" |
| 7123 | - } |
| 7124 | - }, |
| 7125 | - "required": ["type", "properties"] |
| 7126 | - }, |
| 7127 | - "Event.permission.replied": { |
| 7128 | - "type": "object", |
| 7129 | - "properties": { |
| 7130 | - "type": { |
| 7131 | - "type": "string", |
| 7132 | - "const": "permission.replied" |
| 7133 | - }, |
| 7134 | - "properties": { |
| 7135 | - "type": "object", |
| 7136 | - "properties": { |
| 7137 | - "sessionID": { |
| 7138 | - "type": "string", |
| 7139 | - "pattern": "^ses.*" |
| 7140 | - }, |
| 7141 | - "requestID": { |
| 7142 | - "type": "string", |
| 7143 | - "pattern": "^per.*" |
| 7144 | - }, |
| 7145 | - "reply": { |
| 7146 | - "type": "string", |
| 7147 | - "enum": ["once", "always", "reject"] |
| 7148 | - } |
| 7149 | - }, |
| 7150 | - "required": ["sessionID", "requestID", "reply"] |
| 7151 | - } |
| 7152 | - }, |
| 7153 | - "required": ["type", "properties"] |
| 7154 | - }, |
| 7155 7065 | "QuestionOption": { |
| 7156 7066 | "type": "object", |
| 7157 7067 | "properties": { |
| @@ -7302,6 +7212,168 @@ | |
| 7302 7212 | }, |
| 7303 7213 | "required": ["type", "properties"] |
| 7304 7214 | }, |
| 7215 | + "PermissionRequest": { |
| 7216 | + "type": "object", |
| 7217 | + "properties": { |
| 7218 | + "id": { |
| 7219 | + "type": "string", |
| 7220 | + "pattern": "^per.*" |
| 7221 | + }, |
| 7222 | + "sessionID": { |
| 7223 | + "type": "string", |
| 7224 | + "pattern": "^ses.*" |
| 7225 | + }, |
| 7226 | + "permission": { |
| 7227 | + "type": "string" |
| 7228 | + }, |
| 7229 | + "patterns": { |
| 7230 | + "type": "array", |
| 7231 | + "items": { |
| 7232 | + "type": "string" |
| 7233 | + } |
| 7234 | + }, |
| 7235 | + "metadata": { |
| 7236 | + "type": "object", |
| 7237 | + "propertyNames": { |
| 7238 | + "type": "string" |
| 7239 | + }, |
| 7240 | + "additionalProperties": {} |
| 7241 | + }, |
| 7242 | + "always": { |
| 7243 | + "type": "array", |
| 7244 | + "items": { |
| 7245 | + "type": "string" |
| 7246 | + } |
| 7247 | + }, |
| 7248 | + "tool": { |
| 7249 | + "type": "object", |
| 7250 | + "properties": { |
| 7251 | + "messageID": { |
| 7252 | + "type": "string", |
| 7253 | + "pattern": "^msg.*" |
| 7254 | + }, |
| 7255 | + "callID": { |
| 7256 | + "type": "string" |
| 7257 | + } |
| 7258 | + }, |
| 7259 | + "required": ["messageID", "callID"] |
| 7260 | + } |
| 7261 | + }, |
| 7262 | + "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"] |
| 7263 | + }, |
| 7264 | + "Event.permission.asked": { |
| 7265 | + "type": "object", |
| 7266 | + "properties": { |
| 7267 | + "type": { |
| 7268 | + "type": "string", |
| 7269 | + "const": "permission.asked" |
| 7270 | + }, |
| 7271 | + "properties": { |
| 7272 | + "$ref": "#/components/schemas/PermissionRequest" |
| 7273 | + } |
| 7274 | + }, |
| 7275 | + "required": ["type", "properties"] |
| 7276 | + }, |
| 7277 | + "Event.permission.replied": { |
| 7278 | + "type": "object", |
| 7279 | + "properties": { |
| 7280 | + "type": { |
| 7281 | + "type": "string", |
| 7282 | + "const": "permission.replied" |
| 7283 | + }, |
| 7284 | + "properties": { |
| 7285 | + "type": "object", |
| 7286 | + "properties": { |
| 7287 | + "sessionID": { |
| 7288 | + "type": "string", |
| 7289 | + "pattern": "^ses.*" |
| 7290 | + }, |
| 7291 | + "requestID": { |
| 7292 | + "type": "string", |
| 7293 | + "pattern": "^per.*" |
| 7294 | + }, |
| 7295 | + "reply": { |
| 7296 | + "type": "string", |
| 7297 | + "enum": ["once", "always", "reject"] |
| 7298 | + } |
| 7299 | + }, |
| 7300 | + "required": ["sessionID", "requestID", "reply"] |
| 7301 | + } |
| 7302 | + }, |
| 7303 | + "required": ["type", "properties"] |
| 7304 | + }, |
| 7305 | + "Event.file.watcher.updated": { |
| 7306 | + "type": "object", |
| 7307 | + "properties": { |
| 7308 | + "type": { |
| 7309 | + "type": "string", |
| 7310 | + "const": "file.watcher.updated" |
| 7311 | + }, |
| 7312 | + "properties": { |
| 7313 | + "type": "object", |
| 7314 | + "properties": { |
| 7315 | + "file": { |
| 7316 | + "type": "string" |
| 7317 | + }, |
| 7318 | + "event": { |
| 7319 | + "anyOf": [ |
| 7320 | + { |
| 7321 | + "type": "string", |
| 7322 | + "const": "add" |
| 7323 | + }, |
| 7324 | + { |
| 7325 | + "type": "string", |
| 7326 | + "const": "change" |
| 7327 | + }, |
| 7328 | + { |
| 7329 | + "type": "string", |
| 7330 | + "const": "unlink" |
| 7331 | + } |
| 7332 | + ] |
| 7333 | + } |
| 7334 | + }, |
| 7335 | + "required": ["file", "event"] |
| 7336 | + } |
| 7337 | + }, |
| 7338 | + "required": ["type", "properties"] |
| 7339 | + }, |
| 7340 | + "Event.vcs.branch.updated": { |
| 7341 | + "type": "object", |
| 7342 | + "properties": { |
| 7343 | + "type": { |
| 7344 | + "type": "string", |
| 7345 | + "const": "vcs.branch.updated" |
| 7346 | + }, |
| 7347 | + "properties": { |
| 7348 | + "type": "object", |
| 7349 | + "properties": { |
| 7350 | + "branch": { |
| 7351 | + "type": "string" |
| 7352 | + } |
| 7353 | + } |
| 7354 | + } |
| 7355 | + }, |
| 7356 | + "required": ["type", "properties"] |
| 7357 | + }, |
| 7358 | + "Event.file.edited": { |
| 7359 | + "type": "object", |
| 7360 | + "properties": { |
| 7361 | + "type": { |
| 7362 | + "type": "string", |
| 7363 | + "const": "file.edited" |
| 7364 | + }, |
| 7365 | + "properties": { |
| 7366 | + "type": "object", |
| 7367 | + "properties": { |
| 7368 | + "file": { |
| 7369 | + "type": "string" |
| 7370 | + } |
| 7371 | + }, |
| 7372 | + "required": ["file"] |
| 7373 | + } |
| 7374 | + }, |
| 7375 | + "required": ["type", "properties"] |
| 7376 | + }, |
| 7305 7377 | "Event.server.connected": { |
| 7306 7378 | "type": "object", |
| 7307 7379 | "properties": { |
| @@ -7366,25 +7438,6 @@ | |
| 7366 7438 | }, |
| 7367 7439 | "required": ["type", "properties"] |
| 7368 7440 | }, |
| 7369 | - "Event.file.edited": { |
| 7370 | - "type": "object", |
| 7371 | - "properties": { |
| 7372 | - "type": { |
| 7373 | - "type": "string", |
| 7374 | - "const": "file.edited" |
| 7375 | - }, |
| 7376 | - "properties": { |
| 7377 | - "type": "object", |
| 7378 | - "properties": { |
| 7379 | - "file": { |
| 7380 | - "type": "string" |
| 7381 | - } |
| 7382 | - }, |
| 7383 | - "required": ["file"] |
| 7384 | - } |
| 7385 | - }, |
| 7386 | - "required": ["type", "properties"] |
| 7387 | - }, |
| 7388 7441 | "OutputFormatText": { |
| 7389 7442 | "type": "object", |
| 7390 7443 | "properties": { |
| @@ -8866,41 +8919,6 @@ | |
| 8866 8919 | }, |
| 8867 8920 | "required": ["type", "properties"] |
| 8868 8921 | }, |
| 8869 | - "Event.file.watcher.updated": { |
| 8870 | - "type": "object", |
| 8871 | - "properties": { |
| 8872 | - "type": { |
| 8873 | - "type": "string", |
| 8874 | - "const": "file.watcher.updated" |
| 8875 | - }, |
| 8876 | - "properties": { |
| 8877 | - "type": "object", |
| 8878 | - "properties": { |
| 8879 | - "file": { |
| 8880 | - "type": "string" |
| 8881 | - }, |
| 8882 | - "event": { |
| 8883 | - "anyOf": [ |
| 8884 | - { |
| 8885 | - "type": "string", |
| 8886 | - "const": "add" |
| 8887 | - }, |
| 8888 | - { |
| 8889 | - "type": "string", |
| 8890 | - "const": "change" |
| 8891 | - }, |
| 8892 | - { |
| 8893 | - "type": "string", |
| 8894 | - "const": "unlink" |
| 8895 | - } |
| 8896 | - ] |
| 8897 | - } |
| 8898 | - }, |
| 8899 | - "required": ["file", "event"] |
| 8900 | - } |
| 8901 | - }, |
| 8902 | - "required": ["type", "properties"] |
| 8903 | - }, |
| 8904 8922 | "Todo": { |
| 8905 8923 | "type": "object", |
| 8906 8924 | "properties": { |
| @@ -9387,24 +9405,6 @@ | |
| 9387 9405 | }, |
| 9388 9406 | "required": ["type", "properties"] |
| 9389 9407 | }, |
| 9390 | - "Event.vcs.branch.updated": { |
| 9391 | - "type": "object", |
| 9392 | - "properties": { |
| 9393 | - "type": { |
| 9394 | - "type": "string", |
| 9395 | - "const": "vcs.branch.updated" |
| 9396 | - }, |
| 9397 | - "properties": { |
| 9398 | - "type": "object", |
| 9399 | - "properties": { |
| 9400 | - "branch": { |
| 9401 | - "type": "string" |
| 9402 | - } |
| 9403 | - } |
| 9404 | - } |
| 9405 | - }, |
| 9406 | - "required": ["type", "properties"] |
| 9407 | - }, |
| 9408 9408 | "Event.workspace.ready": { |
| 9409 9409 | "type": "object", |
| 9410 9410 | "properties": { |
| @@ -9611,12 +9611,6 @@ | |
| 9611 9611 | { |
| 9612 9612 | "$ref": "#/components/schemas/Event.server.instance.disposed" |
| 9613 9613 | }, |
| 9614 | - { |
| 9615 | - "$ref": "#/components/schemas/Event.permission.asked" |
| 9616 | - }, |
| 9617 | - { |
| 9618 | - "$ref": "#/components/schemas/Event.permission.replied" |
| 9619 | - }, |
| 9620 9614 | { |
| 9621 9615 | "$ref": "#/components/schemas/Event.question.asked" |
| 9622 9616 | }, |
| @@ -9626,6 +9620,21 @@ | |
| 9626 9620 | { |
| 9627 9621 | "$ref": "#/components/schemas/Event.question.rejected" |
| 9628 9622 | }, |
| 9623 | + { |
| 9624 | + "$ref": "#/components/schemas/Event.permission.asked" |
| 9625 | + }, |
| 9626 | + { |
| 9627 | + "$ref": "#/components/schemas/Event.permission.replied" |
| 9628 | + }, |
| 9629 | + { |
| 9630 | + "$ref": "#/components/schemas/Event.file.watcher.updated" |
| 9631 | + }, |
| 9632 | + { |
| 9633 | + "$ref": "#/components/schemas/Event.vcs.branch.updated" |
| 9634 | + }, |
| 9635 | + { |
| 9636 | + "$ref": "#/components/schemas/Event.file.edited" |
| 9637 | + }, |
| 9629 9638 | { |
| 9630 9639 | "$ref": "#/components/schemas/Event.server.connected" |
| 9631 9640 | }, |
| @@ -9638,9 +9647,6 @@ | |
| 9638 9647 | { |
| 9639 9648 | "$ref": "#/components/schemas/Event.lsp.updated" |
| 9640 9649 | }, |
| 9641 | - { |
| 9642 | - "$ref": "#/components/schemas/Event.file.edited" |
| 9643 | - }, |
| 9644 9650 | { |
| 9645 9651 | "$ref": "#/components/schemas/Event.message.updated" |
| 9646 9652 | }, |
| @@ -9665,9 +9671,6 @@ | |
| 9665 9671 | { |
| 9666 9672 | "$ref": "#/components/schemas/Event.session.compacted" |
| 9667 9673 | }, |
| 9668 | - { |
| 9669 | - "$ref": "#/components/schemas/Event.file.watcher.updated" |
| 9670 | - }, |
| 9671 9674 | { |
| 9672 9675 | "$ref": "#/components/schemas/Event.todo.updated" |
| 9673 9676 | }, |
| @@ -9707,9 +9710,6 @@ | |
| 9707 9710 | { |
| 9708 9711 | "$ref": "#/components/schemas/Event.session.error" |
| 9709 9712 | }, |
| 9710 | - { |
| 9711 | - "$ref": "#/components/schemas/Event.vcs.branch.updated" |
| 9712 | - }, |
| 9713 9713 | { |
| 9714 9714 | "$ref": "#/components/schemas/Event.workspace.ready" |
| 9715 9715 | }, |
| @@ -10405,6 +10405,7 @@ | |
| 10405 10405 | } |
| 10406 10406 | }, |
| 10407 10407 | "snapshot": { |
| 10408 | + "description": "Enable or disable snapshot tracking. When false, filesystem snapshots are not recorded and undoing or reverting will not undo/redo file changes. Defaults to true.", |
| 10408 10409 | "type": "boolean" |
| 10409 10410 | }, |
| 10410 10411 | "share": { |