Skip to content

Commit d9d76d4

Browse files
authored
Merge pull request #7934 from neomjs/feat/issue-7933
feat: Fix misleading sessionId examples in Memory Core OpenAPI
2 parents e90ef11 + 8ebdda8 commit d9d76d4

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

ai/agents/dev.mjs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,16 @@ async function run() {
242242
await runGit(`git commit -m "feat: ${title}"`);
243243

244244
console.log('⬆️ Pushing branch...');
245-
await runGit(`git push -u origin ${branchName}`);
245+
// Construct authenticated URL for push
246+
// Format: https://x-access-token:<TOKEN>@github.com/owner/repo.git
247+
let remoteUrl = await runGit('git remote get-url origin');
248+
249+
// Strip existing auth if present (e.g. https://user:pass@...) and ensure .git suffix
250+
remoteUrl = remoteUrl.replace(/^https?:\/\/([^@]*@)?/, 'https://');
251+
252+
const authenticatedUrl = remoteUrl.replace('https://', `https://x-access-token:${process.env.GH_TOKEN}@`);
253+
254+
await runGit(`git push -u "${authenticatedUrl}" ${branchName}`);
246255

247256
console.log('🔀 Creating Pull Request...');
248257
const prBody = `Closes #${issueId}\n\n**AI Generated PR**\n${changes.map(c => `- ${c.filePath}: ${c.summary}`).join('\n')}`;

ai/mcp/server/memory-core/openapi.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ paths:
163163
description: The session ID to retrieve memories for
164164
schema:
165165
type: string
166-
example: "session_1696800000000"
166+
example: "550e8400-e29b-41d4-a716-446655440000"
167167
- name: limit
168168
in: query
169169
required: false
@@ -675,7 +675,7 @@ components:
675675
example: "mem_2025-10-08T12:00:00.000Z"
676676
sessionId:
677677
type: string
678-
example: "session_1696800000000"
678+
example: "550e8400-e29b-41d4-a716-446655440000"
679679
timestamp:
680680
type: string
681681
format: date-time
@@ -689,7 +689,7 @@ components:
689689
properties:
690690
sessionId:
691691
type: string
692-
example: "session_1696800000000"
692+
example: "550e8400-e29b-41d4-a716-446655440000"
693693
count:
694694
type: integer
695695
description: Number of memories returned
@@ -711,7 +711,7 @@ components:
711711
example: "mem_2025-10-08T12:00:00.000Z"
712712
sessionId:
713713
type: string
714-
example: "session_1696800000000"
714+
example: "550e8400-e29b-41d4-a716-446655440000"
715715
timestamp:
716716
type: string
717717
format: date-time
@@ -800,7 +800,7 @@ components:
800800
example: "summary_session_1696800000000"
801801
sessionId:
802802
type: string
803-
example: "session_1696800000000"
803+
example: "550e8400-e29b-41d4-a716-446655440000"
804804
timestamp:
805805
type: string
806806
format: date-time
@@ -903,7 +903,7 @@ components:
903903
sessionId:
904904
type: string
905905
description: Optional specific session to summarize. If omitted, all unsummarized sessions will be processed.
906-
example: "session_1696800000000"
906+
example: "550e8400-e29b-41d4-a716-446655440000"
907907
includeAll:
908908
type: boolean
909909
default: false
@@ -927,7 +927,7 @@ components:
927927
properties:
928928
sessionId:
929929
type: string
930-
example: "session_1696800000000"
930+
example: "550e8400-e29b-41d4-a716-446655440000"
931931
memoryCount:
932932
type: integer
933933
example: 15

0 commit comments

Comments
 (0)