Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
66e8f02
WIP: Change https://cardstack.com/base/ to @cardstack/base/ import map
backspace Mar 30, 2026
b7cfe4d
Fix build
backspace Mar 30, 2026
0efb64f
Remove superseded Webpack configuration
backspace Mar 30, 2026
5803089
Remove change to existing migration
backspace Mar 30, 2026
a499d96
Add lint autofixes
backspace Mar 30, 2026
6588672
Add missing import
backspace Mar 30, 2026
ed1dce2
Merge remote-tracking branch 'origin/main' into @cardstack/base-redux…
backspace Mar 30, 2026
ea9dda3
Add resolution before auth
backspace Mar 30, 2026
8634d15
Add resolution in another place
backspace Mar 30, 2026
451a45a
Remove incorrect migration
backspace Mar 30, 2026
fb329c2
Merge remote-tracking branch 'origin/main' into @cardstack/base-redux…
backspace Mar 31, 2026
9eb965d
Merge main and fix remaining issues
backspace Mar 31, 2026
d3ab592
Merge remote-tracking branch 'origin/main' into @cardstack/base-redux…
backspace Mar 31, 2026
1d53554
Fix migration script
backspace Mar 31, 2026
096370d
Add more replacements
backspace Mar 31, 2026
fc4415e
Add permissions migration
backspace Mar 31, 2026
871fa4a
Add lint autofixes
backspace Mar 31, 2026
09ac773
Update schema
backspace Mar 31, 2026
4554f52
Fix import order
backspace Mar 31, 2026
93a7208
Remove unused import
backspace Mar 31, 2026
b40b345
Replace new URL() with cardIdToURL() for prefix-form card IDs
backspace Mar 31, 2026
045bfe0
Replace new URL() with cardIdToURL() for module refs and card IDs
backspace Mar 31, 2026
ab0bd37
Fix import problems
backspace Mar 31, 2026
e7fb904
Add some test fixes
backspace Apr 1, 2026
eb58684
Add lint rule
backspace Apr 1, 2026
10908db
Add custom type
backspace Apr 1, 2026
c33bfde
Merge remote-tracking branch 'origin/main' into @cardstack/base-redux…
backspace Apr 1, 2026
280b8e5
Merge main: fix conflicts, replace new old base URLs, add no-css-posi…
backspace Apr 1, 2026
d09678f
Add rule documentation
backspace Apr 1, 2026
6afeae5
Merge remote-tracking branch 'origin/main' into @cardstack/base-redux…
backspace Apr 2, 2026
5640033
Merge remote-tracking branch 'origin/main' into @cardstack/base-redux…
backspace Apr 2, 2026
47dd454
Merge remote-tracking branch 'origin/main' into @cardstack/base-redux…
backspace Apr 7, 2026
1db1a66
Update Boxel lint plugin documentation
backspace Apr 7, 2026
f280ade
Add missing rule update
backspace Apr 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ lines.some((line) => !HEADING_RE.test(line));

## Base realm imports

- Only card definitions (files run through the card loader) can use static ESM imports from `https://cardstack.com/base/*`. Host-side modules must load the module at runtime via `loader.import(`${baseRealm.url}...`)`. Static value imports from the HTTPS specifier inside host code trigger build-time `webpackMissingModule` failures. Type imports are OK using static ESM syntax.
- Only card definitions (files run through the card loader) can use static ESM imports from `@cardstack/base/*`. Host-side modules must load the module at runtime via `loader.import(`${baseRealm.url}...`)`. Static value imports from the HTTPS specifier inside host code trigger build-time `webpackMissingModule` failures. Type imports are OK using static ESM syntax.

## Linear Ticket Process (Reusable)

Expand Down
2 changes: 2 additions & 0 deletions mise-tasks/dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#MISE description="Start full dev stack (realm server, workers, test realms)"
#MISE dir="packages/realm-server"

export PATH="$PATH:node_modules/.bin"

. "$(cd "$(dirname "$0")" && pwd)/lib/dev-common.sh"

