elelem-candle 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: f3fcd3a8180be01201abe414a663c5b8a252339da1d36e439207a39b05717e41
4
+ data.tar.gz: 2a193ea94b8416bf194cd8c9ad2220f47f20523e932112bdc32ce3eb5d89ed90
5
+ SHA512:
6
+ metadata.gz: b4449a10941957181e204ced64ac0f1dbf7eb8188ddd00ef6ed30bcf4bd7374c2df07ce9ce8d06b699f64048eb2f03edfb375c1fd603e3a4ffa87c0379bf398c
7
+ data.tar.gz: f88848df759b28701bd56911a5d8cbd1d43dc2264bb2cf6c27277fd464de3f196f543f4d35f535fa27f02838c8cc86ad23f2c658bea63dcfc2b3d4658e07ffb5
@@ -0,0 +1,34 @@
1
+ As a `user trying elelem-candle`, I `want --model to choose the
2
+ model`, so that `the provider works like the other providers`.
3
+
4
+ # SYNOPSIS
5
+
6
+ Accept `model:` in the provider block, and fall back to the environment.
7
+
8
+ # DESCRIPTION
9
+
10
+ Core passes `--model NAME` to the provider block as `model:`. The
11
+ candle provider block takes no arguments (candle.rb:11), so `--model`
12
+ does nothing and the model comes only from `ELELEM_CANDLE_MODEL`.
13
+
14
+ Accept `model:` the way elelem-llama and elelem-ollama do
15
+ (`do |model: nil, **|`), and fall back to `ELELEM_CANDLE_MODEL`.
16
+ Inference is still a stub (ext/elelem/candle/src/lib.rs:5), so this
17
+ only changes which value reaches it.
18
+
19
+ # SEE ALSO
20
+
21
+ * [ ] lib/elelem/candle.rb:10-18 - provider block
22
+ * [ ] elelem lib/elelem/cli.rb:42 - --model
23
+ * [ ] Formerly elelem-sh/elelem.sh#29
24
+
25
+ # Tasks
26
+
27
+ * [ ] TBD (filled in design mode)
28
+
29
+ # Acceptance Criteria
30
+
31
+ * [ ] `elelem chat -p candle --model X` passes X to the provider
32
+ * [ ] Without `--model`, `ELELEM_CANDLE_MODEL` is used as today
33
+ * [ ] With neither, the error names both ways to set the model
34
+ * [ ] A spec covers each case
@@ -0,0 +1,38 @@
1
+ As a `contributor building elelem-candle`, I `want the extension to
2
+ depend only on crates it uses`, so that `the first build is fast and
3
+ the gem install is light while inference is a stub`.
4
+
5
+ # SYNOPSIS
6
+
7
+ Remove candle-core, candle-nn, candle-transformers, tokenizers and
8
+ hf-hub until inference lands.
9
+
10
+ # DESCRIPTION
11
+
12
+ ext/elelem/candle/Cargo.toml depends on candle-core, candle-nn,
13
+ candle-transformers, tokenizers and hf-hub. src/lib.rs uses none of
14
+ them: it imports only magnus, and the model is a skeleton whose
15
+ generate returns a placeholder (lib.rs:5-15, :49). Every build, and
16
+ every `gem install`, compiles these crates and their dependency trees
17
+ for nothing.
18
+
19
+ Remove them from Cargo.toml and update Cargo.lock. Add them back in the
20
+ story that implements inference, with the comment about CUDA and Metal
21
+ features.
22
+
23
+ # SEE ALSO
24
+
25
+ * [ ] ext/elelem/candle/Cargo.toml - unused dependencies
26
+ * [ ] ext/elelem/candle/src/lib.rs:1-15 - imports and skeleton notes
27
+ * [ ] Cargo.lock
28
+ * [ ] Formerly elelem-sh/elelem.sh#40
29
+
30
+ # Tasks
31
+
32
+ * [ ] TBD (filled in design mode)
33
+
34
+ # Acceptance Criteria
35
+
36
+ * [ ] Cargo.toml lists only crates that src/lib.rs uses
37
+ * [ ] Cargo.lock no longer contains candle-core, tokenizers or hf-hub
38
+ * [ ] bin/compile and bin/test pass
@@ -0,0 +1,67 @@
1
+ As a `person who finds elelem-candle on RubyGems`, I `want the
2
+ gem page to link to the plugin's documentation, backlog and
3
+ changelog`, so that `I can learn how to use it and see known
4
+ problems without GitHub Issues`.
5
+
6
+ # SYNOPSIS
7
+
8
+ Point the gemspec homepage at elelem.sh and add the standard links.
9
+
10
+ # DESCRIPTION
11
+
12
+ RubyGems shows `homepage_uri` and the other `metadata` links on every
13
+ gem page. Today `elelem-candle.gemspec` sets `spec.homepage`
14
+ to the site root (https://elelem.sh) and sets only `homepage_uri`,
15
+ `source_code_uri`, `allowed_push_host` and
16
+ `rubygems_mfa_required`.
17
+ There is no documentation, bug tracker or changelog link.
18
+
19
+ Proposed change:
20
+
21
+ ```ruby
22
+ spec.homepage = "https://elelem.sh/plugins/candle/"
23
+ spec.metadata["homepage_uri"] = spec.homepage
24
+ spec.metadata["source_code_uri"] = "https://github.com/elelem-sh/candle"
25
+ spec.metadata["documentation_uri"] = spec.homepage
26
+ spec.metadata["bug_tracker_uri"] = "https://github.com/elelem-sh/candle/tree/main/.agents/backlog"
27
+ spec.metadata["changelog_uri"] = "https://github.com/elelem-sh/candle/blob/main/CHANGELOG.md"
28
+ ```
29
+
30
+ The original proposal pointed `bug_tracker_uri` at GitHub Issues on
31
+ elelem-sh/elelem.sh, filtered by label. That no longer fits: the
32
+ project is moving its backlog out of GitHub Issues and into
33
+ `.agents/backlog` story files in each repository, so the bug tracker
34
+ link points at this repository's backlog directory instead.
35
+
36
+ elelem.sh has no page for this plugin yet: /plugins/candle/ currently
37
+ redirects to https://github.com/elelem-sh/candle, and /man/candle/ is a 404.
38
+ Either add a page to the site before the release, or accept the
39
+ redirect for now and leave documentation_uri out until a page exists.
40
+
41
+ There is no CHANGELOG.md on main yet. release-please writes one
42
+ on the first release, so ship the link with or after that release.
43
+
44
+ Keep `allowed_push_host` and `rubygems_mfa_required` as they are.
45
+ RubyGems only shows the new links after the next release.
46
+
47
+ # SEE ALSO
48
+
49
+ * [ ] elelem-candle.gemspec:13 - spec.homepage
50
+ * [ ] elelem-candle.gemspec:18 - source_code_uri
51
+ * [ ] .agents/backlog/ - where bug_tracker_uri will point
52
+ * [ ] Formerly elelem-sh/elelem.sh#41
53
+
54
+ # Tasks
55
+
56
+ * [ ] TBD (filled in design mode)
57
+
58
+ # Acceptance Criteria
59
+
60
+ * [ ] `spec.homepage` and `homepage_uri` are https://elelem.sh/plugins/candle/
61
+ * [ ] `bug_tracker_uri` points at this repository's `.agents/backlog`,
62
+ not at GitHub Issues
63
+ * [ ] `changelog_uri` and `source_code_uri` point at this repository
64
+ * [ ] `allowed_push_host` and `rubygems_mfa_required` are unchanged
65
+ * [ ] `gem build` succeeds and `gem spec` on the built gem shows every
66
+ link
67
+ * [ ] Every link resolves (no 404) at release time
@@ -0,0 +1,73 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ permissions: {}
9
+
10
+ concurrency:
11
+ group: release
12
+ cancel-in-progress: false
13
+
14
+ jobs:
15
+ test:
16
+ runs-on: ubuntu-latest
17
+ permissions:
18
+ contents: read
19
+ steps:
20
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
21
+ with:
22
+ persist-credentials: false
23
+ - uses: ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64 # v1.299.0
24
+ with:
25
+ ruby-version: "4.0"
26
+ bundler-cache: true
27
+ - run: bin/test
28
+ - run: bin/lint
29
+
30
+ release-please:
31
+ needs: test
32
+ runs-on: ubuntu-latest
33
+ permissions:
34
+ contents: write
35
+ issues: write
36
+ pull-requests: write
37
+ outputs:
38
+ release_created: ${{ steps.release.outputs.release_created }}
39
+ steps:
40
+ - id: release
41
+ uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
42
+ with:
43
+ config-file: release-please-config.json
44
+ manifest-file: .release-please-manifest.json
45
+
46
+ publish:
47
+ needs: release-please
48
+ if: needs.release-please.outputs.release_created == 'true' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')
49
+ runs-on: ubuntu-latest
50
+ permissions:
51
+ contents: write
52
+ id-token: write
53
+ steps:
54
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
55
+ with:
56
+ persist-credentials: false
57
+ - uses: ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64 # v1.299.0
58
+ with:
59
+ ruby-version: "4.0"
60
+ bundler-cache: true
61
+ - shell: bash
62
+ run: |
63
+ set -euo pipefail
64
+ jwt=$(curl -sS --fail-with-body -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=rubygems.org" | jq -r .value)
65
+ echo "::add-mask::$jwt"
66
+ key=$(jq -n --arg jwt "$jwt" '{jwt: $jwt, owner: "66898"}' | curl -sS --fail-with-body -H "content-type: application/json" -d @- https://rubygems.org/api/v1/oidc/trusted_publisher/exchange_token | jq -r .rubygems_api_key)
67
+ test -n "$key" -a "$key" != null
68
+ echo "::add-mask::$key"
69
+ printf 'GEM_HOST_API_KEY=%s\nBUNDLE_GEM__PUSH_KEY=%s\nRUBYGEMS_API_KEY=%s\n' "$key" "$key" "$key" >> "$GITHUB_ENV"
70
+ - uses: rubygems/release-gem@7f9650160c1a4e7989fdc9855807bdbd421d8b6b # v1.4.1
71
+ with:
72
+ await-release: false
73
+ setup-trusted-publisher: false
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0"
3
+ }
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,62 @@
1
+ AllCops:
2
+ NewCops: enable
3
+ TargetRubyVersion: 4.0
4
+ SuggestExtensions: false
5
+ Exclude:
6
+ - "pkg/**/*"
7
+ - "bin/**/*"
8
+ - "vendor/**/*"
9
+ - "fixtures/**/*"
10
+
11
+ Metrics:
12
+ Enabled: false
13
+
14
+ Naming/PredicateMethod:
15
+ AllowedMethods:
16
+ - call
17
+ - run
18
+ - summarize
19
+ - prompt
20
+
21
+ Naming/MethodParameterName:
22
+ AllowedNames:
23
+ - me
24
+ - id
25
+ - as
26
+ - io
27
+
28
+ Style/GlobalVars:
29
+ Exclude:
30
+ - "spec/**/*"
31
+
32
+ Lint/EmptyBlock:
33
+ Exclude:
34
+ - "spec/**/*"
35
+
36
+ Lint/UselessDefaultValueArgument:
37
+ Enabled: false
38
+
39
+ Lint/RedundantRequireStatement:
40
+ Enabled: false
41
+
42
+ Lint/UnusedBlockArgument:
43
+ IgnoreEmptyBlocks: true
44
+ AllowUnusedKeywordArguments: true
45
+
46
+ Style/Documentation:
47
+ Enabled: false
48
+
49
+ Style/FormatStringToken:
50
+ Enabled: false
51
+
52
+ Style/FrozenStringLiteralComment:
53
+ Enabled: true
54
+
55
+ Style/StringLiterals:
56
+ EnforcedStyle: double_quotes
57
+
58
+ Style/StringLiteralsInInterpolation:
59
+ EnforcedStyle: double_quotes
60
+
61
+ Layout/LineLength:
62
+ Max: 120
data/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 (2026-11-17)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * build the rust extension (magnus RubyMethod2 argument order, block->Proc) ([cee27f1](https://github.com/elelem-sh/candle/commit/cee27f1f59595512dc5dac03da866a930d780ef9))