Commit Graph

1601 Commits

Author SHA1 Message Date
Alem Tuzlak 07c46ebe53 feat(vscode-extension): Memento-backed controls persistence 2026-04-17 14:26:21 +02:00
Alem Tuzlak d7b4b0d649 feat(vscode-extension): hook adapters for every render-props kind 2026-04-17 14:22:45 +02:00
Alem Tuzlak 6048aa24ab fix(vscode-extension): FormRenderer drops undefined keys instead of leaving them as undefined
When a field emits undefined (e.g. NumberField with an optional field cleared),
previously the merged payload would contain { count: undefined } which
downstream render callbacks would see as a present-but-null property.
Now the key is removed entirely, matching the runtime contract for
'optional field not provided'.

Also adds three tests: nested object change, array add, and the
undefined-drop behavior.
2026-04-17 14:19:04 +02:00
Alem Tuzlak fcc6e7082d feat(vscode-extension): FormRenderer and full FieldRenderer dispatcher 2026-04-17 14:16:35 +02:00
Alem Tuzlak 8f4e34cf05 fix(vscode-extension): RawJsonField skips onChange on empty input; adds aria-invalid and error-clear test
- Empty textarea no longer clobbers prior value with {}. Fields representing
  arrays, strings, or null would previously be silently overwritten; now empty
  input means 'no change' and clears any prior parse error.
- Adds aria-invalid={!!error} on the textarea.
- Adds two tests: empty-input path (no onChange, no alert) and error-recovery
  path (alert disappears + onChange fires with the new valid JSON).
- Documents the mount-only local-state contract so future callers aren't
  surprised that external value resets don't propagate.
2026-04-17 14:13:23 +02:00
Alem Tuzlak 64eee33c8f feat(vscode-extension): ObjectField and RawJsonField 2026-04-17 14:10:09 +02:00
Alem Tuzlak f060998a2c feat(vscode-extension): ArrayField with partial FieldRenderer 2026-04-17 14:04:22 +02:00
Alem Tuzlak f055cddfe0 fix(vscode-extension): primitive field a11y + NumberField empty-emits-undefined
- NumberField: emit undefined for empty / non-finite input instead of silently
  coercing to 0, matching the value: number | undefined type. Widens onChange
  to (v: number | undefined) => void. Adds a test for the empty-input path.
- All three fields: drop redundant aria-label (wrapping <label> + htmlFor/id
  provides the accessible name; the aria-label was double-announcing in
  screen readers).
- Set native required attribute on input/select/checkbox so assistive tech
  exposes the constraint alongside the (optional) suffix.
2026-04-17 13:59:42 +02:00
Alem Tuzlak 9609f911bf feat(vscode-extension): primitive form fields (string, number, boolean) 2026-04-17 13:55:56 +02:00
Alem Tuzlak b2341078c9 feat(vscode-extension): schema value defaults and merge logic 2026-04-17 13:52:18 +02:00
Alem Tuzlak 0ec195bf44 refactor(vscode-extension): export JSONSchemaNode and drop as-any cast in standard-schema 2026-04-17 13:50:35 +02:00
Alem Tuzlak a0dedd201d feat(vscode-extension): Standard Schema to FormSchema via zod-to-json-schema 2026-04-17 13:47:57 +02:00
Alem Tuzlak 7f5e960a21 feat(vscode-extension): JSON Schema to FormSchema converter 2026-04-17 13:44:07 +02:00
Alem Tuzlak 95bcf855e9 feat(vscode-extension): v1 parameters to FormSchema converter 2026-04-17 13:40:32 +02:00
Alem Tuzlak 8d95caeadc refactor(vscode-extension): extract shared IIFE bundler helper
Previously bundler.ts (catalog) and hook-bundler.ts duplicated ~80 lines of
rolldown + nodeResolveFallback wiring. Extracts the common shell into
extension/shared/iife-bundler.ts exposing bundleIife() and IifeBundleResult.
bundler.ts and hook-bundler.ts are now thin wrappers supplying their specific
iifeName, externals, globals, and skip prefixes. Catalog and hook bundler
tests still pass unchanged; type aliases (BundleResult, HookBundleResult)
preserved for call-site source compatibility.
2026-04-17 13:28:23 +02:00
Alem Tuzlak 785bcb64b4 refactor(vscode-extension): single-pass scanWorkspace with inherited gitignore stack
- Replaces the separate loadGitignore() walk + per-file isIgnored() loop with a
  single directory walk that inherits gitignore scopes from parent to child.
  For a workspace with G gitignore files and F source files, cuts syscalls
  from O(2*(F+G)) to O(F+G) and ignore-checks from O(F*G) to O(F*depth).
