@kortix/ui 0.14.6 → 0.14.7
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.
- package/dist/_vendor/kortix-shared.js +489 -381
- package/dist/customize/agents/agent-authority-card.js +1 -2
- package/dist/customize/agents/agent-detail-aside.js +15 -14
- package/dist/customize/agents/agent-drives-section.js +5 -6
- package/dist/customize/agents/agent-grant-pages.js +68 -70
- package/dist/customize/agents/agent-nav.prototype.d.ts +35 -0
- package/dist/customize/agents/agent-nav.prototype.js +95 -0
- package/dist/customize/agents/agent-page.js +57 -22
- package/dist/customize/agents/agent-people-section.js +18 -17
- package/dist/customize/agents/agent-triggers-section.js +6 -5
- package/dist/customize/connectors/catalog/catalog-entry.d.ts +14 -0
- package/dist/customize/connectors/catalog/catalog-entry.js +18 -1
- package/dist/customize/connectors/catalog/connector-browse.d.ts +28 -0
- package/dist/customize/connectors/catalog/connector-browse.js +18 -5
- package/dist/customize/connectors/detail/app-page.js +19 -5
- package/dist/customize/connectors/detail/connector-modal.d.ts +10 -13
- package/dist/customize/connectors/detail/connector-modal.js +18 -101
- package/dist/customize/connectors/detail/connector-notice.js +6 -2
- package/dist/customize/connectors/detail/connector-page.d.ts +30 -0
- package/dist/customize/connectors/detail/connector-page.js +26 -13
- package/dist/customize/sections/llm-provider/custom-provider-form.js +24 -7
- package/dist/customize/sections/llm-provider/custom-provider-panel.js +44 -8
- package/dist/customize/sections/llm-provider/types.d.ts +3 -0
- package/dist/customize/sections/llm-provider/utils.js +2 -2
- package/dist/customize/sections/view/agent-editor-access-fields.d.ts +9 -16
- package/dist/customize/sections/view/agent-editor-access-fields.js +30 -30
- package/dist/customize/sections/view/agent-editor-basics-fields.js +3 -10
- package/dist/customize/sections/view/agent-editor-primitives.d.ts +28 -10
- package/dist/customize/sections/view/agent-editor-primitives.js +32 -19
- package/dist/customize/sections/view/agent-editor.js +3 -3
- package/dist/customize/sections/view/gateway/gateway-routing.js +3 -3
- package/dist/customize/sections/view/grant-mode-field.d.ts +2 -5
- package/dist/customize/sections/view/grant-mode-field.js +10 -18
- package/dist/customize/sections/view/permission-editor.js +11 -8
- package/dist/customize/sections/view/secrets-view.js +2 -1
- package/dist/customize/settings/tabs/general-tab.d.ts +9 -2
- package/dist/customize/settings/tabs/general-tab.js +33 -11
- package/dist/customize/settings/tabs/transfer-workspace-dialog.d.ts +4 -0
- package/dist/customize/settings/tabs/transfer-workspace-dialog.js +82 -0
- package/dist/files/project/api/runtime-files.js +3 -2
- package/dist/files/project/file-source.js +18 -1
- package/dist/files/project/hooks/use-file-content.js +2 -0
- package/dist/files/viewer/file-header.js +1 -1
- package/dist/files/viewer/file-preview-modal.d.ts +1 -1
- package/dist/files/viewer/file-preview-modal.js +12 -2
- package/dist/files/viewer/file-source.d.ts +3 -1
- package/dist/files/viewer/use-file-content-state.js +26 -7
- package/dist/files/viewer/viewer-actions.js +2 -2
- package/dist/i18n/en.d.ts +345 -12
- package/dist/i18n/en.js +350 -17
- package/dist/internal/files/types.d.ts +2 -0
- package/dist/internal/goals/goal-meta.d.ts +30 -0
- package/dist/internal/goals/goal-meta.js +55 -0
- package/dist/internal/lib/query-client-singleton.d.ts +9 -3
- package/dist/internal/lib/query-client-singleton.js +18 -12
- package/dist/internal/share/session-shares-modal.js +3 -7
- package/dist/internal/stores/kortix-computer-store.js +14 -2
- package/dist/internal/stores/session-hover-store.d.ts +32 -0
- package/dist/internal/stores/session-hover-store.js +38 -0
- package/dist/internal/stores/sidebar-nav-store.d.ts +1 -1
- package/dist/internal/stores/sidebar-nav-store.js +3 -1
- package/dist/lib/routes.d.ts +2 -0
- package/dist/lib/routes.js +1 -0
- package/dist/primitives/settings-section-header.d.ts +1 -1
- package/dist/session/composer/attachment-tile.d.ts +0 -2
- package/dist/session/composer/attachment-tile.js +0 -8
- package/dist/session/composer/clipboard-files.d.ts +2 -1
- package/dist/session/composer/composer-draft-recovery.d.ts +1 -2
- package/dist/session/composer/composer-draft-recovery.js +0 -13
- package/dist/session/composer/context-ring.d.ts +1 -1
- package/dist/session/composer/context-ring.js +2 -2
- package/dist/session/composer/context-usage.d.ts +3 -6
- package/dist/session/composer/context-usage.js +3 -6
- package/dist/session/composer/inbox-row-claims.d.ts +2 -2
- package/dist/session/composer/inbox-row-claims.js +1 -1
- package/dist/session/composer/queue-projection.d.ts +3 -2
- package/dist/session/composer/queued-prompt-edit.d.ts +1 -1
- package/dist/session/composer/reasoning-effort-selector.d.ts +2 -1
- package/dist/session/composer/session-composer-readiness.d.ts +7 -22
- package/dist/session/composer/session-composer-readiness.js +12 -40
- package/dist/session/composer/token-progress.d.ts +1 -1
- package/dist/session/composer/token-progress.js +2 -2
- package/dist/session/header/session-goal-indicator.d.ts +1 -0
- package/dist/session/header/session-goal-indicator.js +41 -0
- package/dist/session/header/session-site-header.js +2 -1
- package/dist/session/panel/session-action-panel-column.js +11 -1
- package/dist/session/panel/session-audit-shared.d.ts +0 -4
- package/dist/session/panel/session-audit-shared.js +1 -1
- package/dist/session/panel/session-changes-shared.d.ts +2 -1
- package/dist/session/prompts/session-permission-prompt.js +6 -3
- package/dist/session/status/provisioning-failure.d.ts +2 -1
- package/dist/session/status/session-error-banner.js +8 -6
- package/dist/session/status/session-starting-loader.d.ts +24 -31
- package/dist/session/status/session-starting-loader.js +32 -81
- package/dist/session/thread/chat-minimap-items.d.ts +4 -4
- package/dist/session/thread/first-prompt-handover.d.ts +3 -2
- package/dist/session/thread/message-parsing.d.ts +3 -3
- package/dist/session/thread/session-chat.js +3 -10
- package/dist/session/thread/session-history-scroll.d.ts +2 -1
- package/dist/session/thread/session-thread.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/terminal/pty-connection.d.ts +5 -4
- package/dist/workspace/index.d.ts +1 -0
- package/dist/workspace/index.js +1 -0
- package/dist/workspace/saved-session-skeleton-shape.d.ts +4 -3
- package/dist/workspace/saved-session-skeleton.d.ts +5 -1
- package/dist/workspace/saved-session-skeleton.js +5 -4
- package/dist/workspace/session-workspace.js +4 -5
- package/dist/workspace/sidebar/footer/project-goals-nav.d.ts +6 -0
- package/dist/workspace/sidebar/footer/project-goals-nav.js +26 -0
- package/dist/workspace/sidebar/modal/session-embed-section.d.ts +25 -0
- package/dist/workspace/sidebar/modal/session-embed-section.js +71 -0
- package/dist/workspace/sidebar/modal/share-session-modal.js +2 -2
- package/dist/workspace/sidebar/nav-row-meta.js +14 -2
- package/dist/workspace/sidebar/project-nav-items.js +3 -0
- package/dist/workspace/sidebar/project-session-list.js +12 -3
- package/dist/workspace/sidebar/session-brief-hover-card.js +5 -8
- package/package.json +4 -4
- package/skills/kortix-ui/references/modules.md +2 -0
- package/dist/session/status/use-readiness-settling.d.ts +0 -18
- package/dist/session/status/use-readiness-settling.js +0 -43
- package/dist/workspace/sidebar/modal/session-public-link-section.d.ts +0 -13
- package/dist/workspace/sidebar/modal/session-public-link-section.js +0 -66
package/dist/i18n/en.js
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
// Generated by scripts/gen-i18n-catalog.mjs from apps/web/translations/en.json. Do not edit.
|
|
2
2
|
const catalog = {
|
|
3
|
+
"agentNavPrototype": {
|
|
4
|
+
"variantRail": "Left rail (today)",
|
|
5
|
+
"variantTabs": "Grouped underline tabs",
|
|
6
|
+
"variantGroups": "Group switch + tabs",
|
|
7
|
+
"variantInline": "Vertical tabs with values",
|
|
8
|
+
"previousVariant": "Previous variant",
|
|
9
|
+
"nextVariant": "Next variant"
|
|
10
|
+
},
|
|
3
11
|
"repositoryDisconnected": {
|
|
4
12
|
"title": "GitHub disconnected",
|
|
5
13
|
"reconnect": "Reconnect GitHub",
|
|
@@ -11,6 +19,28 @@ const catalog = {
|
|
|
11
19
|
"repo_not_accessible": "Kortix cannot reach {repository}. It was deleted, renamed, or removed from the Kortix GitHub App. A GitHub owner of {owner} must add it again."
|
|
12
20
|
}
|
|
13
21
|
},
|
|
22
|
+
"repositoryChange": {
|
|
23
|
+
"changedToast": "Repository changed. New sessions will use the new repository.",
|
|
24
|
+
"verifyError": "Could not verify GitHub access.",
|
|
25
|
+
"change": "Change",
|
|
26
|
+
"title": "Change repository",
|
|
27
|
+
"description": "New sessions will use the new repository. Existing sessions cannot restart after the change.",
|
|
28
|
+
"current": "Current repository",
|
|
29
|
+
"newUrl": "New GitHub repository URL",
|
|
30
|
+
"verifying": "Verifying GitHub…",
|
|
31
|
+
"verifyAgain": "Verify GitHub again",
|
|
32
|
+
"verify": "Verify GitHub access",
|
|
33
|
+
"noInstallation": "No Kortix App installation is available for this repository owner. Add the repository to the App installation in GitHub, then verify again.",
|
|
34
|
+
"installation": "GitHub App installation",
|
|
35
|
+
"selectInstallation": "Select installation",
|
|
36
|
+
"manifestRequirement": "The new repository needs {manifest} on its default branch. Stop active sessions and close open change requests first.",
|
|
37
|
+
"cancel": "Cancel",
|
|
38
|
+
"changing": "Changing…",
|
|
39
|
+
"searchBranches": "Search branches…",
|
|
40
|
+
"loadingBranches": "Loading branches…",
|
|
41
|
+
"noBranches": "No matching branch.",
|
|
42
|
+
"moreBranches": "{count} more. Type to filter."
|
|
43
|
+
},
|
|
14
44
|
"pooledSecrets": {
|
|
15
45
|
"saveChanges": "Save changes",
|
|
16
46
|
"unsavedChanges": "Unsaved key changes",
|
|
@@ -372,6 +402,60 @@ const catalog = {
|
|
|
372
402
|
}
|
|
373
403
|
}
|
|
374
404
|
},
|
|
405
|
+
"git": {
|
|
406
|
+
"updateFailed": "Failed to update repository",
|
|
407
|
+
"unreachable": "Kortix can't reach this repository",
|
|
408
|
+
"repository": "Repository",
|
|
409
|
+
"hostedOn": "Hosted on {provider}.",
|
|
410
|
+
"storedIn": "Stored in {provider}.",
|
|
411
|
+
"notLinked": "Not linked yet",
|
|
412
|
+
"status": "Status",
|
|
413
|
+
"statuses": {
|
|
414
|
+
"connected": "Connected",
|
|
415
|
+
"attention": "Needs attention",
|
|
416
|
+
"connecting": "Connecting…",
|
|
417
|
+
"disconnected": "Not connected"
|
|
418
|
+
},
|
|
419
|
+
"baseBranch": "Base branch",
|
|
420
|
+
"baseBranchDescription": "New sessions and change requests start from this branch.",
|
|
421
|
+
"saving": "Saving…",
|
|
422
|
+
"manifestFile": "Manifest file",
|
|
423
|
+
"manifestDescription": "The file in your repository that tells Kortix how to run this project.",
|
|
424
|
+
"learnMore": "Learn more",
|
|
425
|
+
"localTitle": "Work on this locally",
|
|
426
|
+
"localDescription": "Put a copy of this project on your own computer and edit it in your own editor.",
|
|
427
|
+
"installTitle": "Install the Kortix command line",
|
|
428
|
+
"installHint": "A one-time setup on macOS or Linux. Skip this if you already have it.",
|
|
429
|
+
"installCommand": "Install command",
|
|
430
|
+
"cloneTitle": "Copy the project to your computer",
|
|
431
|
+
"cloneHint": "Downloads the code into a new folder and links that folder to this project.",
|
|
432
|
+
"cloneCommand": "Clone command",
|
|
433
|
+
"setupTitle": "Finish setup inside the new folder",
|
|
434
|
+
"setupHint": "Writes the local config, then fetches this project's secrets so the code can run.",
|
|
435
|
+
"setupCommand": "Setup command",
|
|
436
|
+
"secretsCommand": "Secrets command",
|
|
437
|
+
"ownClientTitle": "Use your own Git client",
|
|
438
|
+
"ownClientDescription": "Clone with plain <code>git</code> instead of the Kortix command line.",
|
|
439
|
+
"cloneAddressDescription": "Clone from this address with any Git client. Kortix signs the request for you, so there is no access token to create, paste, or keep on your machine.",
|
|
440
|
+
"cloneAddress": "Clone address",
|
|
441
|
+
"peopleTitle": "People with access",
|
|
442
|
+
"peopleManagedDescription": "Invite someone by their GitHub username. GitHub emails them an invite to accept.",
|
|
443
|
+
"peopleExternalDescription": "Who can read and write this project’s repository.",
|
|
444
|
+
"externalGithubDescription": "Kortix did not create this repository, so it cannot add collaborators to it. Manage access from the repository settings on GitHub.",
|
|
445
|
+
"externalProviderDescription": "This project’s repository is hosted on {provider}, which does not support collaborator invites from Kortix. Manage access where the repository lives.",
|
|
446
|
+
"manageOnGithub": "Manage on GitHub",
|
|
447
|
+
"alreadyHasAccess": "@{username} already has access to this repo",
|
|
448
|
+
"inviteSent": "Invite sent to @{username} — they accept it on GitHub to get access",
|
|
449
|
+
"inviteFailed": "Failed to add collaborator",
|
|
450
|
+
"githubUsername": "GitHub username",
|
|
451
|
+
"accessLevel": "Access level",
|
|
452
|
+
"canEdit": "Can edit",
|
|
453
|
+
"canView": "Can view",
|
|
454
|
+
"invite": "Invite",
|
|
455
|
+
"title": "Git repo",
|
|
456
|
+
"loadFailed": "Could not load this project's repository",
|
|
457
|
+
"retry": "Retry"
|
|
458
|
+
},
|
|
375
459
|
"workspace": {
|
|
376
460
|
"updateFailed": "Failed to update project",
|
|
377
461
|
"iconUpdateFailed": "Failed to update project icon",
|
|
@@ -379,6 +463,9 @@ const catalog = {
|
|
|
379
463
|
"iconDescription": "Shown next to the project name.",
|
|
380
464
|
"name": "Project name",
|
|
381
465
|
"nameDescription": "Shown in the project switcher and anywhere this project is listed.",
|
|
466
|
+
"defaultEffort": "Default reasoning effort",
|
|
467
|
+
"defaultEffortDescription": "Applied to new prompts that carry no explicit effort pick, when the session's model supports it.",
|
|
468
|
+
"defaultEffortAutomatic": "Automatic",
|
|
382
469
|
"saving": "Saving…",
|
|
383
470
|
"archived": "Project archived",
|
|
384
471
|
"archiveFailed": "Failed to archive project",
|
|
@@ -398,7 +485,19 @@ const catalog = {
|
|
|
398
485
|
"access": "Access for everyone on the team — nobody can reach this project again"
|
|
399
486
|
},
|
|
400
487
|
"reassurance": "Git repositories you connected yourself are not deleted. Any code already pushed to them stays where it is.",
|
|
401
|
-
"keepWorkspace": "Keep project"
|
|
488
|
+
"keepWorkspace": "Keep project",
|
|
489
|
+
"transferWorkspace": "Transfer project",
|
|
490
|
+
"transferDescription": "Move this project — its sessions, files, settings and member access — to another organization.",
|
|
491
|
+
"transferTitle": "Transfer project",
|
|
492
|
+
"transferDialog": "Sessions, files and settings follow the project. System member roles follow; groups, pending invitations and custom roles must be granted again in the target organization. Recorded usage stays on this organization’s bill.",
|
|
493
|
+
"transferTargetLabel": "Target organization",
|
|
494
|
+
"transferTargetPlaceholder": "Choose an organization",
|
|
495
|
+
"transferLoadingTargets": "Loading organizations…",
|
|
496
|
+
"transferNoTargets": "You are not a member of any other organization.",
|
|
497
|
+
"transferMove": "Move project",
|
|
498
|
+
"transferMoveTo": "Move to {name}",
|
|
499
|
+
"transferSuccess": "Project transferred",
|
|
500
|
+
"transferFailed": "Transfer failed"
|
|
402
501
|
},
|
|
403
502
|
"sandbox": {
|
|
404
503
|
"states": {
|
|
@@ -645,6 +744,108 @@ const catalog = {
|
|
|
645
744
|
"revoked": "App access revoked",
|
|
646
745
|
"revokeFailed": "Could not revoke the app"
|
|
647
746
|
},
|
|
747
|
+
"featureFlags": {
|
|
748
|
+
"stability": {
|
|
749
|
+
"experimental": "Experimental",
|
|
750
|
+
"beta": "Beta",
|
|
751
|
+
"stable": "Stable"
|
|
752
|
+
},
|
|
753
|
+
"origin": {
|
|
754
|
+
"overridden": "Overridden for this project",
|
|
755
|
+
"defaultOn": "Default on",
|
|
756
|
+
"defaultOff": "Default off"
|
|
757
|
+
},
|
|
758
|
+
"search": "Search features",
|
|
759
|
+
"loadFailed": "Failed to load project",
|
|
760
|
+
"retry": "Retry",
|
|
761
|
+
"noMatches": "No matches for {query}.",
|
|
762
|
+
"emptyTitle": "No experimental features",
|
|
763
|
+
"emptyDescription": "This deployment exposes no per-project feature flags.",
|
|
764
|
+
"permission": "You need the project's settings permission to change a feature flag.",
|
|
765
|
+
"updateFailed": "Failed to update {key}",
|
|
766
|
+
"flags": {
|
|
767
|
+
"marketplace": {
|
|
768
|
+
"name": "Marketplace",
|
|
769
|
+
"description": "Browse and install skills from community and vendor registries. Sources, updates, and team scopes are still changing."
|
|
770
|
+
},
|
|
771
|
+
"connectors_api_discover": {
|
|
772
|
+
"name": "Connectors API Discover",
|
|
773
|
+
"description": "Browse direct API, MCP, GraphQL, CLI, and Postman integrations alongside optional OAuth apps."
|
|
774
|
+
},
|
|
775
|
+
"agentmail_email": {
|
|
776
|
+
"name": "AgentMail Email",
|
|
777
|
+
"description": "Assign AgentMail inboxes so incoming email threads can start and continue Kortix sessions."
|
|
778
|
+
},
|
|
779
|
+
"meta_agent": {
|
|
780
|
+
"name": "Meta Agent",
|
|
781
|
+
"description": "Add a coordinator agent that manages specialized sessions and multi-step work across the project."
|
|
782
|
+
},
|
|
783
|
+
"monitors": {
|
|
784
|
+
"name": "Monitors",
|
|
785
|
+
"description": "Run persistent watchers that observe logs, feeds, or APIs and start agent sessions from events."
|
|
786
|
+
},
|
|
787
|
+
"warm_sessions": {
|
|
788
|
+
"name": "Warm Sessions",
|
|
789
|
+
"description": "Keep one sandbox ready for instant session starts. The idle sandbox uses compute."
|
|
790
|
+
},
|
|
791
|
+
"secrets_egress": {
|
|
792
|
+
"name": "Network-Enforced Secrets",
|
|
793
|
+
"description": "Control which tools and destinations can receive project secrets."
|
|
794
|
+
},
|
|
795
|
+
"pooled_provider_secrets": {
|
|
796
|
+
"name": "Pooled Provider Secrets",
|
|
797
|
+
"description": "Members connect their own ChatGPT subscriptions and provider keys, share them when needed, and choose which ones each session uses."
|
|
798
|
+
},
|
|
799
|
+
"pi_harness": {
|
|
800
|
+
"name": "Pi Harness (in-sandbox)",
|
|
801
|
+
"description": "Run sessions on the pi harness inside the session sandbox instead of OpenCode. Off, `runtime: pi` in the manifest still selects pi."
|
|
802
|
+
},
|
|
803
|
+
"genui": {
|
|
804
|
+
"name": "Generative UI",
|
|
805
|
+
"description": "The agent may answer with cards, comparisons, charts, maps, and tabs instead of long text."
|
|
806
|
+
},
|
|
807
|
+
"reminders": {
|
|
808
|
+
"name": "Reminders",
|
|
809
|
+
"description": "Let agents and people schedule check-ins on a session, once or on repeat. Each fire re-prompts that session. Adds the Reminders page, the session reminder chip, and `kortix remind`."
|
|
810
|
+
},
|
|
811
|
+
"us_region": {
|
|
812
|
+
"name": "US Region",
|
|
813
|
+
"description": "Run this project's new sessions in the US East region. A running session keeps its region until it restarts."
|
|
814
|
+
},
|
|
815
|
+
"notification_center": {
|
|
816
|
+
"name": "Notification Center",
|
|
817
|
+
"description": "Tell the people a session concerns (its prompter, its creator and its followers) through a bell inbox, browser push and email, and alert on failing triggers and reminders. Off: only the session creator's phone gets a session push, and an account owner's phone gets one when a trigger starts failing."
|
|
818
|
+
},
|
|
819
|
+
"event_triggers": {
|
|
820
|
+
"name": "App event triggers",
|
|
821
|
+
"description": "Start an agent when something happens in a connected app: a new email, a pull request, a calendar event."
|
|
822
|
+
},
|
|
823
|
+
"volumes": {
|
|
824
|
+
"name": "Volumes",
|
|
825
|
+
"description": "Shared Files for this project."
|
|
826
|
+
},
|
|
827
|
+
"drives": {
|
|
828
|
+
"name": "Drive",
|
|
829
|
+
"description": "Shared folders that stay in sync with sessions: your own drive, one per agent, and company drives an admin attaches to the project. New sessions see them under /drives."
|
|
830
|
+
},
|
|
831
|
+
"session_log_restore": {
|
|
832
|
+
"name": "Session log restore",
|
|
833
|
+
"description": "Rebuilds a session from its saved session log when its computer lost the conversation. Kortix enables it per project."
|
|
834
|
+
},
|
|
835
|
+
"connectors_v2": {
|
|
836
|
+
"name": "Connectors v2",
|
|
837
|
+
"description": "The MCP app catalog in Customize → Connectors, with sign-in that Kortix runs. With App event triggers on, Kortix checks these apps for new emails, files and items and starts an agent. Also adds Telegram as a channel. New connector accounts are no longer shared with the whole project by default."
|
|
838
|
+
},
|
|
839
|
+
"agent_rooms": {
|
|
840
|
+
"name": "Rooms",
|
|
841
|
+
"description": "Named chat rooms where agent sessions and people post and reply in threads. A session wakes when a message is addressed to it. Adds the Rooms page, `kortix rooms`, and `kortix peers`."
|
|
842
|
+
},
|
|
843
|
+
"goals": {
|
|
844
|
+
"name": "Goals",
|
|
845
|
+
"description": "Give an agent an objective it owns until an independent check confirms the outcome. It plans, works, waits, follows up with people, and keeps its state in a Goals folder in Files. Needs Volumes and Reminders on."
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
},
|
|
648
849
|
"upgrades": {
|
|
649
850
|
"available": "Available upgrades",
|
|
650
851
|
"readOnly": "Read-only — running an upgrade needs write access to this project.",
|
|
@@ -825,6 +1026,7 @@ const catalog = {
|
|
|
825
1026
|
},
|
|
826
1027
|
"sidebar": {
|
|
827
1028
|
"rooms": "Rooms",
|
|
1029
|
+
"goals": "Goals",
|
|
828
1030
|
"referAndEarn": "Refer & Earn",
|
|
829
1031
|
"referralShareTitle": "Refer Friends",
|
|
830
1032
|
"referralShareSubtitle": "Get 400 credits",
|
|
@@ -1259,6 +1461,28 @@ const catalog = {
|
|
|
1259
1461
|
"autoRetried": "Kortix automatically retried the model {count, plural, one {once} other {# times}} before this failure."
|
|
1260
1462
|
}
|
|
1261
1463
|
},
|
|
1464
|
+
"agents": {
|
|
1465
|
+
"grants": {
|
|
1466
|
+
"subagents": {
|
|
1467
|
+
"title": "Subagents",
|
|
1468
|
+
"description": "Agents this agent can start for a subtask.",
|
|
1469
|
+
"all": "Every subagent in this project, including ones added later.",
|
|
1470
|
+
"empty": "No subagents declared in this project yet."
|
|
1471
|
+
},
|
|
1472
|
+
"commands": {
|
|
1473
|
+
"title": "Commands",
|
|
1474
|
+
"description": "Slash commands this agent can run.",
|
|
1475
|
+
"all": "Every command in this project, including ones added later.",
|
|
1476
|
+
"empty": "No commands registered in this project yet."
|
|
1477
|
+
},
|
|
1478
|
+
"extensions": {
|
|
1479
|
+
"title": "Extensions",
|
|
1480
|
+
"description": "Plugins and packages a session of this agent loads.",
|
|
1481
|
+
"all": "Every extension in this project, including ones added later.",
|
|
1482
|
+
"empty": "No extensions registered in this project yet."
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
},
|
|
1262
1486
|
"threads": {
|
|
1263
1487
|
"title": "Threads",
|
|
1264
1488
|
"newThread": "New Thread",
|
|
@@ -1603,6 +1827,17 @@ const catalog = {
|
|
|
1603
1827
|
"noOutput": "No output"
|
|
1604
1828
|
}
|
|
1605
1829
|
},
|
|
1830
|
+
"agentApps": {
|
|
1831
|
+
"title": "Apps",
|
|
1832
|
+
"description": "Kortix Apps this agent may open when the App's access is restricted or private.",
|
|
1833
|
+
"manageApps": "All Apps",
|
|
1834
|
+
"allLabel": "Every App in this project, including ones added later.",
|
|
1835
|
+
"needsGrant": "Grant decides",
|
|
1836
|
+
"openWithoutGrant": "No grant needed",
|
|
1837
|
+
"grantNote": "The agent also needs project.app.read in its Kortix permissions.",
|
|
1838
|
+
"emptyTitle": "No Apps yet",
|
|
1839
|
+
"emptyDescription": "Apps deployed to this project appear here for the agent to pick from."
|
|
1840
|
+
},
|
|
1606
1841
|
"notifications": {
|
|
1607
1842
|
"title": "Notifications",
|
|
1608
1843
|
"description": "Manage how you receive notifications",
|
|
@@ -2355,7 +2590,7 @@ const catalog = {
|
|
|
2355
2590
|
"text1436469ad07f": "You are… Goal: … Steps: 1. …",
|
|
2356
2591
|
"text1447557b9c1e": "X-Tenant-Id",
|
|
2357
2592
|
"text1458e20a1642": "Optional. Kortix also deletes the local token on disconnect.",
|
|
2358
|
-
"text146b38e7fa80": "When
|
|
2593
|
+
"text146b38e7fa80": "When a model fails",
|
|
2359
2594
|
"text146cd06d5026": "Env:",
|
|
2360
2595
|
"text14736a2eb9f4": "Role",
|
|
2361
2596
|
"text147fb813a251": "Approval",
|
|
@@ -4199,7 +4434,7 @@ const catalog = {
|
|
|
4199
4434
|
"textaf7dbdd174f2": "Settings · General",
|
|
4200
4435
|
"textaf87e03f3626": "This removes the project default, fallback chain, and per-model overrides. The project will inherit account and platform routing.",
|
|
4201
4436
|
"textafb5023c3c05": "Changes applied",
|
|
4202
|
-
"textafb9890f7c72": "Where a request goes when
|
|
4437
|
+
"textafb9890f7c72": "Where a request goes when its model can't take it.",
|
|
4203
4438
|
"textafe03725909a": "behaves as for days.",
|
|
4204
4439
|
"textafe9444782eb": "Managed Email is not configured",
|
|
4205
4440
|
"textaff0766a5290": "Review",
|
|
@@ -4452,7 +4687,7 @@ const catalog = {
|
|
|
4452
4687
|
"textc3d2e79ebdd0": "Connectors",
|
|
4453
4688
|
"textc3e3a6edeaa5": "Terms and conditions",
|
|
4454
4689
|
"textc3e58a73609d": "Destructive",
|
|
4455
|
-
"textc3ecd3cd791b": "Tried in order after the
|
|
4690
|
+
"textc3ecd3cd791b": "Tried in order after the model a request names.",
|
|
4456
4691
|
"textc3f282c05f3f": "policies approval block require_approval rules tools connector guardrails",
|
|
4457
4692
|
"textc3f7bdf537c4": "req",
|
|
4458
4693
|
"textc4141f554a0c": "Loading sessions…",
|
|
@@ -5598,18 +5833,6 @@ const catalog = {
|
|
|
5598
5833
|
"expiryNever": "Never",
|
|
5599
5834
|
"expiryDays": "{count, plural, one {# day} other {# days}}"
|
|
5600
5835
|
},
|
|
5601
|
-
"publicTranscriptShare": {
|
|
5602
|
-
"sectionTitle": "Public link",
|
|
5603
|
-
"sectionDescription": "Anyone with the link can read this conversation without signing in.",
|
|
5604
|
-
"create": "Create public link",
|
|
5605
|
-
"revokeDescription": "The conversation stops loading for everyone with the link. You can create a new link afterwards.",
|
|
5606
|
-
"rowMeta": "Read-only conversation",
|
|
5607
|
-
"unavailable": "This conversation is temporarily unavailable.",
|
|
5608
|
-
"unavailableDescription": "The conversation could not be read right now. Try again in a moment.",
|
|
5609
|
-
"loadFailedDescription": "The conversation could not be loaded.",
|
|
5610
|
-
"empty": "No messages yet",
|
|
5611
|
-
"savedCopy": "Saved copy from {date}"
|
|
5612
|
-
},
|
|
5613
5836
|
"approvalPage": {
|
|
5614
5837
|
"title": "Approve this {connector} action",
|
|
5615
5838
|
"expires": "Expires",
|
|
@@ -5701,6 +5924,12 @@ const catalog = {
|
|
|
5701
5924
|
"grant": "{names} {count, plural, one {is} other {are}} not in the {agent} agent's secrets. Open Customize → Agents → {agent} → Secrets and enable {count, plural, one {it} other {them}}.",
|
|
5702
5925
|
"allowlist": "{names} {count, plural, one {is} other {are}} outside this session's secrets. Start a new session to use {count, plural, one {it} other {them}}."
|
|
5703
5926
|
},
|
|
5927
|
+
"sessionEmbed": {
|
|
5928
|
+
"sectionTitle": "Embed",
|
|
5929
|
+
"sectionDescription": "For same-site pages only. Viewers must already be signed in with access to this session; signing in inside a cross-site iframe is not supported.",
|
|
5930
|
+
"copy": "Copy embed code",
|
|
5931
|
+
"copied": "Embed code copied"
|
|
5932
|
+
},
|
|
5704
5933
|
"autoComponentsSetupLinksSecretIntakeFormJsxTextDeliveryRuntime1760e931": "Delivery: runtime — the real value loads into the sandbox environment. Agent code can read it.",
|
|
5705
5934
|
"autoComponentsSetupLinksSecretIntakeFormJsxTextDeliveryConnectorb21e2055": "Delivery: connector — server-side only. The value never enters the sandbox environment.",
|
|
5706
5935
|
"autoComponentsSetupLinksSecretIntakeFormJsxTextDeliveryScopec3e2a686": "Delivery scope is unavailable. Ask the agent to confirm where this value will be used before saving.",
|
|
@@ -5735,6 +5964,11 @@ const catalog = {
|
|
|
5735
5964
|
"copied": "Copied {label}",
|
|
5736
5965
|
"copyFailed": "Could not copy to the clipboard"
|
|
5737
5966
|
},
|
|
5967
|
+
"repositoryAccess": {
|
|
5968
|
+
"label": "Project repository access",
|
|
5969
|
+
"enabled": "New sessions receive the project repository. Git permissions still apply. Existing sessions keep their access setting.",
|
|
5970
|
+
"disabled": "New sessions run without the project repository. They can still create files and use granted tools. Existing sessions keep their access setting."
|
|
5971
|
+
},
|
|
5738
5972
|
"customProvider": {
|
|
5739
5973
|
"intro": "Endpoints the catalogue does not carry.",
|
|
5740
5974
|
"add": "Add custom provider",
|
|
@@ -5766,7 +6000,12 @@ const catalog = {
|
|
|
5766
6000
|
"deleteTitle": "Delete this provider?",
|
|
5767
6001
|
"deleteBody": "{name} and its API key leave this project for every member, and sessions stop offering its models. This cannot be undone.",
|
|
5768
6002
|
"deleted": "Provider deleted",
|
|
5769
|
-
"deleteFailed": "Could not delete the provider"
|
|
6003
|
+
"deleteFailed": "Could not delete the provider",
|
|
6004
|
+
"readsImages": "Reads images",
|
|
6005
|
+
"reasoning": "Reasoning",
|
|
6006
|
+
"traitsHint": "Kortix reads these from the endpoint when it reports them. Turn them on when it does not.",
|
|
6007
|
+
"contextWindow": "{tokens} context",
|
|
6008
|
+
"contextDefault": "128K context (the endpoint reports none)"
|
|
5770
6009
|
},
|
|
5771
6010
|
"providerSheet": {
|
|
5772
6011
|
"inUse": "In use",
|
|
@@ -6819,6 +7058,10 @@ const catalog = {
|
|
|
6819
7058
|
"missing": "does not exist",
|
|
6820
7059
|
"listPlaceholder": "value 1, value 2"
|
|
6821
7060
|
},
|
|
7061
|
+
"triggerAutoPause": {
|
|
7062
|
+
"title": "Paused itself at its run limit",
|
|
7063
|
+
"description": "It ran at its hourly run limit for 2 hours in a row, so it stopped starting runs. Find what keeps firing it, then resume it."
|
|
7064
|
+
},
|
|
6822
7065
|
"featureGate": {
|
|
6823
7066
|
"enable": "Enable {name}",
|
|
6824
7067
|
"enabling": "Enabling…"
|
|
@@ -6918,6 +7161,96 @@ const catalog = {
|
|
|
6918
7161
|
"join": "Join",
|
|
6919
7162
|
"openRoom": "Open",
|
|
6920
7163
|
"gateDescription": "Turn on Rooms to let agent sessions and people of this project talk in named chat rooms."
|
|
7164
|
+
},
|
|
7165
|
+
"goals": {
|
|
7166
|
+
"title": "Goals",
|
|
7167
|
+
"gateDescription": "Agents own an objective until it is verifiably done: the goal lives in Files, a daily heartbeat wakes it, the agent chases people for what it needs, and an independent check closes it.",
|
|
7168
|
+
"empty": "No goals yet",
|
|
7169
|
+
"emptyHint": "Start one in a session: describe the outcome, for example \"make sure our old bank account is closed\". The agent creates the goal and it shows here.",
|
|
7170
|
+
"loadError": "Could not load goals. Try again.",
|
|
7171
|
+
"retry": "Try again",
|
|
7172
|
+
"needsYou": "Needs you",
|
|
7173
|
+
"open": "Open",
|
|
7174
|
+
"closed": "Closed",
|
|
7175
|
+
"waitingFor": "Waiting for: {title}",
|
|
7176
|
+
"criteria": "{met}/{total} criteria",
|
|
7177
|
+
"nextWake": "Next wake {time}",
|
|
7178
|
+
"noWake": "No wake scheduled",
|
|
7179
|
+
"heartbeat": "Heartbeat",
|
|
7180
|
+
"heartbeatPaused": "Paused",
|
|
7181
|
+
"lastWakeLabel": "Last wake",
|
|
7182
|
+
"progress": "Progress",
|
|
7183
|
+
"scope": {
|
|
7184
|
+
"company": "Company",
|
|
7185
|
+
"personal": "Only you"
|
|
7186
|
+
},
|
|
7187
|
+
"status": {
|
|
7188
|
+
"draft": "Draft",
|
|
7189
|
+
"active": "Active",
|
|
7190
|
+
"waiting_on_user": "Waiting on you",
|
|
7191
|
+
"waiting_external": "Waiting",
|
|
7192
|
+
"verifying": "Verifying",
|
|
7193
|
+
"done": "Done",
|
|
7194
|
+
"abandoned": "Abandoned"
|
|
7195
|
+
},
|
|
7196
|
+
"health": {
|
|
7197
|
+
"healthy": "Running",
|
|
7198
|
+
"attention": "Needs attention",
|
|
7199
|
+
"closed": "Closed"
|
|
7200
|
+
},
|
|
7201
|
+
"issue": {
|
|
7202
|
+
"no_heartbeat": "Nothing will wake this goal: its heartbeat reminder is missing.",
|
|
7203
|
+
"heartbeat_paused": "The heartbeat reminder is paused.",
|
|
7204
|
+
"heartbeat_failed": "The last wake failed: {error}",
|
|
7205
|
+
"missed_wake": "The last wake is overdue.",
|
|
7206
|
+
"ask_overdue": "An ask is past its due time.",
|
|
7207
|
+
"verification_stalled": "Verification started more than 24 hours ago.",
|
|
7208
|
+
"unreadable": "goal.json is missing or is not valid JSON."
|
|
7209
|
+
},
|
|
7210
|
+
"sessionChip": "Goal",
|
|
7211
|
+
"sessionRole": {
|
|
7212
|
+
"coordinator": "This session runs this goal.",
|
|
7213
|
+
"worker": "This session works on this goal.",
|
|
7214
|
+
"verifier": "This session verifies this goal."
|
|
7215
|
+
},
|
|
7216
|
+
"openGoal": "Open goal",
|
|
7217
|
+
"openSession": "Open main session",
|
|
7218
|
+
"openFolder": "Open folder",
|
|
7219
|
+
"back": "All goals",
|
|
7220
|
+
"healthTitle": "Health",
|
|
7221
|
+
"successCriteria": "Success criteria",
|
|
7222
|
+
"met": "Met",
|
|
7223
|
+
"notMet": "Not met",
|
|
7224
|
+
"items": "Items",
|
|
7225
|
+
"noItems": "No items yet.",
|
|
7226
|
+
"noCriteria": "No criteria yet: the agent writes them before the goal becomes active.",
|
|
7227
|
+
"kind": {
|
|
7228
|
+
"task": "Task",
|
|
7229
|
+
"ask": "Ask",
|
|
7230
|
+
"wait": "Wait"
|
|
7231
|
+
},
|
|
7232
|
+
"itemStatus": {
|
|
7233
|
+
"open": "open",
|
|
7234
|
+
"doing": "doing",
|
|
7235
|
+
"done": "done",
|
|
7236
|
+
"dropped": "dropped"
|
|
7237
|
+
},
|
|
7238
|
+
"due": "Due {time}",
|
|
7239
|
+
"sessions": "Sessions",
|
|
7240
|
+
"role": {
|
|
7241
|
+
"coordinator": "Main session",
|
|
7242
|
+
"worker": "Worker",
|
|
7243
|
+
"verifier": "Verifier"
|
|
7244
|
+
},
|
|
7245
|
+
"timeline": "Timeline",
|
|
7246
|
+
"verification": "Verification",
|
|
7247
|
+
"notes": "Notes",
|
|
7248
|
+
"log": "Log",
|
|
7249
|
+
"notFound": "This goal no longer exists."
|
|
7250
|
+
},
|
|
7251
|
+
"agentEditor": {
|
|
7252
|
+
"manage": "Manage",
|
|
7253
|
+
"overviewTitle": "Overview"
|
|
6921
7254
|
}
|
|
6922
7255
|
};
|
|
6923
7256
|
export default catalog;
|
|
@@ -13,6 +13,8 @@ export interface FileNode {
|
|
|
13
13
|
}
|
|
14
14
|
/** GET /file/content?path=<path> response */
|
|
15
15
|
export interface FileContent {
|
|
16
|
+
/** Git blob revision of the displayed text, used for conditional saves. */
|
|
17
|
+
revision?: string;
|
|
16
18
|
type: 'text' | 'binary';
|
|
17
19
|
content: string;
|
|
18
20
|
patch?: FilePatch;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** @internal Kortix apps only. No semver: it may change in any release. */
|
|
2
|
+
/**
|
|
3
|
+
* The shared vocabulary of the Goals surfaces (flag `goals`): the status chip,
|
|
4
|
+
* the health line, progress and "needs you". The Goals page, the sidebar row
|
|
5
|
+
* and the session header chip all read a goal through these, so a status or a
|
|
6
|
+
* health issue reads the same everywhere.
|
|
7
|
+
*/
|
|
8
|
+
import type { ProjectGoal, ProjectGoalDocument, ProjectGoalIssue, ProjectGoalItem, ProjectGoalStatus } from '@kortix/sdk';
|
|
9
|
+
export declare function GoalStatusBadge({ status }: {
|
|
10
|
+
status: ProjectGoalStatus | null | undefined;
|
|
11
|
+
}): import("react").JSX.Element | null;
|
|
12
|
+
/** Green: running. Orange: needs attention. Grey: closed. */
|
|
13
|
+
export declare function GoalHealthDot({ goal }: {
|
|
14
|
+
goal: Pick<ProjectGoal, 'health'>;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
/** One sentence per issue, for the health line and its tooltip. */
|
|
17
|
+
export declare function useGoalIssueText(): (issue: ProjectGoalIssue, goal: Pick<ProjectGoal, "heartbeat">) => string;
|
|
18
|
+
export declare function goalProgress(goal: ProjectGoalDocument | null): {
|
|
19
|
+
met: number;
|
|
20
|
+
total: number;
|
|
21
|
+
};
|
|
22
|
+
/** Open asks for a person (not the agent): what the goal waits on someone for. */
|
|
23
|
+
export declare function goalOpenAsks(goal: ProjectGoalDocument | null): ProjectGoalItem[];
|
|
24
|
+
/** The goal needs a person: an open ask, or a health issue. */
|
|
25
|
+
export declare function goalNeedsYou(goal: ProjectGoal): boolean;
|
|
26
|
+
/** "in 33 min", "2 hr ago", "Tue 09:00": the reminders time format. */
|
|
27
|
+
export declare function formatGoalTime(iso: string | null | undefined, locale: string, now: number): string;
|
|
28
|
+
export declare function goalHref(projectId: string, goal: Pick<ProjectGoal, 'scope' | 'slug'>): string | null;
|
|
29
|
+
/** The current time, re-read every 30 seconds: relative times and health stay current. */
|
|
30
|
+
export { useNow as useGoalClock } from '../reminders/use-refetch-after-fire.js';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { formatFireTime } from '../reminders/reminder-format.js';
|
|
4
|
+
import { useTranslations } from '../../i18n/index.js';
|
|
5
|
+
import { StatusBadge, StatusDot } from '../../primitives/status.js';
|
|
6
|
+
import { uiRoutes } from '../../lib/routes.js';
|
|
7
|
+
const STATUS_TONE = {
|
|
8
|
+
draft: 'neutral',
|
|
9
|
+
active: 'info',
|
|
10
|
+
waiting_on_user: 'warning',
|
|
11
|
+
waiting_external: 'neutral',
|
|
12
|
+
verifying: 'info',
|
|
13
|
+
done: 'success',
|
|
14
|
+
abandoned: 'neutral',
|
|
15
|
+
};
|
|
16
|
+
export function GoalStatusBadge({ status }) {
|
|
17
|
+
const t = useTranslations('goals');
|
|
18
|
+
if (!status)
|
|
19
|
+
return null;
|
|
20
|
+
return _jsx(StatusBadge, { tone: STATUS_TONE[status] ?? 'neutral', children: t(`status.${status}`) });
|
|
21
|
+
}
|
|
22
|
+
/** Green: running. Orange: needs attention. Grey: closed. */
|
|
23
|
+
export function GoalHealthDot({ goal }) {
|
|
24
|
+
const tone = goal.health.state === 'healthy' ? 'success' : goal.health.state === 'attention' ? 'warning' : 'neutral';
|
|
25
|
+
return _jsx(StatusDot, { tone: tone });
|
|
26
|
+
}
|
|
27
|
+
/** One sentence per issue, for the health line and its tooltip. */
|
|
28
|
+
export function useGoalIssueText() {
|
|
29
|
+
const t = useTranslations('goals');
|
|
30
|
+
return (issue, goal) => issue === 'heartbeat_failed'
|
|
31
|
+
? t('issue.heartbeat_failed', { error: goal.heartbeat?.last_error ?? '—' })
|
|
32
|
+
: t(`issue.${issue}`);
|
|
33
|
+
}
|
|
34
|
+
export function goalProgress(goal) {
|
|
35
|
+
const criteria = goal?.success_criteria ?? [];
|
|
36
|
+
return { met: criteria.filter((c) => c.met).length, total: criteria.length };
|
|
37
|
+
}
|
|
38
|
+
/** Open asks for a person (not the agent): what the goal waits on someone for. */
|
|
39
|
+
export function goalOpenAsks(goal) {
|
|
40
|
+
return (goal?.items ?? []).filter((i) => i.kind === 'ask' && i.status === 'open' && i.owner !== 'agent');
|
|
41
|
+
}
|
|
42
|
+
/** The goal needs a person: an open ask, or a health issue. */
|
|
43
|
+
export function goalNeedsYou(goal) {
|
|
44
|
+
return goal.health.state === 'attention' || (goal.health.state !== 'closed' && goalOpenAsks(goal.goal).length > 0);
|
|
45
|
+
}
|
|
46
|
+
/** "in 33 min", "2 hr ago", "Tue 09:00": the reminders time format. */
|
|
47
|
+
export function formatGoalTime(iso, locale, now) {
|
|
48
|
+
return iso ? formatFireTime(iso, locale, now) : '—';
|
|
49
|
+
}
|
|
50
|
+
export function goalHref(projectId, goal) {
|
|
51
|
+
const list = uiRoutes().goals(projectId);
|
|
52
|
+
return list ? `${list}/${goal.scope}/${encodeURIComponent(goal.slug)}` : null;
|
|
53
|
+
}
|
|
54
|
+
/** The current time, re-read every 30 seconds: relative times and health stay current. */
|
|
55
|
+
export { useNow as useGoalClock } from '../reminders/use-refetch-after-fire.js';
|
|
@@ -3,7 +3,13 @@ import type { QueryClient } from '@tanstack/react-query';
|
|
|
3
3
|
export declare function registerQueryClient(client: QueryClient): void;
|
|
4
4
|
export declare function getSharedQueryClient(): QueryClient | null;
|
|
5
5
|
/**
|
|
6
|
-
* Run `run` with the shared client
|
|
7
|
-
*
|
|
6
|
+
* Run `run` with the shared client now (if one is registered), and again with
|
|
7
|
+
* every DIFFERENT client registered later. Returns the unsubscribe.
|
|
8
|
+
*
|
|
9
|
+
* AuthProvider sits ABOVE ReactQueryProvider, and #10344 mounts the app shell
|
|
10
|
+
* one auth round trip sooner, so a caller can ask before any client exists.
|
|
11
|
+
* `ReactQueryProvider` registers during render, and React can discard that
|
|
12
|
+
* render (a hydration retry, a suspension, Strict Mode) and commit a second
|
|
13
|
+
* client: a caller that ran once would hold a client the app no longer reads.
|
|
8
14
|
*/
|
|
9
|
-
export declare function
|
|
15
|
+
export declare function onEachQueryClient(run: (client: QueryClient) => void): () => void;
|
|
@@ -8,27 +8,33 @@
|
|
|
8
8
|
* from the central reset helper.
|
|
9
9
|
*/
|
|
10
10
|
let sharedQueryClient = null;
|
|
11
|
-
|
|
11
|
+
/** `onEachQueryClient` subscribers. replica-local: one tab's app. */
|
|
12
|
+
const followers = new Set();
|
|
12
13
|
export function registerQueryClient(client) {
|
|
14
|
+
if (sharedQueryClient === client)
|
|
15
|
+
return;
|
|
13
16
|
sharedQueryClient = client;
|
|
14
|
-
|
|
15
|
-
// shell one auth round trip sooner, so `adoptDeviceCaches` can run before
|
|
16
|
-
// this registers. Flush anyone who asked for the client before it existed.
|
|
17
|
-
const pending = waiters;
|
|
18
|
-
waiters = [];
|
|
19
|
-
for (const run of pending)
|
|
17
|
+
for (const run of [...followers])
|
|
20
18
|
run(client);
|
|
21
19
|
}
|
|
22
20
|
export function getSharedQueryClient() {
|
|
23
21
|
return sharedQueryClient;
|
|
24
22
|
}
|
|
25
23
|
/**
|
|
26
|
-
* Run `run` with the shared client
|
|
27
|
-
*
|
|
24
|
+
* Run `run` with the shared client now (if one is registered), and again with
|
|
25
|
+
* every DIFFERENT client registered later. Returns the unsubscribe.
|
|
26
|
+
*
|
|
27
|
+
* AuthProvider sits ABOVE ReactQueryProvider, and #10344 mounts the app shell
|
|
28
|
+
* one auth round trip sooner, so a caller can ask before any client exists.
|
|
29
|
+
* `ReactQueryProvider` registers during render, and React can discard that
|
|
30
|
+
* render (a hydration retry, a suspension, Strict Mode) and commit a second
|
|
31
|
+
* client: a caller that ran once would hold a client the app no longer reads.
|
|
28
32
|
*/
|
|
29
|
-
export function
|
|
33
|
+
export function onEachQueryClient(run) {
|
|
34
|
+
followers.add(run);
|
|
30
35
|
if (sharedQueryClient)
|
|
31
36
|
run(sharedQueryClient);
|
|
32
|
-
|
|
33
|
-
|
|
37
|
+
return () => {
|
|
38
|
+
followers.delete(run);
|
|
39
|
+
};
|
|
34
40
|
}
|