opensoma 0.1.2 → 0.2.0

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.
Files changed (97) hide show
  1. package/dist/package.json +18 -2
  2. package/dist/src/client.d.ts +8 -0
  3. package/dist/src/client.d.ts.map +1 -1
  4. package/dist/src/client.js +123 -21
  5. package/dist/src/client.js.map +1 -1
  6. package/dist/src/commands/auth.d.ts +8 -0
  7. package/dist/src/commands/auth.d.ts.map +1 -1
  8. package/dist/src/commands/auth.js +35 -23
  9. package/dist/src/commands/auth.js.map +1 -1
  10. package/dist/src/commands/dashboard.d.ts.map +1 -1
  11. package/dist/src/commands/dashboard.js +1 -1
  12. package/dist/src/commands/dashboard.js.map +1 -1
  13. package/dist/src/commands/event.d.ts.map +1 -1
  14. package/dist/src/commands/event.js.map +1 -1
  15. package/dist/src/commands/helpers.d.ts.map +1 -1
  16. package/dist/src/commands/helpers.js +12 -2
  17. package/dist/src/commands/helpers.js.map +1 -1
  18. package/dist/src/commands/member.d.ts.map +1 -1
  19. package/dist/src/commands/member.js.map +1 -1
  20. package/dist/src/commands/mentoring.d.ts.map +1 -1
  21. package/dist/src/commands/mentoring.js +14 -5
  22. package/dist/src/commands/mentoring.js.map +1 -1
  23. package/dist/src/commands/notice.d.ts.map +1 -1
  24. package/dist/src/commands/notice.js.map +1 -1
  25. package/dist/src/commands/room.d.ts.map +1 -1
  26. package/dist/src/commands/room.js.map +1 -1
  27. package/dist/src/commands/team.d.ts.map +1 -1
  28. package/dist/src/commands/team.js.map +1 -1
  29. package/dist/src/errors.d.ts +8 -0
  30. package/dist/src/errors.d.ts.map +1 -0
  31. package/dist/src/errors.js +11 -0
  32. package/dist/src/errors.js.map +1 -0
  33. package/dist/src/formatters.d.ts.map +1 -1
  34. package/dist/src/formatters.js +54 -7
  35. package/dist/src/formatters.js.map +1 -1
  36. package/dist/src/http.d.ts +5 -0
  37. package/dist/src/http.d.ts.map +1 -1
  38. package/dist/src/http.js +140 -6
  39. package/dist/src/http.js.map +1 -1
  40. package/dist/src/index.d.ts +1 -0
  41. package/dist/src/index.d.ts.map +1 -1
  42. package/dist/src/index.js +1 -0
  43. package/dist/src/index.js.map +1 -1
  44. package/dist/src/shared/utils/mentoring-params.d.ts.map +1 -1
  45. package/dist/src/shared/utils/mentoring-params.js +4 -1
  46. package/dist/src/shared/utils/mentoring-params.js.map +1 -1
  47. package/dist/src/shared/utils/swmaestro.d.ts.map +1 -1
  48. package/dist/src/shared/utils/swmaestro.js.map +1 -1
  49. package/dist/src/token-extractor.d.ts +12 -0
  50. package/dist/src/token-extractor.d.ts.map +1 -1
  51. package/dist/src/token-extractor.js +83 -18
  52. package/dist/src/token-extractor.js.map +1 -1
  53. package/dist/src/types.d.ts +17 -0
  54. package/dist/src/types.d.ts.map +1 -1
  55. package/dist/src/types.js +6 -0
  56. package/dist/src/types.js.map +1 -1
  57. package/package.json +17 -1
  58. package/src/client.test.ts +112 -12
  59. package/src/client.ts +136 -36
  60. package/src/commands/auth.test.ts +55 -0
  61. package/src/commands/auth.ts +57 -33
  62. package/src/commands/dashboard.ts +5 -6
  63. package/src/commands/event.ts +5 -6
  64. package/src/commands/helpers.ts +21 -4
  65. package/src/commands/member.ts +4 -5
  66. package/src/commands/mentoring.ts +36 -19
  67. package/src/commands/notice.ts +4 -5
  68. package/src/commands/room.ts +4 -5
  69. package/src/commands/team.ts +4 -5
  70. package/src/credential-manager.test.ts +1 -1
  71. package/src/credential-manager.ts +1 -1
  72. package/src/errors.ts +10 -0
  73. package/src/formatters.test.ts +1 -1
  74. package/src/formatters.ts +91 -18
  75. package/src/http.test.ts +43 -7
  76. package/src/http.ts +174 -8
  77. package/src/index.ts +1 -0
  78. package/src/shared/utils/mentoring-params.test.ts +9 -4
  79. package/src/shared/utils/mentoring-params.ts +6 -3
  80. package/src/shared/utils/swmaestro.ts +2 -2
  81. package/src/token-extractor.test.ts +84 -8
  82. package/src/token-extractor.ts +118 -22
  83. package/src/types.test.ts +4 -2
  84. package/src/types.ts +6 -0
  85. package/.claude-plugin/README.md +0 -145
  86. package/.claude-plugin/plugin.json +0 -23
  87. package/.github/workflows/release.yml +0 -86
  88. package/.oxfmtrc.json +0 -9
  89. package/.oxlintrc.json +0 -4
  90. package/AGENTS.md +0 -78
  91. package/README.md +0 -252
  92. package/bun.lock +0 -297
  93. package/bunfig.toml +0 -2
  94. package/e2e/.gitkeep +0 -0
  95. package/skills/opensoma/SKILL.md +0 -345
  96. package/skills/opensoma/references/common-patterns.md +0 -182
  97. package/skills/opensoma/references/output-format.md +0 -130
