Commit Graph
43 Commits
Author SHA1 Message Date
wizardchen f635eaf466 chore(github): translate templates to English and improve content
- Convert issue and PR templates to English only for broader reach
- Bug report: add Steps to Reproduce, Actual Behavior, WeKnora Version,
  and Deployment Method as required fields; expand log guide to cover
  Lite / Desktop / source builds
- Feature request: replace user-selected Priority with Impact to reduce
  severity inflation
- PR template: slim down to 6 sections, add Conventional Commits hint
  in the title, and require `make fmt && make lint && make test` in the
  checklist
2026-05-12 18:28:08 +08:00
wizardchen a082c04d28 chore(deps): update dependencies in /docreader and adjust dependabot configuration
- Updated `pydantic` from 2.12.3 to 2.13.4 and `pypdfium2` from 5.0.0 to 5.8.0 in the `docreader` requirements.
- Modified the dependabot configuration to set `open-pull-requests-limit` to 0 and added an `ignore` rule for version updates across all ecosystems, allowing only security updates.
- Adjusted settings for `server-security`, `client-security`, `frontend-security`, and `miniprogram-security` groups to streamline security update handling.

This change aims to enhance dependency management and maintain security while reducing noise from version update PRs.
2026-05-12 14:58:52 +08:00
nullkey 93d6fb9f30 ci(deps): apply dependabot grouping + monthly cadence across all ecosystems
Earlier per-dep dependabot PRs against the existing cli/, frontend/,
and miniprogram/ ecosystems flooded the review queue with 40+ PRs at
once. Apply a noise-bounding pattern uniformly to every ecosystem the
repo declares:

  * **Monthly schedule** for routine version updates. Mirrors caddy /
    hashicorp-terraform-actions: explicitly chosen over weekly to keep
    maintainer review-attention bounded for a contributor-driven OSS
    project. Among 10 surveyed mainstream configs (daily 7 / weekly 1
    / monthly 2), monthly is the canonical "minimum-noise" choice for
    the contributor cadence WeKnora actually has.
  * **Two `groups` per ecosystem** so per-dep PRs never flood:
      - `<scope>-deps`        bundles minor + patch updates → ONE PR
                              per ecosystem per month.
      - `<scope>-deps-major`  bundles semver-major bumps the same way.
                              Mirrors grafana's `*-breaking` pattern:
                              surfaces breaking changes as a single
                              review-required PR rather than silently
                              ignoring them. (gh-cli's `ignore:
                              semver-major` style means majors never
                              surface until someone manually edits
                              the .yml or the dep — easier to forget
                              than to act on. Grouping forces them
                              into the review queue.)
  * `open-pull-requests-limit: 3` (was default 5) as a safety net so a
    stalled review queue can't pile up stale group PRs.
  * `commit-message.prefix: "chore(deps)"` so dependabot PR titles
    match the repo's Conventional Commits style out of the box.
    npm gets `prefix-development: "chore(deps-dev)"` for devDependency
    bumps.
  * Note: GitHub Security Advisory CVEs open immediately regardless of
    `schedule.interval` — that field governs *version* updates only,
    so the monthly cadence does NOT delay CVE response.

Coverage:
  - gomod: /, /cli, /client
  - npm:   /frontend, /miniprogram
  - pip:   /docreader
  - github-actions: /

Realistic steady-state with this config: 1–3 grouped PRs per month
total across all 7 ecosystems (vs. 40+ before), with major bumps
appearing as their own group PR every few months when upstream cuts
breaking releases.

Tests / build: not affected (config-only change). YAML validated with
`python3 -c "import yaml; yaml.safe_load(...)"`.
2026-05-12 13:20:42 +08:00
nullkey 3fb3583a92 feat(cli): add api passthrough, chat streaming, doctor warn status
Close the v0.2 RAG demo loop and ship the validation infrastructure:

  - weknora api <method> <path> [--data X | --data-file F]
      Raw passthrough wrapping client.Raw, gh-style. JSON envelope mode
      surfaces status / headers / parsed body. Non-2xx routes through
      cmdutil.ClassifyHTTPStatus (factored out of ClassifyHTTPError so
      both SDK-error and direct-status paths stay aligned — reuse review).

  - weknora chat <text> [--session-id S] [--no-stream]
      KnowledgeQAStream consumer with two output modes:
        - TTY default: token streaming + references footer
        - --json / --no-stream / non-TTY: buffered single envelope
      Auto-creates a session when --session-id is omitted; the id prints
      to stderr at start AND on stream failure (^C scrolls past the
      first announcement, so the recovery hint is re-surfaced when the
      user is most likely to need it).

  - cli/internal/sse/Accumulator
      buffers Content / References / SessionID across SDK callbacks.
      Idempotent post-Done so misbehaving servers don't corrupt state.

  - doctor: ok → ok / warn / fail / skip
      warn marks soft issues that don't block: server within compat range
      but >=1 minor behind CLI; credential storage falling back to file
      because keyring is unavailable. Envelope.ok stays true on warn,
      flips false on fail (exit 1). doctor.error_network golden updated.

  - cli/acceptance/e2e/    real-server RAG full loop
      Build-tagged //go:build acceptance_e2e — kept out of the default
      `go test ./...`. Exercises kb create → doc upload → poll ready →
      search → chat → cleanup against a server pointed at by
      WEKNORA_E2E_HOST / _TOKEN.

  - .github/workflows/cli-e2e.yml
      manual workflow_dispatch + label-gated PR trigger
      ("acceptance-e2e"). No-ops gracefully when the secrets aren't set
      so cross-fork PRs can't accidentally fail the suite.
2026-05-12 13:20:42 +08:00
dependabot[bot] 9344907627 chore(deps): bump actions/checkout from 3 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-09 12:58:31 +08:00
dependabot[bot] 0455872111 chore(deps): bump actions/upload-artifact from 4 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-09 12:58:20 +08:00
dependabot[bot] f4fe86a842 chore(deps): bump docker/login-action from 3 to 4
Bumps [docker/login-action](https://github.com/docker/login-action) from 3 to 4.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-09 12:58:11 +08:00
dependabot[bot] 735e3696e9 chore(deps): bump docker/setup-buildx-action from 3 to 4
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-09 12:57:41 +08:00
wizardchen 1c643dc11f chore(dependabot): expand coverage beyond /cli
Add weekly Dependabot updates for the root and /client Go modules,
the frontend and miniprogram npm packages, and the docreader Python
package. Existing /cli gomod and github-actions entries are kept.
Semver-major bumps remain ignored to reduce noise.
2026-05-09 12:45:40 +08:00
dependabot[bot] 80703b6551 chore(deps): bump actions/setup-go from 5 to 6
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5 to 6.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-09 12:44:23 +08:00
dependabot[bot] 5a15cdb197 chore(deps): bump docker/build-push-action from 3 to 7
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 7.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3...v7)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-09 12:43:52 +08:00
dependabot[bot] 7f07ea80d6 chore(deps): bump actions/download-artifact from 4 to 8
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 8.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v8)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-09 12:43:39 +08:00
dependabot[bot] 3dd42c1cec chore(deps): bump docker/metadata-action from 5 to 6
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5 to 6.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-09 12:43:27 +08:00
dependabot[bot] a364b93e28 chore(deps): bump actions/setup-node from 4 to 6
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 6.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-09 12:43:11 +08:00
nullkey bb592a59a6 feat(cli): contract test suite + dependabot (PR-8)
cli/acceptance/contract/:
  envelope_test.go    — 16 envelope golden cases (9 commands × {success/error
                        variants}; 3 cases dropped with rationale: doctor.success
                        non-offline has unstable timing detail; auth_login.* needs
                        stdin/keyring scaffold deferred to v0.2; context_use.error
                        needs leaf-local --json deferred to follow-up)
  errorcodes_test.go  — single-direction AST scan of cli/cmd/ extracting first
                        arg of cmdutil.NewError / cmdutil.Wrapf calls;
                        ClassifyHTTPError dynamic-classify bridged via
                        cmdutil.ClassifyHTTPErrorOutputs() per spec §4.3.
  testdata/envelopes/ — 16 JSON golden files

helpers_test.go (PR-6 scaffold) extended:
  runCmd now wires cobra Out/Err sinks (version uses c.OutOrStdout) AND
  replicates cmd.Execute()'s error-envelope path so error-case goldens are
  populated. Without this, every error scenario's golden was 0 bytes.

cli/cmd/root.go: mapCobraError → MapCobraError, wantsJSONOutput → WantsJSONOutput
                 (exported so the contract test helper can replicate Execute()'s
                 envelope-printing path without calling Execute() itself).
                 root_test.go updated to use new exported names.

.github/dependabot.yml (新增):gomod /cli + github-actions weekly,gh-style
                              ignore semver-major to avoid noise. Open-source
                              dependency safety,independent of release cadence.

v0.1 不发布到任何分发平台 (release infra 推迟到发布窗口 milestone)。
2026-05-09 12:18:01 +08:00
nullkey a39805aa89 feat(cli): scaffold weknora CLI module foundation (PR-1)
Empty cli/ Go module with Factory + Options skeleton that all v0.x commands
plug into.

Foundation packages (10 internal/):
- cmdutil: Factory(3 closure: Config/Client/Prompter) + Options + Errors
  with namespaced ErrorCode + typed predicates (IsAuthError / IsNotFound /
  IsTransient / IsAuthExpired) + Exporter + AddJSONFlags + ExitCode/PrintError
- iostreams: package singleton with TTY detection; ColorEnabled honors
  NO_COLOR / TERM=dumb on demand
- agent: mode + detect + annotations (Stripe pkg/useragent pattern;
  CLAUDECODE / CURSOR_AGENT / CODEX_* / AIDER_* / CONTINUE_* /
  OPENCODE_* / GEMINICODER env detection)
- build: ldflags-injected version/commit/date
- safepaths: separator-aware path-traversal protection
- config: yaml.v3 schema + atomic save 0600 (XDG-style)
- format: success/failure envelope (code/hint/request_id/risk/retryable/
  console_url) with typed RiskLevel
- prompt: Prompter interface + AgentPrompter (rejects in agent mode)
- secrets: file 0600 store with weknora:<context>:<key> namespace
- testutil: XDGTempDir(t) test helper

Smoke command: weknora version (-/--json). Build/test/vet matrix in
.github/workflows/cli.yml across linux x macos x windows x Go 1.24.

Factory.Client returns CodeLocalUnimplemented until PR-3 wires the SDK
adapter; PR-1 commands (version) don't need it.
2026-05-07 23:19:46 +08:00
wizardchen 0b8ec2ddcf chore: Update .dockerignore and GitHub Actions for improved caching 2026-04-23 13:28:55 +08:00
wizardchen 457e739978 feat(release): update to version 0.4.0 with new features, improvements, and bug fixes 2026-04-15 11:37:24 +08:00
lyingbug a751e7335b fix windows build 2026-04-11 22:28:25 +08:00
wizardchen a655a25cf8 fix: revert to neo4j v6 and workaround Go 1.24 Windows compiler bug with -p=1
Go 1.24 has an internal compiler race condition on Windows that causes
'package without types' errors during parallel compilation. Setting
GOFLAGS="-p=1" serializes the build and avoids triggering the bug.
2026-04-11 22:08:02 +08:00
wizardchen 20ec1be854 chore: fix missing server files and upgrade to Node 24 actions 2026-04-11 19:32:21 +08:00
wizardchen ae95cb1a7a feat: add server listening functionality with retry mechanism and platform-specific shutdown signal handling for improved robustness 2026-04-11 19:09:25 +08:00
wizardchen 997bf582ad feat: enhance GitHub Actions workflow to build and package desktop app for multiple platforms, including macOS, Linux, and Windows 2026-04-11 18:51:16 +08:00
wizardchen d005bd1db8 Revert "chore: make Lite edition support and related configurations hidden"
This reverts commit 88d5b303b8.
2026-04-11 18:51:16 +08:00
wizardchen 88d5b303b8 chore: make Lite edition support and related configurations hidden 2026-03-02 21:21:49 +08:00
wizardchen 397689d2f3 feat: introduce WeKnora Lite edition with lightweight configuration and deployment
- Added a new `.env.lite.example` file for the Lite version, providing a minimal configuration template.
- Updated `.env.example` to remove deprecated variables and include new Docreader settings.
- Enhanced Docker configurations to support the Lite version, including a new Dockerfile for the Docreader service.
- Introduced a Makefile target for building and running the Lite version, along with packaging capabilities.
- Created GitHub workflows for building and releasing Lite binaries, including Homebrew formula support.
- Implemented a new service file for managing the Lite version as a system service.

This update enables a streamlined, single-binary deployment of WeKnora, reducing external dependencies and simplifying setup.
2026-03-02 21:21:49 +08:00
wizardchen d6444d0cf3 feat: add build-sandbox job to Docker workflow
- Introduced a new job in the Docker workflow to build and push a sandbox image.
- Configured steps for code checkout, Docker Buildx setup, Docker Hub login, and image metadata handling.
- Enabled multi-platform builds for the sandbox image, enhancing deployment flexibility.
2026-02-04 20:58:24 +08:00
begoniezhao 0032a9185c chore: 新增触发分支,添加并发控制并清理磁盘空间 2025-11-05 15:05:51 +08:00
begoniezhao 4824e41361 chore: 移除构建镜像前的版本信息准备步骤 2025-09-19 12:29:03 +08:00
begoniezhao bfd4fffbe3 chore: upspeed build docker 2025-09-19 12:29:03 +08:00
begoniezhao a2902de6ce chore(build): Optimize Docker build configuration and process 2025-09-18 18:22:38 +08:00
begoniezhao 8f723b38fb chore(build): Optimize Docker build configuration and process, adjust task names 2025-09-18 17:34:14 +08:00
wizardchen 5e0a99b127 fix: Get version script 2025-09-17 16:40:48 +08:00
wizardchen 91e65d6445 feat(ui): Support multi knowledgebases operation 2025-09-17 16:02:08 +08:00
wizardchen 74c121f7fb feat: Adjust App & Docreader log output 2025-09-11 23:14:23 +08:00
begoniezhao 7efa173812 chore: Added VERSION file to optimize docker image build configuration 2025-09-09 14:57:09 +08:00
wizardchen d386a08315 fix: add pr template 2025-09-08 21:41:39 +08:00
wizardchen 277607b92f feat: update docker image on restart 2025-09-08 19:44:03 +08:00
begoniezhao 58aa31d867 chore(ci): Added GitHub Actions concurrency control configuration 2025-09-08 18:16:25 +08:00
wizardchen 703d939d08 docs: update some contact links 2025-09-08 17:52:32 +08:00
wizardchen 8900aa45e8 feat: add issue template 2025-09-08 17:38:38 +08:00
begoniezhao a5cdda3c4c build: Removed platform parameters, added multi-platform builds and simplified image tags 2025-08-22 12:27:26 +08:00
begoniezhao 4ff3ba6d96 feat: Added multi-architecture image building and service startup instructions, upgraded Node image and package manager 2025-08-21 15:15:42 +08:00