language-operator 0.1.81 → 0.1.82
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 +4 -4
- data/.claude/agents/README.md +16 -0
- data/.claude/agents/changelog-writer.md +181 -0
- data/.claude/hooks/README.md +43 -0
- data/.claude/hooks/node_modules/.bin/esbuild +1 -0
- data/.claude/hooks/node_modules/.bin/tsc +1 -0
- data/.claude/hooks/node_modules/.bin/tsserver +1 -0
- data/.claude/hooks/node_modules/.bin/tsx +1 -0
- data/.claude/hooks/node_modules/.package-lock.json +136 -0
- data/.claude/hooks/node_modules/@esbuild/linux-x64/README.md +3 -0
- data/.claude/hooks/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
- data/.claude/hooks/node_modules/@esbuild/linux-x64/package.json +20 -0
- data/.claude/hooks/node_modules/@types/node/LICENSE +21 -0
- data/.claude/hooks/node_modules/@types/node/README.md +15 -0
- data/.claude/hooks/node_modules/@types/node/assert/strict.d.ts +105 -0
- data/.claude/hooks/node_modules/@types/node/assert.d.ts +955 -0
- data/.claude/hooks/node_modules/@types/node/async_hooks.d.ts +623 -0
- data/.claude/hooks/node_modules/@types/node/buffer.buffer.d.ts +466 -0
- data/.claude/hooks/node_modules/@types/node/buffer.d.ts +1810 -0
- data/.claude/hooks/node_modules/@types/node/child_process.d.ts +1428 -0
- data/.claude/hooks/node_modules/@types/node/cluster.d.ts +486 -0
- data/.claude/hooks/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- data/.claude/hooks/node_modules/@types/node/console.d.ts +151 -0
- data/.claude/hooks/node_modules/@types/node/constants.d.ts +20 -0
- data/.claude/hooks/node_modules/@types/node/crypto.d.ts +4065 -0
- data/.claude/hooks/node_modules/@types/node/dgram.d.ts +564 -0
- data/.claude/hooks/node_modules/@types/node/diagnostics_channel.d.ts +576 -0
- data/.claude/hooks/node_modules/@types/node/dns/promises.d.ts +503 -0
- data/.claude/hooks/node_modules/@types/node/dns.d.ts +922 -0
- data/.claude/hooks/node_modules/@types/node/domain.d.ts +166 -0
- data/.claude/hooks/node_modules/@types/node/events.d.ts +1054 -0
- data/.claude/hooks/node_modules/@types/node/fs/promises.d.ts +1316 -0
- data/.claude/hooks/node_modules/@types/node/fs.d.ts +4676 -0
- data/.claude/hooks/node_modules/@types/node/globals.d.ts +150 -0
- data/.claude/hooks/node_modules/@types/node/globals.typedarray.d.ts +101 -0
- data/.claude/hooks/node_modules/@types/node/http.d.ts +2143 -0
- data/.claude/hooks/node_modules/@types/node/http2.d.ts +2480 -0
- data/.claude/hooks/node_modules/@types/node/https.d.ts +399 -0
- data/.claude/hooks/node_modules/@types/node/index.d.ts +115 -0
- data/.claude/hooks/node_modules/@types/node/inspector/promises.d.ts +41 -0
- data/.claude/hooks/node_modules/@types/node/inspector.d.ts +224 -0
- data/.claude/hooks/node_modules/@types/node/inspector.generated.d.ts +4226 -0
- data/.claude/hooks/node_modules/@types/node/module.d.ts +819 -0
- data/.claude/hooks/node_modules/@types/node/net.d.ts +933 -0
- data/.claude/hooks/node_modules/@types/node/os.d.ts +507 -0
- data/.claude/hooks/node_modules/@types/node/package.json +155 -0
- data/.claude/hooks/node_modules/@types/node/path/posix.d.ts +8 -0
- data/.claude/hooks/node_modules/@types/node/path/win32.d.ts +8 -0
- data/.claude/hooks/node_modules/@types/node/path.d.ts +187 -0
- data/.claude/hooks/node_modules/@types/node/perf_hooks.d.ts +621 -0
- data/.claude/hooks/node_modules/@types/node/process.d.ts +2097 -0
- data/.claude/hooks/node_modules/@types/node/punycode.d.ts +117 -0
- data/.claude/hooks/node_modules/@types/node/querystring.d.ts +152 -0
- data/.claude/hooks/node_modules/@types/node/quic.d.ts +910 -0
- data/.claude/hooks/node_modules/@types/node/readline/promises.d.ts +161 -0
- data/.claude/hooks/node_modules/@types/node/readline.d.ts +541 -0
- data/.claude/hooks/node_modules/@types/node/repl.d.ts +415 -0
- data/.claude/hooks/node_modules/@types/node/sea.d.ts +162 -0
- data/.claude/hooks/node_modules/@types/node/sqlite.d.ts +937 -0
- data/.claude/hooks/node_modules/@types/node/stream/consumers.d.ts +38 -0
- data/.claude/hooks/node_modules/@types/node/stream/promises.d.ts +211 -0
- data/.claude/hooks/node_modules/@types/node/stream/web.d.ts +296 -0
- data/.claude/hooks/node_modules/@types/node/stream.d.ts +1760 -0
- data/.claude/hooks/node_modules/@types/node/string_decoder.d.ts +67 -0
- data/.claude/hooks/node_modules/@types/node/test/reporters.d.ts +96 -0
- data/.claude/hooks/node_modules/@types/node/test.d.ts +2239 -0
- data/.claude/hooks/node_modules/@types/node/timers/promises.d.ts +108 -0
- data/.claude/hooks/node_modules/@types/node/timers.d.ts +159 -0
- data/.claude/hooks/node_modules/@types/node/tls.d.ts +1194 -0
- data/.claude/hooks/node_modules/@types/node/trace_events.d.ts +197 -0
- data/.claude/hooks/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +462 -0
- data/.claude/hooks/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- data/.claude/hooks/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
- data/.claude/hooks/node_modules/@types/node/ts5.6/index.d.ts +117 -0
- data/.claude/hooks/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- data/.claude/hooks/node_modules/@types/node/ts5.7/index.d.ts +117 -0
- data/.claude/hooks/node_modules/@types/node/tty.d.ts +250 -0
- data/.claude/hooks/node_modules/@types/node/url.d.ts +519 -0
- data/.claude/hooks/node_modules/@types/node/util/types.d.ts +558 -0
- data/.claude/hooks/node_modules/@types/node/util.d.ts +1653 -0
- data/.claude/hooks/node_modules/@types/node/v8.d.ts +979 -0
- data/.claude/hooks/node_modules/@types/node/vm.d.ts +1180 -0
- data/.claude/hooks/node_modules/@types/node/wasi.d.ts +202 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/abortcontroller.d.ts +59 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/console.d.ts +9 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/events.d.ts +106 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/fetch.d.ts +54 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/streams.d.ts +115 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/url.d.ts +24 -0
- data/.claude/hooks/node_modules/@types/node/worker_threads.d.ts +714 -0
- data/.claude/hooks/node_modules/@types/node/zlib.d.ts +618 -0
- data/.claude/hooks/node_modules/esbuild/LICENSE.md +21 -0
- data/.claude/hooks/node_modules/esbuild/README.md +3 -0
- data/.claude/hooks/node_modules/esbuild/bin/esbuild +0 -0
- data/.claude/hooks/node_modules/esbuild/install.js +289 -0
- data/.claude/hooks/node_modules/esbuild/lib/main.d.ts +716 -0
- data/.claude/hooks/node_modules/esbuild/lib/main.js +2242 -0
- data/.claude/hooks/node_modules/esbuild/package.json +49 -0
- data/.claude/hooks/node_modules/get-tsconfig/LICENSE +21 -0
- data/.claude/hooks/node_modules/get-tsconfig/README.md +235 -0
- data/.claude/hooks/node_modules/get-tsconfig/dist/index.cjs +7 -0
- data/.claude/hooks/node_modules/get-tsconfig/dist/index.d.cts +2088 -0
- data/.claude/hooks/node_modules/get-tsconfig/dist/index.d.mts +2088 -0
- data/.claude/hooks/node_modules/get-tsconfig/dist/index.mjs +7 -0
- data/.claude/hooks/node_modules/get-tsconfig/package.json +46 -0
- data/.claude/hooks/node_modules/resolve-pkg-maps/LICENSE +21 -0
- data/.claude/hooks/node_modules/resolve-pkg-maps/README.md +216 -0
- data/.claude/hooks/node_modules/resolve-pkg-maps/dist/index.cjs +1 -0
- data/.claude/hooks/node_modules/resolve-pkg-maps/dist/index.d.cts +11 -0
- data/.claude/hooks/node_modules/resolve-pkg-maps/dist/index.d.mts +11 -0
- data/.claude/hooks/node_modules/resolve-pkg-maps/dist/index.mjs +1 -0
- data/.claude/hooks/node_modules/resolve-pkg-maps/package.json +42 -0
- data/.claude/hooks/node_modules/tsx/LICENSE +21 -0
- data/.claude/hooks/node_modules/tsx/README.md +32 -0
- data/.claude/hooks/node_modules/tsx/dist/cjs/api/index.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/cjs/api/index.d.cts +35 -0
- data/.claude/hooks/node_modules/tsx/dist/cjs/api/index.d.mts +35 -0
- data/.claude/hooks/node_modules/tsx/dist/cjs/api/index.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/cjs/index.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/cjs/index.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/cli.cjs +54 -0
- data/.claude/hooks/node_modules/tsx/dist/cli.mjs +55 -0
- data/.claude/hooks/node_modules/tsx/dist/client-BQVF1NaW.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/client-D6NvIMSC.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/esm/api/index.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/esm/api/index.d.cts +35 -0
- data/.claude/hooks/node_modules/tsx/dist/esm/api/index.d.mts +35 -0
- data/.claude/hooks/node_modules/tsx/dist/esm/api/index.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/esm/index.cjs +2 -0
- data/.claude/hooks/node_modules/tsx/dist/esm/index.mjs +2 -0
- data/.claude/hooks/node_modules/tsx/dist/get-pipe-path-BHW2eJdv.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/get-pipe-path-BoR10qr8.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/index-7AaEi15b.mjs +14 -0
- data/.claude/hooks/node_modules/tsx/dist/index-BWFBUo6r.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/index-gbaejti9.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/index-gckBtVBf.cjs +14 -0
- data/.claude/hooks/node_modules/tsx/dist/lexer-DQCqS3nf.mjs +3 -0
- data/.claude/hooks/node_modules/tsx/dist/lexer-DgIbo0BU.cjs +3 -0
- data/.claude/hooks/node_modules/tsx/dist/loader.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/loader.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/node-features-_8ZFwP_x.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/node-features-roYmp9jK.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/package-CeBgXWuR.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/package-Dxt5kIHw.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/patch-repl.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/patch-repl.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/preflight.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/preflight.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/register-2sWVXuRQ.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/register-B7jrtLTO.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/register-CFH5oNdT.mjs +4 -0
- data/.claude/hooks/node_modules/tsx/dist/register-D46fvsV_.cjs +4 -0
- data/.claude/hooks/node_modules/tsx/dist/repl.cjs +3 -0
- data/.claude/hooks/node_modules/tsx/dist/repl.mjs +3 -0
- data/.claude/hooks/node_modules/tsx/dist/require-D4F1Lv60.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/require-DQxpCAr4.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/suppress-warnings.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/suppress-warnings.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/temporary-directory-B83uKxJF.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/temporary-directory-CwHp0_NW.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/types-Cxp8y2TL.d.ts +5 -0
- data/.claude/hooks/node_modules/tsx/package.json +68 -0
- data/.claude/hooks/node_modules/typescript/LICENSE.txt +55 -0
- data/.claude/hooks/node_modules/typescript/README.md +50 -0
- data/.claude/hooks/node_modules/typescript/SECURITY.md +41 -0
- data/.claude/hooks/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
- data/.claude/hooks/node_modules/typescript/bin/tsc +2 -0
- data/.claude/hooks/node_modules/typescript/bin/tsserver +2 -0
- data/.claude/hooks/node_modules/typescript/lib/_tsc.js +133818 -0
- data/.claude/hooks/node_modules/typescript/lib/_tsserver.js +659 -0
- data/.claude/hooks/node_modules/typescript/lib/_typingsInstaller.js +222 -0
- data/.claude/hooks/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.d.ts +22 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.decorators.d.ts +384 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +41 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.dom.d.ts +39429 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.dom.iterable.d.ts +571 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.iterable.d.ts +605 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +21 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2017.d.ts +26 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +53 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.bigint.d.ts +765 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +99 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.string.d.ts +44 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2021.weakref.d.ts +78 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2022.d.ts +25 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2022.error.d.ts +75 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2022.intl.d.ts +145 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +65 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2024.collection.d.ts +29 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2024.d.ts +26 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2024.full.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2024.object.d.ts +29 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2024.promise.d.ts +35 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2024.regexp.d.ts +25 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +68 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2024.string.d.ts +29 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es5.d.ts +4601 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es6.d.ts +23 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.collection.d.ts +96 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.d.ts +29 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.disposable.d.ts +193 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.error.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.float16.d.ts +445 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.iterator.d.ts +148 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.promise.d.ts +34 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +25 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +41 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.webworker.d.ts +13150 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.webworker.iterable.d.ts +340 -0
- data/.claude/hooks/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/tsc.js +8 -0
- data/.claude/hooks/node_modules/typescript/lib/tsserver.js +8 -0
- data/.claude/hooks/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
- data/.claude/hooks/node_modules/typescript/lib/tsserverlibrary.js +21 -0
- data/.claude/hooks/node_modules/typescript/lib/typesMap.json +497 -0
- data/.claude/hooks/node_modules/typescript/lib/typescript.d.ts +11437 -0
- data/.claude/hooks/node_modules/typescript/lib/typescript.js +200276 -0
- data/.claude/hooks/node_modules/typescript/lib/typingsInstaller.js +8 -0
- data/.claude/hooks/node_modules/typescript/lib/watchGuard.js +53 -0
- data/.claude/hooks/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/package.json +120 -0
- data/.claude/hooks/node_modules/undici-types/LICENSE +21 -0
- data/.claude/hooks/node_modules/undici-types/README.md +6 -0
- data/.claude/hooks/node_modules/undici-types/agent.d.ts +32 -0
- data/.claude/hooks/node_modules/undici-types/api.d.ts +43 -0
- data/.claude/hooks/node_modules/undici-types/balanced-pool.d.ts +29 -0
- data/.claude/hooks/node_modules/undici-types/cache-interceptor.d.ts +172 -0
- data/.claude/hooks/node_modules/undici-types/cache.d.ts +36 -0
- data/.claude/hooks/node_modules/undici-types/client-stats.d.ts +15 -0
- data/.claude/hooks/node_modules/undici-types/client.d.ts +108 -0
- data/.claude/hooks/node_modules/undici-types/connector.d.ts +34 -0
- data/.claude/hooks/node_modules/undici-types/content-type.d.ts +21 -0
- data/.claude/hooks/node_modules/undici-types/cookies.d.ts +30 -0
- data/.claude/hooks/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
- data/.claude/hooks/node_modules/undici-types/dispatcher.d.ts +276 -0
- data/.claude/hooks/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
- data/.claude/hooks/node_modules/undici-types/errors.d.ts +161 -0
- data/.claude/hooks/node_modules/undici-types/eventsource.d.ts +66 -0
- data/.claude/hooks/node_modules/undici-types/fetch.d.ts +211 -0
- data/.claude/hooks/node_modules/undici-types/formdata.d.ts +108 -0
- data/.claude/hooks/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- data/.claude/hooks/node_modules/undici-types/global-origin.d.ts +7 -0
- data/.claude/hooks/node_modules/undici-types/h2c-client.d.ts +73 -0
- data/.claude/hooks/node_modules/undici-types/handlers.d.ts +15 -0
- data/.claude/hooks/node_modules/undici-types/header.d.ts +160 -0
- data/.claude/hooks/node_modules/undici-types/index.d.ts +80 -0
- data/.claude/hooks/node_modules/undici-types/interceptors.d.ts +39 -0
- data/.claude/hooks/node_modules/undici-types/mock-agent.d.ts +68 -0
- data/.claude/hooks/node_modules/undici-types/mock-call-history.d.ts +111 -0
- data/.claude/hooks/node_modules/undici-types/mock-client.d.ts +27 -0
- data/.claude/hooks/node_modules/undici-types/mock-errors.d.ts +12 -0
- data/.claude/hooks/node_modules/undici-types/mock-interceptor.d.ts +94 -0
- data/.claude/hooks/node_modules/undici-types/mock-pool.d.ts +27 -0
- data/.claude/hooks/node_modules/undici-types/package.json +55 -0
- data/.claude/hooks/node_modules/undici-types/patch.d.ts +29 -0
- data/.claude/hooks/node_modules/undici-types/pool-stats.d.ts +19 -0
- data/.claude/hooks/node_modules/undici-types/pool.d.ts +41 -0
- data/.claude/hooks/node_modules/undici-types/proxy-agent.d.ts +29 -0
- data/.claude/hooks/node_modules/undici-types/readable.d.ts +68 -0
- data/.claude/hooks/node_modules/undici-types/retry-agent.d.ts +8 -0
- data/.claude/hooks/node_modules/undici-types/retry-handler.d.ts +125 -0
- data/.claude/hooks/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- data/.claude/hooks/node_modules/undici-types/util.d.ts +18 -0
- data/.claude/hooks/node_modules/undici-types/utility.d.ts +7 -0
- data/.claude/hooks/node_modules/undici-types/webidl.d.ts +341 -0
- data/.claude/hooks/node_modules/undici-types/websocket.d.ts +186 -0
- data/.claude/hooks/package-lock.json +562 -0
- data/.claude/hooks/package.json +19 -0
- data/.claude/hooks/skill-activation-prompt.sh +11 -0
- data/.claude/hooks/skill-activation-prompt.ts +185 -0
- data/.claude/hooks/tsconfig.json +12 -0
- data/.claude/settings.json +33 -0
- data/.claude/skills/README.md +29 -0
- data/.claude/skills/ruby-gem-development/SKILL.md +293 -0
- data/.claude/skills/skill-rules.json +117 -0
- data/.claude/skills/thor-cli-development/SKILL.md +431 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +3 -1
- data/completions/{_aictl → _langop} +37 -37
- data/completions/{aictl.bash → langop.bash} +16 -16
- data/completions/langop.fish +114 -0
- data/components/agent/Gemfile +1 -1
- data/components/tool/Gemfile +1 -1
- data/docs/README.md +10 -10
- data/docs/agent-internals.md +1 -1
- data/docs/cheat-sheet.md +76 -76
- data/docs/cli-reference.md +71 -71
- data/docs/how-agents-work.md +1 -1
- data/docs/installation.md +30 -30
- data/docs/quickstart.md +30 -30
- data/docs/using-tools.md +11 -11
- data/docs/webhooks.md +6 -6
- data/examples/ux_helpers_demo.rb +4 -4
- data/lib/language_operator/agent/task_executor.rb +0 -37
- data/lib/language_operator/agent/web_server.rb +311 -323
- data/lib/language_operator/cli/commands/agent/base.rb +16 -15
- data/lib/language_operator/cli/commands/agent/code_operations.rb +6 -6
- data/lib/language_operator/cli/commands/agent/helpers/synthesis_watcher.rb +1 -1
- data/lib/language_operator/cli/commands/agent/lifecycle.rb +2 -2
- data/lib/language_operator/cli/commands/agent/logs.rb +2 -2
- data/lib/language_operator/cli/commands/agent/workspace.rb +8 -8
- data/lib/language_operator/cli/commands/cluster.rb +172 -158
- data/lib/language_operator/cli/commands/install.rb +878 -81
- data/lib/language_operator/cli/commands/model/base.rb +7 -6
- data/lib/language_operator/cli/commands/organization.rb +61 -0
- data/lib/language_operator/cli/commands/persona.rb +10 -8
- data/lib/language_operator/cli/commands/status.rb +83 -13
- data/lib/language_operator/cli/commands/system/exec.rb +10 -10
- data/lib/language_operator/cli/commands/system/schema.rb +6 -6
- data/lib/language_operator/cli/commands/system/synthesis_template.rb +6 -6
- data/lib/language_operator/cli/commands/system/synthesize.rb +14 -14
- data/lib/language_operator/cli/commands/system/validate_template.rb +4 -4
- data/lib/language_operator/cli/commands/tool/base.rb +1 -1
- data/lib/language_operator/cli/commands/tool/install.rb +2 -2
- data/lib/language_operator/cli/commands/tool/search.rb +3 -3
- data/lib/language_operator/cli/commands/ui.rb +173 -0
- data/lib/language_operator/cli/commands/use.rb +80 -9
- data/lib/language_operator/cli/errors/suggestions.rb +21 -21
- data/lib/language_operator/cli/formatters/progress_formatter.rb +2 -1
- data/lib/language_operator/cli/formatters/table_formatter.rb +21 -1
- data/lib/language_operator/cli/helpers/cluster_validator.rb +2 -2
- data/lib/language_operator/cli/helpers/health_checker.rb +263 -0
- data/lib/language_operator/cli/helpers/kubeconfig_validator.rb +3 -3
- data/lib/language_operator/cli/helpers/ux_helper.rb +4 -3
- data/lib/language_operator/cli/main.rb +30 -21
- data/lib/language_operator/cli/wizards/model_wizard.rb +7 -5
- data/lib/language_operator/config/cluster_config.rb +3 -3
- data/lib/language_operator/constants/kubernetes_labels.rb +1 -1
- data/lib/language_operator/kubernetes/client.rb +53 -109
- data/lib/language_operator/kubernetes/resource_builder.rb +46 -14
- data/lib/language_operator/templates/schema/agent_dsl_openapi.yaml +1 -1
- data/lib/language_operator/templates/schema/agent_dsl_schema.json +1 -1
- data/lib/language_operator/utils/org_context.rb +100 -0
- data/lib/language_operator/version.rb +1 -1
- data/synth/001/Makefile +1 -1
- data/synth/002/Makefile +1 -1
- data/synth/003/Makefile +1 -1
- data/synth/004/Makefile +1 -1
- metadata +384 -11
- data/completions/aictl.fish +0 -114
- data/lib/language_operator/agent/event_config.rb +0 -172
- data/lib/language_operator/cli/commands/quickstart.rb +0 -22
- data/lib/language_operator/cli/wizards/quickstart_wizard.rb +0 -561
- /data/bin/{aictl → langop} +0 -0
|
@@ -1,561 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'k8s-ruby'
|
|
4
|
-
require_relative '../formatters/progress_formatter'
|
|
5
|
-
require_relative '../helpers/ux_helper'
|
|
6
|
-
require_relative '../../config/cluster_config'
|
|
7
|
-
require_relative '../../kubernetes/client'
|
|
8
|
-
require_relative '../../kubernetes/resource_builder'
|
|
9
|
-
require_relative '../../utils/secure_path'
|
|
10
|
-
|
|
11
|
-
module LanguageOperator
|
|
12
|
-
module CLI
|
|
13
|
-
module Wizards
|
|
14
|
-
# Interactive quickstart wizard for first-time setup
|
|
15
|
-
class QuickstartWizard
|
|
16
|
-
include Helpers::UxHelper
|
|
17
|
-
|
|
18
|
-
def initialize
|
|
19
|
-
# UxHelper provides pastel and prompt methods
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def run
|
|
23
|
-
show_welcome
|
|
24
|
-
|
|
25
|
-
# Step 1: Cluster setup
|
|
26
|
-
cluster_info = setup_cluster
|
|
27
|
-
return unless cluster_info
|
|
28
|
-
|
|
29
|
-
# Step 2: Model configuration
|
|
30
|
-
model_info = configure_model(cluster_info)
|
|
31
|
-
return unless model_info
|
|
32
|
-
|
|
33
|
-
# Step 3: Example agent
|
|
34
|
-
agent_created = create_example_agent(cluster_info, model_info)
|
|
35
|
-
|
|
36
|
-
# Show next steps
|
|
37
|
-
show_next_steps(agent_created: agent_created)
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
private
|
|
41
|
-
|
|
42
|
-
def show_welcome
|
|
43
|
-
logo(title: 'cluster setup quick start')
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
def setup_cluster
|
|
47
|
-
# Check if user has kubectl configured
|
|
48
|
-
has_kubectl = prompt.yes?('Do you have kubectl configured?')
|
|
49
|
-
|
|
50
|
-
unless has_kubectl
|
|
51
|
-
show_kubernetes_setup_guide
|
|
52
|
-
return nil
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
# Get available contexts
|
|
56
|
-
contexts = get_kubectl_contexts
|
|
57
|
-
|
|
58
|
-
if contexts.empty?
|
|
59
|
-
Formatters::ProgressFormatter.error('No kubectl contexts found')
|
|
60
|
-
puts
|
|
61
|
-
puts 'Configure kubectl first, then run quickstart again.'
|
|
62
|
-
return nil
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
puts
|
|
66
|
-
puts 'Great! I found these contexts in your kubeconfig:'
|
|
67
|
-
puts
|
|
68
|
-
|
|
69
|
-
# Let user select context
|
|
70
|
-
context = prompt.select('Which context should we use?', contexts)
|
|
71
|
-
|
|
72
|
-
# Generate cluster name
|
|
73
|
-
cluster_name = prompt.ask('Name for this cluster:', default: 'my-cluster') do |q|
|
|
74
|
-
q.required true
|
|
75
|
-
q.validate(/^[a-z0-9-]+$/, 'Name must be lowercase alphanumeric with hyphens')
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
# Create cluster configuration
|
|
79
|
-
create_cluster_config(cluster_name, context)
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
def get_kubectl_contexts
|
|
83
|
-
kubeconfig_path = ENV.fetch('KUBECONFIG', LanguageOperator::Utils::SecurePath.expand_home_path('.kube/config'))
|
|
84
|
-
|
|
85
|
-
return [] unless File.exist?(kubeconfig_path)
|
|
86
|
-
|
|
87
|
-
config = K8s::Config.load_file(kubeconfig_path)
|
|
88
|
-
config.contexts.map(&:name)
|
|
89
|
-
rescue StandardError => e
|
|
90
|
-
Formatters::ProgressFormatter.error("Failed to load kubeconfig: #{e.message}")
|
|
91
|
-
[]
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
def create_cluster_config(name, context)
|
|
95
|
-
kubeconfig_path = ENV.fetch('KUBECONFIG', LanguageOperator::Utils::SecurePath.expand_home_path('.kube/config'))
|
|
96
|
-
|
|
97
|
-
Formatters::ProgressFormatter.with_spinner("Creating cluster '#{name}'") do
|
|
98
|
-
# Create Kubernetes client to verify connection
|
|
99
|
-
k8s = Kubernetes::Client.new(kubeconfig: kubeconfig_path, context: context)
|
|
100
|
-
|
|
101
|
-
# Get namespace from context or use default
|
|
102
|
-
namespace = k8s.current_namespace || 'default'
|
|
103
|
-
|
|
104
|
-
# Check if operator is installed
|
|
105
|
-
unless k8s.operator_installed?
|
|
106
|
-
puts
|
|
107
|
-
Formatters::ProgressFormatter.warn('Language Operator not found in cluster')
|
|
108
|
-
puts
|
|
109
|
-
puts 'The operator needs to be installed first.'
|
|
110
|
-
puts 'Install with:'
|
|
111
|
-
puts ' aictl install'
|
|
112
|
-
puts
|
|
113
|
-
exit 1
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
# Save cluster config
|
|
117
|
-
Config::ClusterConfig.add_cluster(name, namespace, kubeconfig_path, context)
|
|
118
|
-
Config::ClusterConfig.set_current_cluster(name)
|
|
119
|
-
|
|
120
|
-
{ name: name, namespace: namespace, kubeconfig: kubeconfig_path, context: context, k8s: k8s }
|
|
121
|
-
end
|
|
122
|
-
rescue StandardError => e
|
|
123
|
-
puts
|
|
124
|
-
Formatters::ProgressFormatter.error("Failed to connect: #{e.message}")
|
|
125
|
-
nil
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
def show_kubernetes_setup_guide
|
|
129
|
-
puts
|
|
130
|
-
puts pastel.yellow('Kubernetes Setup Required')
|
|
131
|
-
puts
|
|
132
|
-
puts 'Language Operator needs a Kubernetes cluster to run.'
|
|
133
|
-
puts
|
|
134
|
-
puts 'Quick options:'
|
|
135
|
-
puts
|
|
136
|
-
puts ' 1. Docker Desktop (easiest for local development)'
|
|
137
|
-
puts ' • Enable Kubernetes in Docker Desktop settings'
|
|
138
|
-
puts ' • kubectl will be configured automatically'
|
|
139
|
-
puts
|
|
140
|
-
puts ' 2. Minikube (lightweight local cluster)'
|
|
141
|
-
puts ' • Install: brew install minikube'
|
|
142
|
-
puts ' • Start: minikube start'
|
|
143
|
-
puts
|
|
144
|
-
puts ' 3. Kind (Kubernetes in Docker)'
|
|
145
|
-
puts ' • Install: brew install kind'
|
|
146
|
-
puts ' • Create cluster: kind create cluster'
|
|
147
|
-
puts
|
|
148
|
-
puts 'After setting up kubectl, run quickstart again:'
|
|
149
|
-
puts ' aictl quickstart'
|
|
150
|
-
puts
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
def configure_model(cluster_info)
|
|
154
|
-
puts
|
|
155
|
-
puts '─' * 50
|
|
156
|
-
puts pastel.cyan('Step 2/3: Configure Language Model')
|
|
157
|
-
puts '─' * 50
|
|
158
|
-
puts
|
|
159
|
-
puts 'Agents need an LLM to understand instructions.'
|
|
160
|
-
puts
|
|
161
|
-
|
|
162
|
-
# Provider selection
|
|
163
|
-
provider = prompt.select('Which provider do you want to use?') do |menu|
|
|
164
|
-
menu.choice 'Anthropic (Claude)', :anthropic
|
|
165
|
-
menu.choice 'OpenAI (GPT-4)', :openai
|
|
166
|
-
menu.choice 'Local model (Ollama)', :ollama
|
|
167
|
-
menu.choice 'Other', :other
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
case provider
|
|
171
|
-
when :anthropic
|
|
172
|
-
setup_anthropic_model(cluster_info)
|
|
173
|
-
when :openai
|
|
174
|
-
setup_openai_model(cluster_info)
|
|
175
|
-
when :ollama
|
|
176
|
-
setup_ollama_model(cluster_info)
|
|
177
|
-
when :other
|
|
178
|
-
setup_custom_model(cluster_info)
|
|
179
|
-
end
|
|
180
|
-
end
|
|
181
|
-
|
|
182
|
-
def setup_anthropic_model(cluster_info)
|
|
183
|
-
puts
|
|
184
|
-
has_key = prompt.yes?('Do you have an Anthropic API key?')
|
|
185
|
-
|
|
186
|
-
unless has_key
|
|
187
|
-
puts
|
|
188
|
-
puts "Get an API key at: #{pastel.cyan('https://console.anthropic.com')}"
|
|
189
|
-
puts
|
|
190
|
-
puts pastel.dim('Press Enter when you have your key...')
|
|
191
|
-
$stdin.gets
|
|
192
|
-
end
|
|
193
|
-
|
|
194
|
-
puts
|
|
195
|
-
api_key = prompt.mask('Enter your Anthropic API key:')
|
|
196
|
-
|
|
197
|
-
# Test connection
|
|
198
|
-
test_result = Formatters::ProgressFormatter.with_spinner('Testing connection') do
|
|
199
|
-
test_anthropic_connection(api_key)
|
|
200
|
-
end
|
|
201
|
-
|
|
202
|
-
unless test_result[:success]
|
|
203
|
-
Formatters::ProgressFormatter.error("Connection failed: #{test_result[:error]}")
|
|
204
|
-
return nil
|
|
205
|
-
end
|
|
206
|
-
|
|
207
|
-
# Create model resource
|
|
208
|
-
model_name = 'claude'
|
|
209
|
-
model_id = 'claude-3-5-sonnet-20241022'
|
|
210
|
-
|
|
211
|
-
create_model_resource(cluster_info, model_name, 'anthropic', model_id, api_key)
|
|
212
|
-
|
|
213
|
-
{ name: model_name, provider: 'anthropic', model: model_id }
|
|
214
|
-
end
|
|
215
|
-
|
|
216
|
-
def setup_openai_model(cluster_info)
|
|
217
|
-
puts
|
|
218
|
-
has_key = prompt.yes?('Do you have an OpenAI API key?')
|
|
219
|
-
|
|
220
|
-
unless has_key
|
|
221
|
-
puts
|
|
222
|
-
puts "Get an API key at: #{pastel.cyan('https://platform.openai.com/api-keys')}"
|
|
223
|
-
puts
|
|
224
|
-
puts pastel.dim('Press Enter when you have your key...')
|
|
225
|
-
$stdin.gets
|
|
226
|
-
end
|
|
227
|
-
|
|
228
|
-
puts
|
|
229
|
-
api_key = prompt.mask('Enter your OpenAI API key:')
|
|
230
|
-
|
|
231
|
-
# Test connection
|
|
232
|
-
test_result = Formatters::ProgressFormatter.with_spinner('Testing connection') do
|
|
233
|
-
test_openai_connection(api_key)
|
|
234
|
-
end
|
|
235
|
-
|
|
236
|
-
unless test_result[:success]
|
|
237
|
-
Formatters::ProgressFormatter.error("Connection failed: #{test_result[:error]}")
|
|
238
|
-
return nil
|
|
239
|
-
end
|
|
240
|
-
|
|
241
|
-
# Create model resource
|
|
242
|
-
model_name = 'gpt4'
|
|
243
|
-
model_id = 'gpt-4-turbo'
|
|
244
|
-
|
|
245
|
-
create_model_resource(cluster_info, model_name, 'openai', model_id, api_key)
|
|
246
|
-
|
|
247
|
-
{ name: model_name, provider: 'openai', model: model_id }
|
|
248
|
-
end
|
|
249
|
-
|
|
250
|
-
def setup_ollama_model(cluster_info)
|
|
251
|
-
puts
|
|
252
|
-
puts 'Ollama runs LLMs locally on your machine.'
|
|
253
|
-
puts
|
|
254
|
-
|
|
255
|
-
endpoint = prompt.ask('Ollama endpoint:', default: 'http://localhost:11434')
|
|
256
|
-
model_id = prompt.ask('Model name:', default: 'llama3')
|
|
257
|
-
|
|
258
|
-
# Test connection
|
|
259
|
-
test_result = Formatters::ProgressFormatter.with_spinner('Testing connection') do
|
|
260
|
-
test_ollama_connection(endpoint, model_id)
|
|
261
|
-
end
|
|
262
|
-
|
|
263
|
-
unless test_result[:success]
|
|
264
|
-
Formatters::ProgressFormatter.error("Connection failed: #{test_result[:error]}")
|
|
265
|
-
puts
|
|
266
|
-
puts 'Make sure Ollama is running and the model is pulled:'
|
|
267
|
-
puts " ollama pull #{model_id}"
|
|
268
|
-
return nil
|
|
269
|
-
end
|
|
270
|
-
|
|
271
|
-
# Create model resource
|
|
272
|
-
model_name = 'local'
|
|
273
|
-
|
|
274
|
-
create_model_resource(cluster_info, model_name, 'openai-compatible', model_id, nil, endpoint)
|
|
275
|
-
|
|
276
|
-
{ name: model_name, provider: 'ollama', model: model_id }
|
|
277
|
-
end
|
|
278
|
-
|
|
279
|
-
def setup_custom_model(cluster_info)
|
|
280
|
-
puts
|
|
281
|
-
puts 'Configure a custom OpenAI-compatible endpoint.'
|
|
282
|
-
puts
|
|
283
|
-
|
|
284
|
-
endpoint = prompt.ask('API endpoint URL:') do |q|
|
|
285
|
-
q.required true
|
|
286
|
-
q.validate(%r{^https?://})
|
|
287
|
-
q.messages[:valid?] = 'Must be a valid HTTP(S) URL'
|
|
288
|
-
end
|
|
289
|
-
|
|
290
|
-
requires_auth = prompt.yes?('Does this endpoint require authentication?')
|
|
291
|
-
|
|
292
|
-
api_key = nil
|
|
293
|
-
api_key = prompt.mask('Enter API key:') if requires_auth
|
|
294
|
-
|
|
295
|
-
# Try to fetch available models from the endpoint
|
|
296
|
-
puts
|
|
297
|
-
available_models = fetch_available_models(endpoint, api_key)
|
|
298
|
-
|
|
299
|
-
model_id = if available_models && !available_models.empty?
|
|
300
|
-
prompt.select('Select a model:', available_models, per_page: 10)
|
|
301
|
-
else
|
|
302
|
-
prompt.ask('Model identifier:') do |q|
|
|
303
|
-
q.required true
|
|
304
|
-
end
|
|
305
|
-
end
|
|
306
|
-
|
|
307
|
-
puts
|
|
308
|
-
Formatters::ProgressFormatter.info('Skipping connection test for custom endpoint')
|
|
309
|
-
|
|
310
|
-
# Create model resource
|
|
311
|
-
model_name = 'custom'
|
|
312
|
-
|
|
313
|
-
create_model_resource(cluster_info, model_name, 'openai-compatible', model_id, api_key, endpoint)
|
|
314
|
-
|
|
315
|
-
{ name: model_name, provider: 'custom', model: model_id }
|
|
316
|
-
end
|
|
317
|
-
|
|
318
|
-
def test_anthropic_connection(api_key)
|
|
319
|
-
require 'ruby_llm'
|
|
320
|
-
|
|
321
|
-
client = RubyLLM.new(provider: :anthropic, api_key: api_key)
|
|
322
|
-
client.chat([{ role: 'user', content: 'Test' }], model: 'claude-3-5-sonnet-20241022', max_tokens: 10)
|
|
323
|
-
|
|
324
|
-
{ success: true }
|
|
325
|
-
rescue StandardError => e
|
|
326
|
-
{ success: false, error: e.message }
|
|
327
|
-
end
|
|
328
|
-
|
|
329
|
-
def test_openai_connection(api_key)
|
|
330
|
-
require 'ruby_llm'
|
|
331
|
-
|
|
332
|
-
client = RubyLLM.new(provider: :openai, api_key: api_key)
|
|
333
|
-
client.chat([{ role: 'user', content: 'Test' }], model: 'gpt-4-turbo', max_tokens: 10)
|
|
334
|
-
|
|
335
|
-
{ success: true }
|
|
336
|
-
rescue StandardError => e
|
|
337
|
-
{ success: false, error: e.message }
|
|
338
|
-
end
|
|
339
|
-
|
|
340
|
-
def test_ollama_connection(endpoint, model)
|
|
341
|
-
require 'ruby_llm'
|
|
342
|
-
|
|
343
|
-
client = RubyLLM.new(provider: :openai_compatible, url: endpoint)
|
|
344
|
-
client.chat([{ role: 'user', content: 'Test' }], model: model, max_tokens: 10)
|
|
345
|
-
|
|
346
|
-
{ success: true }
|
|
347
|
-
rescue StandardError => e
|
|
348
|
-
{ success: false, error: e.message }
|
|
349
|
-
end
|
|
350
|
-
|
|
351
|
-
def fetch_available_models(endpoint, api_key = nil)
|
|
352
|
-
require 'net/http'
|
|
353
|
-
require 'json'
|
|
354
|
-
require 'uri'
|
|
355
|
-
|
|
356
|
-
models_url = URI.join(endpoint, '/v1/models').to_s
|
|
357
|
-
|
|
358
|
-
models = nil
|
|
359
|
-
count = 0
|
|
360
|
-
|
|
361
|
-
Formatters::ProgressFormatter.with_spinner('Fetching available models') do
|
|
362
|
-
uri = URI(models_url)
|
|
363
|
-
request = Net::HTTP::Get.new(uri)
|
|
364
|
-
request['Authorization'] = "Bearer #{api_key}" if api_key
|
|
365
|
-
request['Content-Type'] = 'application/json'
|
|
366
|
-
|
|
367
|
-
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
|
|
368
|
-
http.request(request)
|
|
369
|
-
end
|
|
370
|
-
|
|
371
|
-
if response.is_a?(Net::HTTPSuccess)
|
|
372
|
-
data = JSON.parse(response.body)
|
|
373
|
-
# Extract model IDs from the response
|
|
374
|
-
models = data['data']&.map { |m| m['id'] } || []
|
|
375
|
-
count = models.size
|
|
376
|
-
else
|
|
377
|
-
Formatters::ProgressFormatter.warn("Could not fetch models (HTTP #{response.code})")
|
|
378
|
-
end
|
|
379
|
-
end
|
|
380
|
-
|
|
381
|
-
# Show count after spinner completes
|
|
382
|
-
puts pastel.dim("Found #{count} models") if count.positive?
|
|
383
|
-
models
|
|
384
|
-
rescue StandardError => e
|
|
385
|
-
Formatters::ProgressFormatter.warn("Could not fetch models: #{e.message}")
|
|
386
|
-
nil
|
|
387
|
-
end
|
|
388
|
-
|
|
389
|
-
def create_model_resource(cluster_info, name, provider, model, api_key = nil, endpoint = nil)
|
|
390
|
-
Formatters::ProgressFormatter.with_spinner("Creating model '#{name}'") do
|
|
391
|
-
k8s = Kubernetes::Client.new(
|
|
392
|
-
kubeconfig: cluster_info[:kubeconfig],
|
|
393
|
-
context: cluster_info[:context]
|
|
394
|
-
)
|
|
395
|
-
|
|
396
|
-
# Create API key secret if provided
|
|
397
|
-
if api_key
|
|
398
|
-
secret_name = "#{name}-api-key"
|
|
399
|
-
secret = {
|
|
400
|
-
'apiVersion' => 'v1',
|
|
401
|
-
'kind' => 'Secret',
|
|
402
|
-
'metadata' => {
|
|
403
|
-
'name' => secret_name,
|
|
404
|
-
'namespace' => cluster_info[:namespace]
|
|
405
|
-
},
|
|
406
|
-
'type' => 'Opaque',
|
|
407
|
-
'stringData' => {
|
|
408
|
-
'api-key' => api_key
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
k8s.apply_resource(secret)
|
|
412
|
-
end
|
|
413
|
-
|
|
414
|
-
# Create LanguageModel resource
|
|
415
|
-
resource = Kubernetes::ResourceBuilder.language_model(
|
|
416
|
-
name,
|
|
417
|
-
provider: provider,
|
|
418
|
-
model: model,
|
|
419
|
-
endpoint: endpoint,
|
|
420
|
-
cluster: cluster_info[:namespace]
|
|
421
|
-
)
|
|
422
|
-
|
|
423
|
-
# Add API key reference if we created a secret
|
|
424
|
-
if api_key
|
|
425
|
-
resource['spec']['apiKeySecret'] = {
|
|
426
|
-
'name' => "#{name}-api-key",
|
|
427
|
-
'key' => 'api-key'
|
|
428
|
-
}
|
|
429
|
-
end
|
|
430
|
-
|
|
431
|
-
k8s.apply_resource(resource)
|
|
432
|
-
end
|
|
433
|
-
# rubocop:enable Metrics/BlockLength
|
|
434
|
-
end
|
|
435
|
-
|
|
436
|
-
# rubocop:disable Naming/PredicateMethod
|
|
437
|
-
def create_example_agent(cluster_info, model_info)
|
|
438
|
-
puts
|
|
439
|
-
puts '─' * 50
|
|
440
|
-
puts pastel.cyan('Step 3/3: Create Your First Agent')
|
|
441
|
-
puts '─' * 50
|
|
442
|
-
puts
|
|
443
|
-
|
|
444
|
-
# Ask if user wants to create an example agent
|
|
445
|
-
create_agent = prompt.yes?('Would you like to create a simple agent to see how things work?')
|
|
446
|
-
|
|
447
|
-
unless create_agent
|
|
448
|
-
puts
|
|
449
|
-
puts pastel.dim('Skipping example agent creation.')
|
|
450
|
-
puts
|
|
451
|
-
return false
|
|
452
|
-
end
|
|
453
|
-
|
|
454
|
-
puts
|
|
455
|
-
puts "I'll create an agent that tells you fun facts about Ruby."
|
|
456
|
-
puts
|
|
457
|
-
|
|
458
|
-
agent_name = 'ruby-facts'
|
|
459
|
-
description = 'Tell me an interesting fun fact about the Ruby programming language'
|
|
460
|
-
|
|
461
|
-
k8s = Kubernetes::Client.new(
|
|
462
|
-
kubeconfig: cluster_info[:kubeconfig],
|
|
463
|
-
context: cluster_info[:context]
|
|
464
|
-
)
|
|
465
|
-
|
|
466
|
-
# Create agent
|
|
467
|
-
Formatters::ProgressFormatter.with_spinner("Creating agent '#{agent_name}'") do
|
|
468
|
-
resource = Kubernetes::ResourceBuilder.language_agent(
|
|
469
|
-
agent_name,
|
|
470
|
-
instructions: description,
|
|
471
|
-
cluster: cluster_info[:namespace],
|
|
472
|
-
persona: nil,
|
|
473
|
-
tools: [],
|
|
474
|
-
models: [model_info[:name]]
|
|
475
|
-
)
|
|
476
|
-
|
|
477
|
-
k8s.apply_resource(resource)
|
|
478
|
-
end
|
|
479
|
-
|
|
480
|
-
# Wait for synthesis
|
|
481
|
-
wait_for_synthesis(k8s, agent_name, cluster_info[:namespace])
|
|
482
|
-
|
|
483
|
-
true
|
|
484
|
-
end
|
|
485
|
-
# rubocop:enable Naming/PredicateMethod
|
|
486
|
-
|
|
487
|
-
def wait_for_synthesis(k8s, agent_name, namespace)
|
|
488
|
-
max_wait = 300 # 5 minutes for quickstart
|
|
489
|
-
interval = 2
|
|
490
|
-
elapsed = 0
|
|
491
|
-
|
|
492
|
-
Formatters::ProgressFormatter.with_spinner('Synthesizing code') do
|
|
493
|
-
loop do
|
|
494
|
-
agent = k8s.get_resource('LanguageAgent', agent_name, namespace)
|
|
495
|
-
conditions = agent.dig('status', 'conditions') || []
|
|
496
|
-
synthesized = conditions.find { |c| c['type'] == 'Synthesized' }
|
|
497
|
-
|
|
498
|
-
if synthesized
|
|
499
|
-
if synthesized['status'] == 'True'
|
|
500
|
-
break # Success
|
|
501
|
-
elsif synthesized['status'] == 'False'
|
|
502
|
-
raise StandardError, "Synthesis failed: #{synthesized['message']}"
|
|
503
|
-
end
|
|
504
|
-
end
|
|
505
|
-
|
|
506
|
-
if elapsed >= max_wait
|
|
507
|
-
Formatters::ProgressFormatter.warn('Synthesis is taking longer than expected, continuing in background')
|
|
508
|
-
break
|
|
509
|
-
end
|
|
510
|
-
|
|
511
|
-
sleep interval
|
|
512
|
-
elapsed += interval
|
|
513
|
-
end
|
|
514
|
-
end
|
|
515
|
-
|
|
516
|
-
puts
|
|
517
|
-
rescue K8s::Error::NotFound
|
|
518
|
-
# Agent not found yet, retry
|
|
519
|
-
retry if elapsed < max_wait
|
|
520
|
-
raise
|
|
521
|
-
end
|
|
522
|
-
|
|
523
|
-
def show_next_steps(agent_created: false)
|
|
524
|
-
puts
|
|
525
|
-
puts pastel.cyan("What's Next?")
|
|
526
|
-
puts
|
|
527
|
-
|
|
528
|
-
if agent_created
|
|
529
|
-
puts '1. Check your agent status:'
|
|
530
|
-
puts " #{pastel.dim('aictl agent inspect ruby-facts')}"
|
|
531
|
-
puts
|
|
532
|
-
puts '2. View the agent output:'
|
|
533
|
-
puts " #{pastel.dim('aictl agent logs ruby-facts')}"
|
|
534
|
-
puts
|
|
535
|
-
puts '3. Create another agent:'
|
|
536
|
-
puts " #{pastel.dim('aictl agent create "your task here"')}"
|
|
537
|
-
puts
|
|
538
|
-
puts '4. View all your agents:'
|
|
539
|
-
puts " #{pastel.dim('aictl agent list')}"
|
|
540
|
-
else
|
|
541
|
-
puts '1. Create your own agent:'
|
|
542
|
-
puts " #{pastel.dim('aictl agent create "your task here"')}"
|
|
543
|
-
puts
|
|
544
|
-
puts '2. Use the interactive wizard:'
|
|
545
|
-
puts " #{pastel.dim('aictl agent create --wizard')}"
|
|
546
|
-
puts
|
|
547
|
-
puts '3. View your agents:'
|
|
548
|
-
puts " #{pastel.dim('aictl agent list')}"
|
|
549
|
-
puts
|
|
550
|
-
puts '4. Check agent status:'
|
|
551
|
-
puts " #{pastel.dim('aictl agent inspect <agent-name>')}"
|
|
552
|
-
end
|
|
553
|
-
|
|
554
|
-
puts
|
|
555
|
-
puts pastel.green('Welcome to autonomous automation! 🚀')
|
|
556
|
-
puts
|
|
557
|
-
end
|
|
558
|
-
end
|
|
559
|
-
end
|
|
560
|
-
end
|
|
561
|
-
end
|
/data/bin/{aictl → langop}
RENAMED
|
File without changes
|