@@ -1,345 +0,0 @@
1
- ---
2
- name: opensoma
3
- description: Interact with SWMaestro MyPage - manage mentoring sessions, reserve meeting rooms, view dashboard, team info, notices, and member profiles
4
- version: 0.1.2
5
- allowed-tools: Bash(opensoma:*)
6
- metadata:
7
- openclaw:
8
- requires:
9
- bins:
10
- - opensoma
11
- install:
12
- - kind: node
13
- package: opensoma
14
- bins: [opensoma]
15
- ---
16
-
17
- opensoma is a comprehensive command-line interface and software development kit designed to bridge the gap between AI agents and the SWMaestro MyPage platform (swmaestro.ai). By wrapping the platform's complex, server-rendered interface, opensoma provides a clean, programmatic way to manage mentoring sessions, reserve meeting rooms at the SWMaestro center, monitor dashboard metrics, access official notices, and retrieve team or member profiles. It is built to handle the intricacies of the SWMaestro ecosystem, allowing for seamless automation of common administrative and educational tasks within the program. Whether you are a mentor organizing a lecture or a mentee looking for the next learning opportunity, opensoma streamlines your interaction with the SWMaestro platform by providing a structured, JSON-based interface to a traditionally unstructured web environment.
18
-
19
- ### Important: CLI Only
20
-
21
- It is critical that you never attempt to scrape swmaestro.ai directly or initiate raw HTTP requests to the platform's endpoints. The SWMaestro MyPage is built on a traditional server-rendered Java/Spring architecture that does not expose a public REST API. The platform relies heavily on stateful session management, utilizing JSESSIONID cookies and CSRF (Cross-Site Request Fingerprinting) tokens for security. Every interaction requires these tokens to be correctly extracted from the HTML and passed back in subsequent requests. The opensoma CLI is specifically engineered to manage this entire lifecycle internally. It handles HTML parsing, session persistence, and token synchronization without requiring external intervention. Any attempt to bypass the CLI and make direct network calls will result in immediate failure due to missing session state, incorrect headers, or the inability to parse the complex, non-standard HTML structures that the platform returns. The CLI acts as a protective layer, ensuring that your interactions are both valid and secure according to the platform's requirements. Direct HTTP calls will fail because they require session cookies, CSRF tokens, and HTML parsing that the CLI manages.
22
-
23
- ### Key Concepts
24
-
25
- To effectively use opensoma, you must understand the following core concepts that govern its operation:
26
-
27
- - **Session-based Authentication**: Unlike modern APIs that use persistent tokens like JWTs or API keys, SWMaestro uses a stateful session model. When you log in, the server issues a JSESSIONID cookie that must be sent with every subsequent request. These sessions are temporary and will expire after a period of inactivity or when the server-side session is cleared. If a command fails with an authentication error, it is a signal that the session has likely expired and you must re-authenticate using the `auth login` or `auth extract` commands.
28
- - **HTML Scraping and Transformation**: Because there is no underlying JSON API, the CLI acts as a transformation layer. It fetches the server-rendered HTML pages, parses the DOM structure, and extracts the relevant data points to construct a clean JSON response. This process is sensitive to changes in the platform's UI, and the CLI is updated to maintain compatibility with the latest HTML structures. The CLI handles the heavy lifting of converting unstructured HTML into structured data.
29
- - **Room Reservation Slot System**: Meeting room reservations at the SWMaestro center are managed in 30-minute increments. The available window for reservations typically spans from 09:00 in the morning to 23:30 at night. When making a reservation for a block of time, you must specify each 30-minute slot individually (e.g., "14:00,14:30,15:00"). These slots must be consecutive to form a valid booking. Furthermore, the system enforces a maximum limit of 8 slots (equivalent to 4 hours) per single reservation to ensure fair access for all participants.
30
- - **Room ID Mapping**: Meeting rooms can be referenced by short name (e.g., A1) or numeric ID. The CLI resolves short names to numeric IDs automatically via `resolveRoomId`. Known room mappings:
31
- - **스페이스 A1**: 17 (Capacity: 4)
32
- - **스페이스 A2**: 18 (Capacity: 4)
33
- - **스페이스 A3**: 19 (Capacity: 4)
34
- - **스페이스 A4**: 20 (Capacity: 4)
35
- - **스페이스 A5**: 21 (Capacity: 4)
36
- - **스페이스 A6**: 22 (Capacity: 4)
37
- - **스페이스 A7**: 23 (Capacity: 4)
38
- - **스페이스 A8**: 24 (Capacity: 4)
39
- - **Mentoring Session Types**:
40
- - **자유 멘토링 (Public Mentoring)**: These are typically smaller, more intimate sessions focused on specific technical hurdles, project feedback, or career advice. They often have a limited number of attendees and are highly interactive. Any mentee can apply.
41
- - **멘토 특강 (Mentor Lecture)**: These are larger-scale educational events or seminars led by mentors. They are designed for a broader audience and may be held in larger seminar rooms or conducted online.
42
-
43
- ### Quick Start
44
-
45
- Get started with the most common workflows immediately:
46
-
47
- ```bash
48
- # 1. Authenticate your session
49
- # Use your SWMaestro email and password
50
- opensoma auth login --username user@example.com --password mypassword
51
-
52
- # 2. View your current status and upcoming events
53
- # The --pretty flag makes the JSON output readable for humans
54
- opensoma dashboard show --pretty
55
-
56
- # 3. Browse available mentoring sessions
57
- # This lists sessions currently open for registration
58
- opensoma mentoring list --status open --pretty
59
-
60
- # 4. Reserve a meeting room for a team session
61
- # First, check what's available on a specific date
62
- opensoma room list --date 2026-04-10 --pretty
63
- # Check specific slots for a room (e.g., Room 17)
64
- opensoma room available 17 --date 2026-04-10 --pretty
65
- # Make the reservation
66
- opensoma room reserve --room 17 --date 2026-04-10 --slots "14:00,14:30,15:00,15:30" --title "팀 주간 회의"
67
- ```
68
-
69
- ### Authentication
70
-
71
- The `auth` command group is the gateway to all other operations. It manages the lifecycle of your SWMaestro session.
72
-
73
- - `auth login`: This is the primary method for establishing a session. You must provide your SWMaestro email via `--username` and your password via `--password`. For security, you can also set these as environment variables (`OPENSOMA_USERNAME` and `OPENSOMA_PASSWORD`) to avoid leaving them in your shell history. The command will attempt to log in, retrieve the necessary cookies, and store them locally.
74
- - `auth extract`: A powerful alternative for users who are already logged into SWMaestro in their web browser. This command scans the cookie stores of supported Chromium-based browsers (including Google Chrome, Microsoft Edge, Brave, Arc, Vivaldi, and standard Chromium) to find an active `JSESSIONID`. If found, it imports the session into the CLI, allowing you to bypass the login step. This is particularly useful for avoiding repeated password entry.
75
- - `auth status`: Use this command to verify your current connection state. It returns a JSON object indicating whether credentials exist on your machine and, more importantly, whether the current session is still recognized as valid by the SWMaestro server. It also provides the timestamp of your last successful login and the username associated with the session.
76
- - `auth logout`: When you are finished with your session, use this command to securely remove all stored credentials, cookies, and session data from your local configuration directory. This ensures that no sensitive session information remains on the disk.
77
-
78
- All authentication data is stored in a JSON file located at `~/.config/opensoma/credentials.json`. This file is created with 0600 permissions, ensuring that only your user account can read or write to it.
79
-
80
- ### Memory
81
-
82
- To operate efficiently and provide a personalized experience, you should maintain a persistent memory of the information you discover. This allows you to avoid redundant network calls and provide more contextually aware assistance.
83
-
84
- **Reading Memory**: Every time you begin a new task involving opensoma, your first action should be to use the Read tool to check for the existence of `~/.config/opensoma/MEMORY.md`. This file serves as your long-term context for the user's SWMaestro environment. If the file is missing, you should proceed as if this is a first-time interaction, but be prepared to create it as you gather information.
85
-
86
- **Writing Memory**: You are responsible for keeping the memory file up-to-date. Whenever you encounter new, relevant information that isn't strictly transient (like a session cookie), you should update `MEMORY.md`. Key triggers for updating memory include:
87
- - Successfully running `dashboard show` for the first time (capture the user's name, their role—Mentor or Mentee—and their organization).
88
- - Discovering team details, such as the team name or the list of fellow members.
89
- - Identifying the numeric IDs for rooms that aren't part of the standard set, or rooms the user frequently mentions.
90
- - Learning user-specific preferences, such as a "usual" meeting room or a preferred time for mentoring.
91
- - Recording the IDs of notices or events that have already been summarized or acted upon.
92
-
93
- **What to Store**:
94
- - **User Profile**: Full name, role (멘토/연수생), organization, and position.
95
- - **Team Information**: Team name, member names, and mentor assignments.
96
- - **Room Registry**: A mapping of room names to their numeric IDs, along with notes on capacity or typical availability.
97
- - **Preferences**: Preferred output formats (e.g., always use --pretty), common reservation titles, or favorite mentoring topics.
98
- - **Processed Data**: IDs of notices or events that have already been summarized or acted upon.
99
- - **Aliases**: Any nicknames or shorthand the user uses for rooms, people, or sessions.
100
-
101
- **What NOT to Store**:
102
- - **Sensitive Credentials**: Never store passwords, JSESSIONID cookies, or CSRF tokens in the memory file. These are handled exclusively by the CLI's credential store.
103
- - **Transient State**: Do not store information that is likely to change within minutes, such as the current availability of a specific room slot.
104
- - **Large HTML Blobs**: Only store the extracted, relevant data, not the raw HTML content.
105
-
106
- **Handling Stale Data**: The SWMaestro environment is dynamic. If a piece of information in your memory (like a room ID or a mentoring session ID) results in a "Not Found" or "Invalid" error from the CLI, you must immediately remove or update that entry in `MEMORY.md` to prevent future errors.
107
-
108
- **Format/Example**:
109
- ```markdown
110
- # OpenSoma Memory
111
-
112
- ## User Profile
113
- - Name: 전수열
114
- - Role: 멘토
115
- - Organization: Indent
116
- - Position: CTO
117
-
118
- ## Team Details
119
- - Team Name: 김앤강
120
- - Members: 김철수, 강영희
121
-
122
- ## Room Registry
123
- - A1 (17): 4인실, 전수열 멘토가 선호하는 회의실
124
- - A5 (21): 4인실
125
-
126
- ## Preferences
127
- - Always use --pretty for output
128
- - Default reservation title: "멘토링 세션"
129
- - Preferred mentoring type: public (자유 멘토링)
130
- ```
131
-
132
- ### Commands
133
-
134
- #### Auth Commands
135
-
136
- Commands for managing your SWMaestro session and credentials.
137
-
138
- ```bash
139
- # Authenticate with email and password
140
- # Flags: --username, --password, --pretty
141
- opensoma auth login --username <username> --password <password> [--pretty]
142
-
143
- # Import an active session from your browser
144
- # Supports: Chrome, Edge, Brave, Arc, Vivaldi, Chromium
145
- opensoma auth extract [--pretty]
146
-
147
- # Check if you are currently authenticated and if the session is valid
148
- opensoma auth status [--pretty]
149
-
150
- # Clear all stored session data and log out
151
- opensoma auth logout [--pretty]
152
- ```
153
-
154
- #### Mentoring Commands
155
-
156
- Comprehensive management of mentoring sessions, from discovery to application.
157
-
158
- ```bash
159
- # List mentoring sessions with optional filters
160
- # --status: open (접수중), closed (마감)
161
- # --type: public (자유 멘토링), lecture (멘토 특강)
162
- # --search: Search by title (default), author, or content
163
- # "keyword" → title search
164
- # "title:keyword" → title search (explicit)
165
- # "author:이름" → author search
166
- # "author:@me" → my sessions only
167
- # "content:keyword" → content search
168
- # --page: Navigate through results (default: 1)
169
- opensoma mentoring list [--status <open|closed>] [--type <public|lecture>] [--search <query>] [--page <n>] [--pretty]
170
-
171
- # Retrieve full details for a specific mentoring session
172
- # Includes content (HTML), venue, and attendee counts
173
- opensoma mentoring get <id> [--pretty]
174
-
175
- # Create a new mentoring session (Available for Mentors only)
176
- # --title: The name of the session
177
- # --type: public or lecture
178
- # --date: YYYY-MM-DD
179
- # --start: HH:MM (24-hour format)
180
- # --end: HH:MM (24-hour format)
181
- # --venue: Location name (e.g., "스페이스 A1")
182
- # --max-attendees: Maximum number of participants
183
- # --reg-start: Registration start date (YYYY-MM-DD)
184
- # --reg-end: Registration end date (YYYY-MM-DD)
185
- # --content: Detailed description in HTML format
186
- opensoma mentoring create --title <title> --type <public|lecture> --date <YYYY-MM-DD> --start <HH:MM> --end <HH:MM> --venue <venue> [--max-attendees <n>] [--reg-start <YYYY-MM-DD>] [--reg-end <YYYY-MM-DD>] [--content <html>] [--pretty]
187
-
188
- # Delete a mentoring session you created
189
- opensoma mentoring delete <id> [--pretty]
190
-
191
- # Apply for a mentoring session (Available for Mentees only)
192
- opensoma mentoring apply <id> [--pretty]
193
-
194
- # Cancel an existing mentoring application
195
- # Requires applySn and qustnrSn, which can be found in mentoring history
196
- opensoma mentoring cancel --apply-sn <id> --qustnr-sn <id> [--pretty]
197
-
198
- # View your complete mentoring application history
199
- opensoma mentoring history [--page <n>] [--pretty]
200
- ```
201
-
202
- #### Room Commands
203
-
204
- Manage meeting room reservations at the SWMaestro center.
205
-
206
- ```bash
207
- # List all rooms and their availability for a specific date
208
- # --date: Target date (YYYY-MM-DD), defaults to today
209
- # --room: Filter by a specific room name (e.g., "A1")
210
- opensoma room list [--date <YYYY-MM-DD>] [--room <name>] [--pretty]
211
-
212
- # Check the availability of 30-minute slots for a specific room
213
- # Accepts short name (e.g., A1) or numeric ID (e.g., 17)
214
- opensoma room available <room> --date <YYYY-MM-DD> [--pretty]
215
-
216
- # Reserve a room for a specific set of time slots
217
- # --room: Room short name (e.g., A1) or numeric ID (e.g., 17)
218
- # --date: YYYY-MM-DD
219
- # --slots: Comma-separated list of 30-minute slots (e.g., "14:00,14:30,15:00")
220
- # --title: The purpose of the reservation
221
- # --attendees: Number of people expected
222
- # --notes: Additional information for the reservation
223
- opensoma room reserve --room <room> --date <YYYY-MM-DD> --slots <HH:MM,...> --title <title> [--attendees <n>] [--notes <text>] [--pretty]
224
- ```
225
-
226
- #### Dashboard Commands
227
-
228
- Get a high-level overview of your SWMaestro activity.
229
-
230
- ```bash
231
- # Show a summary of your profile, upcoming mentoring, and room reservations
232
- opensoma dashboard show [--pretty]
233
- ```
234
-
235
- #### Notice Commands
236
-
237
- Stay informed with official announcements from the SWMaestro center.
238
-
239
- ```bash
240
- # List all notices with pagination support
241
- opensoma notice list [--page <n>] [--pretty]
242
-
243
- # Read the full content of a specific notice
244
- opensoma notice get <id> [--pretty]
245
- ```
246
-
247
- #### Team Commands
248
-
249
- Access information about your team and its members.
250
-
251
- ```bash
252
- # Show your team name, member list, and current status
253
- opensoma team show [--pretty]
254
- ```
255
-
256
- #### Member Commands
257
-
258
- View and verify your personal profile data.
259
-
260
- ```bash
261
- # Show your email, phone number, organization, and other profile details
262
- opensoma member show [--pretty]
263
- ```
264
-
265
- #### Event Commands
266
-
267
- Manage your participation in SWMaestro-wide events.
268
-
269
- ```bash
270
- # List all upcoming events
271
- opensoma event list [--page <n>] [--pretty]
272
-
273
- # Get detailed information about a specific event
274
- opensoma event get <id> [--pretty]
275
-
276
- # Submit an application for an event
277
- opensoma event apply <id> [--pretty]
278
- ```
279
-
280
- ### Global Options
281
-
282
- Every command in the opensoma CLI supports the following global option:
283
-
284
- - `--pretty`: When this flag is present, the CLI will output the JSON response in a formatted, indented style. This is highly recommended for human users and for agents during the debugging phase. When the flag is omitted, the CLI outputs compact, single-line JSON. This compact format is the default and is optimized for AI agents to minimize token consumption and maximize context window efficiency. It allows for more data to be processed within a single turn.
285
-
286
- ### Output Format
287
-
288
- The CLI is designed to be "JSON-first." All successful operations return a JSON object or array. Errors are also returned as JSON but are directed to the standard error (stderr) stream. This consistent format makes it easy to parse and handle responses programmatically.
289
-
290
- Example of a successful compact response:
291
- `{"items":[{"id":123,"title":"Notice"}],"pagination":{"total":1}}`
292
-
293
- Example of an error response:
294
- `{"error":"Session expired. Please log in again."}`
295
-
296
- For a complete reference of the JSON schemas for every command, please consult the [references/output-format.md](references/output-format.md) document.
297
-
298
- ### Pagination
299
-
300
- To handle large datasets, commands that return lists (such as `mentoring list`, `notice list`, and `event list`) implement a standard pagination model. The response will include a `pagination` object with the following fields:
301
-
302
- - `total`: The total number of items available across all pages.
303
- - `currentPage`: The index of the page currently being returned.
304
- - `totalPages`: The total number of pages available.
305
-
306
- You can navigate through these pages by using the `--page <n>` option, where `<n>` is the desired page number starting from 1. This allows you to efficiently browse through hundreds of entries without overwhelming the system.
307
-
308
- ### Common Patterns
309
-
310
- For detailed workflow examples and best practices, refer to the [references/common-patterns.md](references/common-patterns.md) document. This includes patterns for daily schedule checks, creating mentoring sessions with room reservations, and handling common error scenarios.
311
-
312
- ### Troubleshooting
313
-
314
- 1. **Authentication Loop**: If you find yourself repeatedly getting "Session expired" errors even after logging in, check if your system clock is synchronized. Significant clock drift can cause session cookies to be treated as expired immediately.
315
- 2. **Browser Extraction Issues**: If `auth extract` fails, ensure that your browser is completely closed or that you have granted the necessary permissions for the CLI to access the browser's profile directory. On some systems, browser security features may block external access to cookie databases.
316
- 3. **Missing Data in Responses**: If a JSON response is missing fields you expect, it may be because that data isn't available for your specific user role (e.g., a Mentee cannot see certain Mentor-only fields).
317
- 4. **Command Not Found**: If the shell cannot find the `opensoma` command, ensure it is installed globally via `bun install -g opensoma` or `npm install -g opensoma`. Alternatively, use `npx opensoma` to run it without a global installation.
318
- 5. **Network Timeouts**: SWMaestro's servers can occasionally be slow or unresponsive. If a command hangs, try again after a few moments. The CLI does not currently implement aggressive retry logic.
319
- 6. **Empty Results**: If a list is empty, verify your authentication status with `auth status`. If valid, the list may simply have no items matching your criteria.
320
- 7. **HTML Parsing Errors**: If the platform's HTML structure changes, the CLI may fail to parse data correctly. In such cases, check for CLI updates or report the issue to the maintainers.
321
- 8. **CSRF Token Mismatch**: If you encounter errors related to CSRF tokens, try logging out and logging back in to refresh your session and tokens.
322
- 9. **Permission Denied**: Ensure that the user running the CLI has the necessary permissions to read and write to the `~/.config/opensoma` directory.
323
- 10. **Invalid Room IDs**: If a room reservation fails with an "Invalid Room ID" error, use `room list` to verify the correct numeric ID for the target room.
324
-
325
- ### Limitations
326
-
327
- - **HTML Parsing Fragility**: Because the CLI relies on parsing server-rendered HTML, any change to the SWMaestro website's layout or structure can potentially break specific commands. Always ensure you are using the latest version of the CLI.
328
- - **No Real-time Notifications**: The CLI is a request-response tool. It cannot "listen" for new notices or mentoring sessions in real-time. You must poll the relevant list commands to find updates.
329
- - **Attachment Handling**: The current version of the CLI does not support uploading or downloading file attachments (such as mentoring materials or notice downloads).
330
- - **Role Restrictions**: Many operations are strictly bound to your SWMaestro role. Mentors cannot apply for sessions, and Mentees cannot create them. The CLI will return an error if you attempt an unauthorized action.
331
- - **Reservation Race Conditions**: The SWMaestro room reservation system is highly competitive. A room slot that appears available when you run `room list` may be booked by another user by the time you run `room reserve`. Always attempt reservations as quickly as possible after checking availability.
332
- - **Undo Operations**: Write operations like `create`, `delete`, `reserve`, and `apply` are executed immediately and cannot be undone through the CLI. Double-check your parameters before executing these commands.
333
- - **Rate Limiting**: While the CLI doesn't enforce rate limits, the SWMaestro server might if it detects an unusual volume of requests. Use the CLI responsibly and avoid excessive polling.
334
- - **Platform Availability**: The CLI depends on the swmaestro.ai platform being online. If the platform is down for maintenance, the CLI will also be unavailable.
335
- - **Browser Compatibility**: The `auth extract` command is limited to Chromium-based browsers. Users of Firefox or Safari must use the `auth login` command.
336
- - **Data Precision**: Some data points extracted from HTML may be slightly less precise than those from a native API (e.g., relative timestamps like "2 hours ago" instead of exact ISO strings).
337
- - **Concurrent Sessions**: Logging in via the CLI may invalidate an existing session in your web browser, and vice versa, depending on the platform's session management policies.
338
- - **Environment Variables**: When using environment variables for authentication, ensure they are set correctly in your shell environment to avoid "Missing credentials" errors.
339
- - **JSON Schema Changes**: While the CLI aims for stability, the JSON response schemas may evolve over time to accommodate new features or changes in the underlying platform data.
340
- - **Error Message Clarity**: Some error messages from the server are passed through directly. If an error message is unclear, it may be a direct response from the SWMaestro platform's internal logic.
341
- - **Pagination Limits**: The server may impose limits on the maximum number of pages or items that can be retrieved in a single session.
342
- - **Venue Availability**: The list of venues for mentoring sessions is determined by the platform and may change based on the center's scheduling.
343
- - **Attendee Limits**: Mentoring sessions have strict attendee limits enforced by the platform. The CLI will return an error if you attempt to apply for a full session.
344
- - **Registration Windows**: Mentoring sessions and events have specific registration start and end dates. The CLI will not allow applications outside of these windows.
345
- - **Content Formatting**: Content retrieved from notices or mentoring sessions is in HTML format. Agents should be prepared to handle or strip HTML tags as needed.
@@ -1,182 +0,0 @@
1
- # Common Patterns
2
-
3
- ## Daily Schedule Check
4
-
5
- To get a comprehensive view of your daily activities, combine dashboard, mentoring, and room availability checks. This pattern is essential for staying on top of your SWMaestro commitments.
6
-
7
- ```bash
8
- # 1. Check dashboard for current status
9
- # This provides a summary of your profile, upcoming mentoring, and room reservations
10
- opensoma dashboard show --pretty
11
-
12
- # 2. List open mentoring sessions
13
- # This lists sessions currently open for registration, allowing you to find new opportunities
14
- opensoma mentoring list --status open --pretty
15
-
16
- # 3. Check room availability for today
17
- # This shows which meeting rooms are available for the current date
18
- opensoma room list --date $(date +%Y-%m-%d) --pretty
19
- ```
20
-
21
- ## Creating a Mentoring Session with Room
22
-
23
- When creating a mentoring session that requires a physical space, follow this workflow to ensure the room is secured first. This prevents the situation where a session is created but no room is available.
24
-
25
- ```bash
26
- # 1. Check room availability for the target date
27
- # This lists all rooms and their availability for the specified date
28
- opensoma room list --date 2026-04-15 --pretty
29
-
30
- # 2. Reserve the room (e.g., Room A1, ID 17)
31
- # This reserves the specified 30-minute slots for the room
32
- opensoma room reserve --room 17 --date 2026-04-15 --slots "14:00,14:30,15:00,15:30" --title "TypeScript 기초"
33
-
34
- # 3. Create the mentoring session using the reserved venue
35
- # This creates the mentoring session with the specified details and venue
36
- opensoma mentoring create \
37
- --title "TypeScript 기초 특강" \
38
- --type lecture \
39
- --date 2026-04-15 \
40
- --start 14:00 \
41
- --end 16:00 \
42
- --venue "스페이스 A1" \
43
- --max-attendees 8 \
44
- --reg-start 2026-04-10 \
45
- --reg-end 2026-04-14
46
- ```
47
-
48
- ## Listing My Mentoring Sessions
49
-
50
- When the user asks "show my lectures", "list my mentoring", "내 멘토링", or any variation of viewing sessions they created, use `--search "author:@me"`. This filters to only the sessions authored by the current user.
51
-
52
- ```bash
53
- # List mentoring sessions I created
54
- opensoma mentoring list --search "author:@me" --pretty
55
-
56
- # Combine with status and type filters
57
- opensoma mentoring list --search "author:@me" --status open --pretty
58
- opensoma mentoring list --search "author:@me" --type lecture --pretty
59
- ```
60
-
61
- ## Searching Mentoring Sessions
62
-
63
- Use `--search` to find mentoring sessions by title, author, or content. Title search is the default when no field prefix is given.
64
-
65
- ```bash
66
- # Search by title (default)
67
- opensoma mentoring list --search "OpenCode" --pretty
68
-
69
- # Search by author name
70
- opensoma mentoring list --search "author:전수열" --pretty
71
-
72
- # Search by content
73
- opensoma mentoring list --search "content:하네스" --pretty
74
-
75
- # Compose search with other filters
76
- opensoma mentoring list --search "OpenCode" --status open --type lecture --pretty
77
- ```
78
-
79
- ## Checking a Specific Mentoring Session
80
-
81
- To find and inspect a specific mentoring session, first list the sessions to find the ID, then retrieve the details. This is the standard way to get full information about a session.
82
-
83
- ```bash
84
- # 1. List sessions to find the target ID
85
- # This lists sessions with optional filters to narrow down the search
86
- opensoma mentoring list --pretty
87
-
88
- # 2. Get full details for the specific session ID
89
- # This retrieves the full content, venue, and attendee counts for the session
90
- opensoma mentoring get 9572 --pretty
91
- ```
92
-
93
- ## Finding Available Rooms
94
-
95
- For a specific date, you can find rooms with open morning or afternoon slots by listing all rooms and filtering the output. This is useful for planning team meetings or study sessions.
96
-
97
- ```bash
98
- # List all rooms for a specific date
99
- # This provides a comprehensive view of room availability for the entire day
100
- opensoma room list --date 2026-04-10 --pretty
101
- ```
102
-
103
- ## Viewing Team and Member Info
104
-
105
- Access your team and personal profile information. This is useful for verifying your status and seeing who else is on your team.
106
-
107
- ```bash
108
- # Show team members and status
109
- # This lists the members of your assigned team and their current status
110
- opensoma team show --pretty
111
-
112
- # Show your profile details
113
- # This displays your email, phone number, organization, and other profile details
114
- opensoma member show --pretty
115
- ```
116
-
117
- ## Checking Notices
118
-
119
- Stay updated with the latest official announcements from the SWMaestro center. This is important for keeping track of program updates and requirements.
120
-
121
- ```bash
122
- # List recent notices
123
- # This lists all notices with pagination support
124
- opensoma notice list --pretty
125
-
126
- # Read a specific notice by ID
127
- # This retrieves the full content of the specified notice
128
- opensoma notice get 36387 --pretty
129
- ```
130
-
131
- ## Error Handling Patterns
132
-
133
- When a command fails, follow these patterns to resolve the issue. These steps will help you quickly recover from common operational problems.
134
-
135
- - **Authentication Failure**: If you receive a "Not logged in" or "Session expired" error, re-authenticate immediately. This is the most common cause of command failure.
136
- ```bash
137
- opensoma auth login --username <email> --password <password>
138
- # OR
139
- opensoma auth extract
140
- ```
141
- - **Empty Results**: If a list is empty, verify your authentication status with `auth status`. If valid, the list may simply have no items matching your criteria. This is common for mentoring sessions or events that haven't started yet.
142
- - **Session Expired Mid-Workflow**: If a multi-step workflow fails halfway, re-authenticate and restart the process. Check the status of any write operations (like room reservations) before retrying to avoid duplicate actions.
143
- - **CSRF Token Issues**: If you encounter CSRF token errors, it often means your session is invalid. Re-authenticating will usually resolve this.
144
- - **Network Timeouts**: If a command hangs or times out, wait a few moments and try again. The SWMaestro servers can occasionally be slow.
145
-
146
- ## Best Practices
147
-
148
- - **Verify Auth**: Always check `auth status` before starting a multi-step workflow to ensure your session is valid. This saves time and prevents partial failures.
149
- - **Output Mode**: Use `--pretty` for human inspection and debugging. Omit the flag for programmatic use to save context space and improve processing speed.
150
- - **Memory Usage**: Store discovered IDs (rooms, mentoring sessions, notices) in `MEMORY.md` to avoid redundant lookups. This makes your interactions more efficient.
151
- - **Immediate Reservation**: For room reservations, check availability immediately before reserving. Slots can be taken quickly by other users, especially during peak times.
152
- - **Start with Dashboard**: Use `dashboard show` as the starting point for any task to get an overview of your current state and any pending actions.
153
- - **Check Role Restrictions**: Be aware of your role (Mentor or Mentee) and the operations available to you. The CLI will return an error if you attempt an unauthorized action.
154
- - **Use Environment Variables**: For security, use `OPENSOMA_USERNAME` and `OPENSOMA_PASSWORD` environment variables for authentication instead of passing them as flags.
155
-
156
- ## Anti-Patterns
157
-
158
- - **Caching Room Availability**: Do not cache room availability for long periods. It changes constantly as other users make reservations. Always get fresh data before making a booking.
159
- - **Assuming Persistent Sessions**: Do not assume sessions will last forever. They expire based on server-side policies. Be prepared to re-authenticate at any time.
160
- - **Hardcoding Room IDs**: Avoid hardcoding room IDs in your logic. Use `room list` to discover them dynamically, as IDs can occasionally change or new rooms may be added.
161
- - **Direct Scraping**: Never attempt to scrape swmaestro.ai directly. Always use the opensoma CLI to interact with the platform. The CLI handles the complex session and parsing logic for you.
162
- - **Ignoring Errors**: Do not ignore error responses from the CLI. They provide valuable information about why a command failed and how to fix it.
163
- - **Excessive Polling**: Avoid excessive polling of the SWMaestro servers. This can lead to rate limiting or temporary bans. Use the CLI responsibly.
164
- - **Storing Sensitive Data**: Never store passwords or session cookies in your memory file or other insecure locations. Use the CLI's built-in credential management.
165
- - **Skipping Auth Status**: Do not skip checking your authentication status before starting a complex task. It's better to find out early if you need to log in.
166
- - **Mixing Roles**: Do not attempt to perform actions that are not allowed for your role. Mentors should not try to apply for sessions, and Mentees should not try to create them.
167
- - **Ignoring Pagination**: When listing items, do not assume all results are on the first page. Check the pagination object and use the `--page` flag if necessary.
168
- - **Manual HTML Parsing**: Do not try to parse the HTML output of the CLI yourself. The CLI already provides structured JSON for this purpose.
169
- - **Hardcoding Dates**: Avoid hardcoding dates in your scripts. Use dynamic date generation (e.g., `$(date +%Y-%m-%d)`) to ensure your commands are always relevant.
170
- - **Neglecting Memory**: Do not ignore the `MEMORY.md` file. It is a valuable tool for maintaining context across different sessions and tasks.
171
- - **Overwriting Memory**: Be careful not to overwrite important information in `MEMORY.md`. Always read the file first and append or update as needed.
172
- - **Sharing Credentials**: Never share your `credentials.json` file or its contents with anyone. It contains sensitive session information that could be used to access your account.
173
- - **Committing Secrets**: Do not commit your `credentials.json` or any other files containing secrets to a public repository. Use `.gitignore` to prevent this.
174
- - **Using Outdated CLI**: Do not use an outdated version of the opensoma CLI. The SWMaestro platform changes frequently, and the CLI is updated to keep pace.
175
- - **Ignoring Troubleshooting**: If you encounter a problem, refer to the troubleshooting section in `SKILL.md` before seeking external help.
176
- - **Assuming Success**: Do not assume a command succeeded without checking the output and exit code. The CLI provides clear error messages when something goes wrong.
177
- - **Neglecting Pretty Print**: While compact JSON is better for agents, don't forget to use `--pretty` when you need to inspect the output yourself.
178
- - **Ignoring Venue Names**: When creating a mentoring session, ensure the venue name matches one of the recognized rooms to avoid confusion.
179
- - **Skipping Registration Windows**: Be mindful of registration start and end dates. Applying outside of these windows will result in an error.
180
- - **Ignoring Attendee Limits**: Do not try to apply for a session that is already full. Check the attendee counts in the session details first.
181
- - **Manual CSRF Handling**: Do not attempt to handle CSRF tokens manually. The CLI manages them automatically for every request.
182
- - **Direct HTTP Calls**: As a final reminder, never make direct HTTP calls to swmaestro.ai. Always use the opensoma CLI.
@@ -1,130 +0,0 @@
1
- # Output Format
2
-
3
- ## JSON (Default)
4
- All commands output compact JSON by default. Use the `--pretty` flag for indented, human-readable output. This compact format is optimized for AI agents to minimize token consumption and maximize context window efficiency.
5
-
6
- ## Response Schemas
7
-
8
- ### notice list
9
- ```json
10
- {"items":[{"id":36387,"title":"[센터] 연수센터 이용 규칙","author":"AI·SW마에스트로","createdAt":"2026.04.07 15:14:20"}],"pagination":{"total":11,"currentPage":1,"totalPages":2}}
11
- ```
12
-
13
- ### notice get
14
- ```json
15
- {"id":36387,"title":"[센터] 연수센터 이용 규칙","author":"AI·SW마에스트로","createdAt":"2026.04.07","content":"<p>HTML content...</p>"}
16
- ```
17
-
18
- ### mentoring list
19
- ```json
20
- {"items":[{"id":9482,"title":"초기 제품 개발 준비","type":"자유 멘토링","registrationPeriod":{"start":"2026-04-08","end":"2026-04-23"},"sessionDate":"2026-04-30","sessionTime":{"start":"19:00","end":"22:00"},"attendees":{"current":3,"max":4},"approved":true,"status":"접수중","author":"김태성","createdAt":"2026-04-08"}],"pagination":{"total":586,"currentPage":1,"totalPages":50}}
21
- ```
22
-
23
- ### mentoring get
24
- ```json
25
- {"id":9482,"title":"초기 제품 개발 준비","type":"자유 멘토링","registrationPeriod":{"start":"2026-04-08","end":"2026-04-23"},"sessionDate":"2026-04-30","sessionTime":{"start":"19:00","end":"22:00"},"attendees":{"current":0,"max":4},"approved":true,"status":"접수중","author":"김태성","createdAt":"2026-04-08","content":"<p>HTML content...</p>","venue":"스페이스 A5"}
26
- ```
27
-
28
- ### room list
29
- ```json
30
- [{"itemId":17,"name":"스페이스 A1","capacity":4,"availablePeriod":{"start":"2026-04-06","end":"2026-04-30"},"description":"스페이스 A1 회의실 : 4인","timeSlots":[{"time":"09:00","available":true},{"time":"09:30","available":true},{"time":"10:00","available":false}]}]
31
- ```
32
-
33
- ### room available
34
- ```json
35
- [{"time":"09:00","available":true},{"time":"09:30","available":true},{"time":"12:00","available":false}]
36
- ```
37
-
38
- ### dashboard show
39
- `team` is optional — omitted when user has no team assigned.
40
- ```json
41
- {"name":"전수열","role":"멘토","organization":"Indent","position":"","team":{"name":"김앤강","members":"김철수, 강영희","mentor":"전수열"},"mentoringSessions":[{"title":"게임 개발 AI 활용법","url":"/sw/mypage/mentoLec/view.do?qustnrSn=9582&menuNo=200046","status":"접수중"}],"roomReservations":[{"title":"OpenCode 하네스 만들어보기 (전수열)","url":"/sw/mypage/itemRent/view.do?rentId=17905&menuNo=200059","status":"예약완료"}]}
42
- ```
43
-
44
- ### member show
45
- ```json
46
- {"email":"devxoul@gmail.com","name":"전수열","gender":"남자","birthDate":"1995-01-14","phone":"01020609858","organization":"Indent","position":""}
47
- ```
48
-
49
- ### team show
50
- ```json
51
- {"teams":[{"name":"김앤강","memberCount":0,"joinStatus":"참여"}],"currentTeams":0,"maxTeams":100}
52
- ```
53
-
54
- ### auth status
55
- ```json
56
- {"authenticated":true,"valid":true,"username":null,"loggedInAt":"2026-04-09T16:07:56.247Z"}
57
- ```
58
-
59
- ### auth extract
60
- ```json
61
- {"ok":true,"extracted":true,"valid":true}
62
- ```
63
-
64
- ### event list
65
- ```json
66
- {"items":[],"pagination":{"total":0,"currentPage":1,"totalPages":1}}
67
- ```
68
-
69
- ### mentoring history
70
- ```json
71
- {"items":[],"pagination":{"total":0,"currentPage":1,"totalPages":1}}
72
- ```
73
-
74
- ### Error Responses
75
- All errors are written to stderr as JSON objects. This allows agents to distinguish between successful data retrieval and operational failures.
76
-
77
- Example of an authentication error:
78
- ```json
79
- {"error":"Not logged in. Run: opensoma auth login"}
80
- ```
81
-
82
- Example of a session expiration error:
83
- ```json
84
- {"error":"Session expired. Please log in again."}
85
- ```
86
-
87
- Example of a missing parameter error:
88
- ```json
89
- {"error":"Provide --username and --password or set OPENSOMA_USERNAME and OPENSOMA_PASSWORD"}
90
- ```
91
-
92
- Example of a CSRF token error:
93
- ```json
94
- {"error":"CSRF token not found. This may indicate a session issue or a change in the platform's structure."}
95
- ```
96
-
97
- Example of a browser extraction error:
98
- ```json
99
- {"error":"No SWMaestro session found in any browser. Ensure you are logged in at swmaestro.ai."}
100
- ```
101
-
102
- Example of a room reservation error:
103
- ```json
104
- {"error":"The selected room slots are no longer available. Please check availability and try again."}
105
- ```
106
-
107
- Example of a mentoring application error:
108
- ```json
109
- {"error":"You have already applied for this mentoring session or the session is full."}
110
- ```
111
-
112
- Example of a notice retrieval error:
113
- ```json
114
- {"error":"Notice not found. The ID may be invalid or the notice may have been removed."}
115
- ```
116
-
117
- Example of a team information error:
118
- ```json
119
- {"error":"Team information not found. Ensure you are assigned to a team."}
120
- ```
121
-
122
- Example of a member profile error:
123
- ```json
124
- {"error":"Member profile not found. Ensure your session is valid."}
125
- ```
126
-
127
- Example of an event retrieval error:
128
- ```json
129
- {"error":"Event not found. The ID may be invalid or the event may have ended."}
130
- ```