WAIT_ON_TIMEOUT=7200000 NODE_NO_WARNINGS=1 start-server-and-test \
Expand Down
2 changes: 1 addition & 1 deletion mise-tasks/services/realm-server
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ LOW_CREDIT_THRESHOLD="${LOW_CREDIT_THRESHOLD:-2000}" \
\
--path='../base' \
--username='base_realm' \
--fromUrl='https://cardstack.com/base/' \
--fromUrl='@cardstack/base/' \
--toUrl="${REALM_BASE_URL}/base/" \
\
${START_CATALOG:+--path="${CATALOG_REALM_PATH}"} \
Expand Down
2 changes: 1 addition & 1 deletion mise-tasks/services/realm-server-base
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ NODE_ENV=development \
\
--path='../base' \
--username='base_realm' \
--fromUrl='https://cardstack.com/base/' \
--fromUrl='@cardstack/base/' \
--toUrl='http://localhost:4201/base/'
2 changes: 1 addition & 1 deletion mise-tasks/services/test-realms
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ NODE_ENV=test \
--username='test_realm' \
--fromUrl="${REALM_TEST_URL}/test/" \
--toUrl="${REALM_TEST_URL}/test/" \
--fromUrl='https://cardstack.com/base/' \
--fromUrl='@cardstack/base/' \
--toUrl="${REALM_BASE_URL}/base/"
2 changes: 1 addition & 1 deletion mise-tasks/services/worker
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ NODE_ENV=development \
--matrixURL="${MATRIX_URL_VAL}" \
--prerendererUrl="${PRERENDER_MGR_URL}" \
\
--fromUrl='https://cardstack.com/base/' \
--fromUrl='@cardstack/base/' \
--toUrl="${REALM_BASE_URL}/base/" \
\
${START_EXPERIMENTS:+--fromUrl="${REALM_BASE_URL}/experiments/"} \
Expand Down
2 changes: 1 addition & 1 deletion mise-tasks/services/worker-base
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ NODE_ENV=development \
--matrixURL="${MATRIX_URL_VAL}" \
--prerendererUrl="${PRERENDER_MGR_URL}" \
\
--fromUrl='https://cardstack.com/base/' \
--fromUrl='@cardstack/base/' \
--toUrl='http://localhost:4201/base/'
2 changes: 1 addition & 1 deletion mise-tasks/services/worker-test
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ NODE_ENV=test \
\
--fromUrl="${REALM_TEST_URL}/test/" \
--toUrl="${REALM_TEST_URL}/test/" \
--fromUrl='https://cardstack.com/base/' \
--fromUrl='@cardstack/base/' \
--toUrl="${REALM_BASE_URL}/base/" \
--fromUrl='@cardstack/skills/' \
--toUrl="${REALM_BASE_URL}/skills/"
2 changes: 1 addition & 1 deletion packages/ai-bot/lib/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { setTitle } from './set-title';
import type OpenAI from 'openai';

import * as Sentry from '@sentry/node';
import type { MatrixEvent as DiscreteMatrixEvent } from 'https://cardstack.com/base/matrix-event';
import type { MatrixEvent as DiscreteMatrixEvent } from '@cardstack/base/matrix-event';
import {
getPromptParts,
isRecognisedDebugCommand,
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-bot/lib/matrix/response-publisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
APP_BOXEL_HAS_CONTINUATION_CONTENT_KEY,
} from '@cardstack/runtime-common';
import { sendErrorEvent, sendMessageEvent } from '@cardstack/runtime-common/ai';
import type { CardMessageContent } from 'https://cardstack.com/base/matrix-event';
import type { CardMessageContent } from '@cardstack/base/matrix-event';
import ResponseEventData from './response-event-data';
import { logger } from '@cardstack/runtime-common';
import type { MatrixClient } from 'matrix-js-sdk';
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-bot/lib/set-title.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
EncodedCommandRequest,
CodePatchResultContent,
CardMessageContent,
} from 'https://cardstack.com/base/matrix-event';
} from '@cardstack/base/matrix-event';
import type { ChatCompletionMessageParam } from 'openai/resources';
import {
type OpenAIPromptMessage,
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-bot/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {
setTitle,
roomTitleAlreadySet,
} from './lib/set-title';
import type { MatrixEvent as DiscreteMatrixEvent } from 'https://cardstack.com/base/matrix-event';
import type { MatrixEvent as DiscreteMatrixEvent } from '@cardstack/base/matrix-event';
import * as Sentry from '@sentry/node';

import { saveUsageCost } from '@cardstack/billing/ai-billing';
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-bot/tests/chat-titling-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
setTitle,
shouldSetRoomTitle,
} from '../lib/set-title';
import type { MatrixEvent as DiscreteMatrixEvent } from 'https://cardstack.com/base/matrix-event';
import type { MatrixEvent as DiscreteMatrixEvent } from '@cardstack/base/matrix-event';
import {
APP_BOXEL_CODE_PATCH_RESULT_EVENT_TYPE,
APP_BOXEL_CODE_PATCH_RESULT_MSGTYPE,
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-bot/tests/history-construction-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { EventStatus, type IRoomEvent } from 'matrix-js-sdk';
import type {
CardMessageEvent,
MatrixEvent as DiscreteMatrixEvent,
} from 'https://cardstack.com/base/matrix-event';
} from '@cardstack/base/matrix-event';
import { FakeMatrixClient } from './helpers/fake-matrix-client';