- Drops unused ScanWorkspaceOptions.roots and unused rootDir param.
- HARDCODED_EXCLUDES is now a case-insensitive Set.
2026-04-17 13:26:31 +02:00
Alem Tuzlak 484ef82dad test(vscode-extension): drop string-key fixture (formatter rewrites quoted keys, making test redundant) 2026-04-17 13:25:26 +02:00
Alem Tuzlak cfc2608dc1 refactor(vscode-extension): tighten hook-scanner AST visitor + pin loc.line + cover string-keyed name prop 2026-04-17 13:24:24 +02:00
Alem Tuzlak 0f393a7aa9 feat(vscode-extension): add hook-site bundler with only React externalized 2026-04-17 13:18:21 +02:00
Alem Tuzlak 4d454ee004 feat(vscode-extension): add workspace walker with gitignore support 2026-04-17 13:14:21 +02:00
Alem Tuzlak ea8ffb76c0 fix(vscode-extension): widen RENDER_HOOK_NAMES to Set<string> for correct .has() typing 2026-04-17 13:10:00 +02:00
Alem Tuzlak 0f46a6167f feat(vscode-extension): add static hook scanner with oxc AST parsing 2026-04-17 13:08:04 +02:00
Alem Tuzlak 03c0ac08c1 feat(vscode-extension): add hook registry metadata 2026-04-17 13:00:33 +02:00
Alem Tuzlak 0d361448a2 feat(vscode-extension): scaffold hook explorer (view, commands, webview entry) 2026-04-17 12:41:36 +02:00
AlemTuzlak 9d00b01ccd chore: release monorepo v1.56.2 2026-04-16 16:04:38 +00:00
Alem Tuzlak 8182470f35 fix: remove unused @langchain/community peer dep from sdk-js (#3960)
## Summary

- Remove `@langchain/community` from `@copilotkit/sdk-js`
peerDependencies — it's declared as `^0.3.58` but never imported
anywhere in the package
- This was the only constraint blocking `@langchain/core@1.x` resolution
for consumers using the LangGraph JS starter

## Context

`@copilotkit/sdk-js` has zero imports from `@langchain/community`. The
`^0.3.58` peer dep forced npm to resolve `@langchain/community@0.3.x`,
which transitively pulled in `@getzep/zep-cloud` → `langchain@0.3.x`,
conflicting with `sdk-js`'s own `langchain@>=1.0.0` peer requirement.

Removing the unused peer dep eliminates this resolution conflict
entirely.

## Test plan

- [ ] `npm install` in a fresh project using `@copilotkit/sdk-js`
resolves without peer dep warnings for `@langchain/community`
- [ ] Existing LangGraph JS starter installs cleanly
- [ ] No runtime behavior change (nothing imported from the removed dep)
2026-04-16 18:02:53 +02:00
AlemTuzlak a6e8a48189 chore: release monorepo v1.56.1 2026-04-16 15:38:24 +00:00
Alem Tuzlak dbb89e3ff8 fix: remove unused @langchain/community peer dep from sdk-js
@copilotkit/sdk-js declares @langchain/community as a peer dependency
but never imports from it. The ^0.3.58 constraint was the only thing
blocking @langchain/core@1.x resolution for consumers. Remove it
entirely since it serves no purpose.
2026-04-16 17:21:05 +02:00
github-actions[bot] 0fe4d87edf style: auto-fix formatting 2026-04-16 14:43:21 +00:00
Alem Tuzlak 0e38bb6bc9 fix(ci): rename package to copilotkit-vscode-extension for vsce compatibility 2026-04-16 16:41:11 +02:00
Alem Tuzlak acb6ade4da fix(ci): fix vscode-extension type check — add es2022 target, fix missing error prop in tests, run tsc directly 2026-04-16 16:36:02 +02:00
github-actions[bot] 0ee8f18462 style: auto-fix formatting 2026-04-16 14:24:32 +00:00
Alem Tuzlak 1eb4a154ad Merge origin/main into feature branch: resolve 7 conflicts 2026-04-16 16:16:48 +02:00
Alem Tuzlak 73a64327ef fix: CR round 2 — add MESSAGES_SNAPSHOT/CUSTOM to allCategories, store unsubscribers in InspectorViewProvider 2026-04-16 15:09:25 +02:00
Alem Tuzlak a8fdf8de0b fix: CR round 1 — leaked listeners, silent errors, missing menu entries, test for SSE comment 2026-04-16 15:02:55 +02:00
Alem Tuzlak 9292e9a5fa fix: address CR round 1 findings — leaked listeners, silent errors, missing menu entries 2026-04-16 15:01:11 +02:00
Alem Tuzlak e1d3cee377 feat(vscode-extension): buffer events persistently in InspectorViewProvider for cross-tab survival 2026-04-16 14:48:20 +02:00
Alem Tuzlak f98ddb6c70 feat(vscode-extension): move inspector above component preview, rename to A2UI Catalog Components Preview 2026-04-16 14:44:51 +02:00
Alem Tuzlak f41a8d4f61 feat(vscode-extension): add AG-UI Inspector as sidebar webview view with shared DebugStream 2026-04-16 14:39:54 +02:00
Alem Tuzlak 7fc82c6061 fix(runtime): send SSE comment on connect to flush response headers immediately 2026-04-16 14:23:54 +02:00
Alem Tuzlak 646ea99086 fix(vscode-extension): fix debug-events URL construction, add error display, update default URL 2026-04-16 14:16:06 +02:00
Alem Tuzlak 0813cc390a test(runtime): add debug-events integration tests across all adapters
Tests the /debug-events SSE endpoint across Express, Hono, Node, and
Fetch Direct adapters. Verifies SSE response format, event flow through
the DebugEventBus, envelope structure (timestamp, agentId, threadId,
runId, event), full event sequence, HTTP method validation (405 for
POST), and NODE_ENV=production guard (404).

Key implementation detail: reader.cancel() must NOT be awaited on
tee'd ReadableStreams (created by response.clone() in the fetch
handler) because Node.js blocks until the other tee branch is also
consumed/cancelled.
2026-04-16 13:57:53 +02:00
Alem Tuzlak b89e95af3a docs: add AG-UI Event Inspector guide 2026-04-16 13:07:40 +02:00
Alem Tuzlak 8acfeed9c7 test(vscode-extension): add DebugStream SSE client tests 2026-04-16 13:04:07 +02:00
Alem Tuzlak 7bde34a856 test(runtime): add handleDebugEvents endpoint tests 2026-04-16 13:03:32 +02:00
Alem Tuzlak 1848a161ee test(runtime): add DebugEventBus and debug-events route tests 2026-04-16 13:00:09 +02:00
Alem Tuzlak 417b58569c refactor(vscode-extension): consolidate types, fix any casts, extract getNonce, add useMemo 2026-04-16 12:41:34 +02:00
Alem Tuzlak 6259ef4705 fix(vscode-extension): use node: prefix for http imports, fix inspector build output name 2026-04-16 12:33:44 +02:00
Alem Tuzlak 84d5c1676f fix: duck-type Request check for Hono polyfill compat (#3790)
## Summary
- Fixes #2986
- `reqOrRequest instanceof Request` fails when `@hono/node-server`
polyfills the Request class with a different prototype
- Replaced with a duck-type check (`isRequestLike`) that verifies `url`,
`method`, and `headers` properties exist
- The `!res` guard ensures IncomingMessage objects (which always come
with a ServerResponse) are still routed correctly

## Test plan
- [x] Added `request-duck-type.test.ts` covering native Request,
polyfilled Request, null/undefined, and missing properties
- [x] All 1225 existing runtime tests pass
- [x] Build passes
2026-04-16 12:32:38 +02:00
Alem Tuzlak 1ab373c776 fix: increase LangGraph agent pagination limit from 10 to 100 (#2056) (#3812)
Fixes #2056

Red-green tested locally.
2026-04-16 12:31:55 +02:00