module('constructHistory', (hooks) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-bot/tests/matrix-util-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { Method } from 'matrix-js-sdk';
import type {
CardMessageEvent,
MatrixEvent as DiscreteMatrixEvent,
} from 'https://cardstack.com/base/matrix-event';
} from '@cardstack/base/matrix-event';
import { APP_BOXEL_MESSAGE_MSGTYPE } from '@cardstack/runtime-common';
import { getRoomEvents, sendErrorEvent } from '@cardstack/runtime-common/ai';
import { OpenAIError } from 'openai/error';
Expand Down
32 changes: 16 additions & 16 deletions packages/ai-bot/tests/prompt-construction-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import type {
MatrixEvent as DiscreteMatrixEvent,
Tool,
CardMessageContent,
} from 'https://cardstack.com/base/matrix-event';
} from '@cardstack/base/matrix-event';
import { EventStatus } from 'matrix-js-sdk';
import type { CardDef } from 'https://cardstack.com/base/card-api';
import type { CardDef } from '@cardstack/base/card-api';
import { readFileSync } from 'fs-extra';
import * as path from 'path';
import { FakeMatrixClient } from './helpers/fake-matrix-client';
Expand Down Expand Up @@ -228,7 +228,7 @@ Current date and time: 2025-06-11T11:43:00.533Z
},
{
codeRef: {
module: 'https://cardstack.com/base/card-api',
module: '@cardstack/base/card-api',
name: 'CardDef',
},
fields: [],
Expand Down Expand Up @@ -287,7 +287,7 @@ File open in code editor: http://localhost:4201/experiments/author.gts
Inheritance chain:
1. Address from http://localhost:4201/experiments/author
Fields: street, city, state
2. CardDef from https://cardstack.com/base/card-api
2. CardDef from @cardstack/base/card-api
Selected text: lines 10-12 (1-based), columns 5-20 (1-based)
Note: Line numbers in selection refer to the original file. Attached file contents below show line numbers for reference.
Module inspector panel: preview
Expand Down Expand Up @@ -1931,7 +1931,7 @@ Attached Files (files with newer versions don't show their content):
text: JSON.stringify({
data: {
type: 'card',
id: 'https://cardstack.com/base/Skill/card-editing',
id: '@cardstack/base/Skill/card-editing',
attributes: {
instructions:
'- If the user wants the data they see edited, AND the patchCardInstance function is available, you MUST use the "patchCardInstance" function to make the change.\n- If the user wants the data they see edited, AND the patchCardInstance function is NOT available, you MUST ask the user to open the card and share it with you.\n- If you do not call patchCardInstance, the user will not see the change.\n- You can ONLY modify cards shared with you. If there is no patchCardInstance function or tool, then the user hasn\'t given you access.\n- NEVER tell the user to use patchCardInstance; you should always do it for them.\n- If the user wants to search for a card instance, AND the "searchCard" function is available, you MUST use the "searchCard" function to find the card instance.\nOnly recommend one searchCard function at a time.\nIf the user wants to edit a field of a card, you can optionally use "searchCard" to help find a card instance that is compatible with the field being edited before using "patchCardInstance" to make the change of the field.\n You MUST confirm with the user the correct choice of card instance that he intends to use based upon the results of the search.',
Expand Down Expand Up @@ -1977,7 +1977,7 @@ Attached Files (files with newer versions don't show their content):
assert.true(systemPromptText.includes(SKILL_INSTRUCTIONS_MESSAGE));
assert.true(
systemPromptText.includes(
'Skill (id: https://cardstack.com/base/Skill/card-editing, title: Card Editing):',
'Skill (id: @cardstack/base/Skill/card-editing, title: Card Editing):',
),
'includes skill title metadata when present',
);
Expand Down Expand Up @@ -2010,7 +2010,7 @@ Attached Files (files with newer versions don't show their content):
text: JSON.stringify({
data: {
type: 'card',
id: 'https://cardstack.com/base/Skill/card-editing',
id: '@cardstack/base/Skill/card-editing',
attributes: {
instructions:
'- If the user wants the data they see edited, AND the patchCardInstance function is available, you MUST use the "patchCardInstance" function to make the change.\n- If the user wants the data they see edited, AND the patchCardInstance function is NOT available, you MUST ask the user to open the card and share it with you.\n- If you do not call patchCardInstance, the user will not see the change.\n- You can ONLY modify cards shared with you. If there is no patchCardInstance function or tool, then the user hasn\'t given you access.\n- NEVER tell the user to use patchCardInstance; you should always do it for them.\n- If the user wants to search for a card instance, AND the "searchCard" function is available, you MUST use the "searchCard" function to find the card instance.\nOnly recommend one searchCard function at a time.\nIf the user wants to edit a field of a card, you can optionally use "searchCard" to help find a card instance that is compatible with the field being edited before using "patchCardInstance" to make the change of the field.\n You MUST confirm with the user the correct choice of card instance that he intends to use based upon the results of the search.',
Expand Down Expand Up @@ -2229,7 +2229,7 @@ Attached Files (files with newer versions don't show their content):
text: JSON.stringify({
data: {
type: 'card',
id: 'https://cardstack.com/base/Skill/card-editing',
id: '@cardstack/base/Skill/card-editing',
attributes: {
instructions:
'- If the user wants the data they see edited, AND the patchCardInstance function is available, you MUST use the "patchCardInstance" function to make the change.\n- If the user wants the data they see edited, AND the patchCardInstance function is NOT available, you MUST ask the user to open the card and share it with you.\n- If you do not call patchCardInstance, the user will not see the change.\n- You can ONLY modify cards shared with you. If there is no patchCardInstance function or tool, then the user hasn\'t given you access.\n- NEVER tell the user to use patchCardInstance; you should always do it for them.\n- If the user wants to search for a card instance, AND the "searchCard" function is available, you MUST use the "searchCard" function to find the card instance.\nOnly recommend one searchCard function at a time.\nIf the user wants to edit a field of a card, you can optionally use "searchCard" to help find a card instance that is compatible with the field being edited before using "patchCardInstance" to make the change of the field.\n You MUST confirm with the user the correct choice of card instance that he intends to use based upon the results of the search.',
Expand Down Expand Up @@ -2654,7 +2654,7 @@ Attached Files (files with newer versions don't show their content):
},
meta: {
adoptsFrom: {
module: 'https://cardstack.com/base/search-results',
module: '@cardstack/base/search-results',
name: 'SearchResults',
},
},
Expand Down Expand Up @@ -2694,7 +2694,7 @@ Attached Files (files with newer versions don't show their content):
);
assert.equal(result[5].role, 'tool');
assert.equal(result[5].tool_call_id, 'tool-call-id-1');
const expected = `Tool call executed, with result card: {"data":{"type":"card","attributes":{"title":"Search Results","description":"Here are the search results","results":[{"data":{"type":"card","id":"http://localhost:4201/drafts/Author/1","attributes":{"firstName":"Alice","lastName":"Enwunder","photo":null,"body":"Alice is a software engineer at Google.","description":null,"thumbnailURL":null},"meta":{"adoptsFrom":{"module":"../author","name":"Author"}}}}]},"meta":{"adoptsFrom":{"module":"https://cardstack.com/base/search-results","name":"SearchResults"}}}}.`;
const expected = `Tool call executed, with result card: {"data":{"type":"card","attributes":{"title":"Search Results","description":"Here are the search results","results":[{"data":{"type":"card","id":"http://localhost:4201/drafts/Author/1","attributes":{"firstName":"Alice","lastName":"Enwunder","photo":null,"body":"Alice is a software engineer at Google.","description":null,"thumbnailURL":null},"meta":{"adoptsFrom":{"module":"../author","name":"Author"}}}}]},"meta":{"adoptsFrom":{"module":"@cardstack/base/search-results","name":"SearchResults"}}}}.`;

assert.equal((result[5].content as string).trim(), expected.trim());
});
Expand Down Expand Up @@ -2835,7 +2835,7 @@ Attached Files (files with newer versions don't show their content):
text: JSON.stringify({
data: {
type: 'card',
id: 'https://cardstack.com/base/Skill/skill_card_v1',
id: '@cardstack/base/Skill/skill_card_v1',
attributes: {
instructions: 'Test skill instructions',
title: 'Test Skill',
Expand All @@ -2854,7 +2854,7 @@ Attached Files (files with newer versions don't show their content):
text: JSON.stringify({
data: {
type: 'card',
id: 'https://cardstack.com/base/Skill/skill_card_v2',
id: '@cardstack/base/Skill/skill_card_v2',
attributes: {
instructions: 'Test skill instructions with updated commands',
commands: [
Expand Down Expand Up @@ -3079,7 +3079,7 @@ Attached Files (files with newer versions don't show their content):
text: JSON.stringify({
data: {
type: 'card',
id: 'https://cardstack.com/base/Skill/card-editing',
id: '@cardstack/base/Skill/card-editing',
attributes: {
instructions:
'- If the user wants the data they see edited, AND the patchCardInstance function is available, you MUST use the "patchCardInstance" function to make the change.\n- If the user wants the data they see edited, AND the patchCardInstance function is NOT available, you MUST ask the user to open the card and share it with you.\n- If you do not call patchCardInstance, the user will not see the change.\n- You can ONLY modify cards shared with you. If there is no patchCardInstance function or tool, then the user hasn\'t given you access.\n- NEVER tell the user to use patchCardInstance; you should always do it for them.\n- If the user wants to search for a card instance, AND the "searchCard" function is available, you MUST use the "searchCard" function to find the card instance.\nOnly recommend one searchCard function at a time.\nIf the user wants to edit a field of a card, you can optionally use "searchCard" to help find a card instance that is compatible with the field being edited before using "patchCardInstance" to make the change of the field.\n You MUST confirm with the user the correct choice of card instance that he intends to use based upon the results of the search.',
Expand Down Expand Up @@ -3255,7 +3255,7 @@ Current date and time: 2025-06-11T11:43:00.533Z
text: JSON.stringify({
data: {
type: 'card',
id: 'https://cardstack.com/base/Skill/skill_card_v1',
id: '@cardstack/base/Skill/skill_card_v1',
attributes: {
instructions: 'Test skill instructions',
title: 'Test Skill',
Expand All @@ -3274,7 +3274,7 @@ Current date and time: 2025-06-11T11:43:00.533Z
text: JSON.stringify({
data: {
type: 'card',
id: 'https://cardstack.com/base/Skill/skill_card_v2',
id: '@cardstack/base/Skill/skill_card_v2',
attributes: {
instructions: 'Test skill instructions with updated commands',
commands: [
Expand Down Expand Up @@ -3425,7 +3425,7 @@ Current date and time: 2025-06-11T11:43:00.533Z
text: JSON.stringify({
data: {
type: 'card',
id: 'https://cardstack.com/base/Skill/skill_card_v1',
id: '@cardstack/base/Skill/skill_card_v1',
attributes: {
instructions: 'Test skill instructions',
title: 'Test Skill',
Expand Down
8 changes: 4 additions & 4 deletions packages/ai-bot/tests/resources/chats/added-skill.json
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@
"enabledSkillCards": [
{
"url": "mxc://mock-server/abc123",
"sourceUrl": "https://cardstack.com/base/Skill/card-editing",
"sourceUrl": "@cardstack/base/Skill/card-editing",
"contentType": "text/plain"
}
],
Expand All @@ -311,7 +311,7 @@
"enabledSkillCards": [
{
"url": "mxc://mock-server/abc123",
"sourceUrl": "https://cardstack.com/base/Skill/card-editing",
"sourceUrl": "@cardstack/base/Skill/card-editing",
"contentType": "text/plain"
},
{
Expand All @@ -330,7 +330,7 @@
"enabledSkillCards": [
{
"url": "mxc://mock-server/abc123",
"sourceUrl": "https://cardstack.com/base/Skill/card-editing"
"sourceUrl": "@cardstack/base/Skill/card-editing"
}
],
"disabledSkillCards": []
Expand All @@ -346,7 +346,7 @@
"enabledSkillCards": [
{
"url": "mxc://mock-server/abc123",
"sourceUrl": "https://cardstack.com/base/Skill/card-editing"
"sourceUrl": "@cardstack/base/Skill/card-editing"
}
],
"disabledSkillCards": []
Expand Down
Loading
Loading