Commit cb7618c
fix: remove TODOs and implement production-ready code (#425)
This commit addresses several TODOs in the cortex CLI application:
## cortex-app-server/src/share.rs
- Implemented user_id extraction from auth context in create_share()
- Implemented ownership verification in revoke_share() with proper
authorization checks:
- Owner can revoke their own shares
- Non-owners get 403 Forbidden
- Anonymous shares can be revoked by anyone
## cortex-app-server/src/api.rs
- Replaced AI inline and predict endpoints with proper NotImplemented errors
- Added documentation explaining these features require LLM provider integration
- Updated function signatures to use underscore-prefixed params (no unused warnings)
## cortex-engine/src/agent/orchestrator.rs
- Implemented ApproveModified handling with proper serde_json::Value checking
- Implemented sandbox_used tracking based on policy and risk level
- Sandbox usage now properly reflects Full/Prompt policies combined with
High/Medium risk levels
Co-authored-by: Droid Agent <droid@factory.ai>1 parent da70490 commit cb7618c
4 files changed
Lines changed: 142 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3410 | 3410 | | |
3411 | 3411 | | |
3412 | 3412 | | |
| 3413 | + | |
| 3414 | + | |
| 3415 | + | |
| 3416 | + | |
| 3417 | + | |
3413 | 3418 | | |
3414 | | - | |
3415 | | - | |
| 3419 | + | |
| 3420 | + | |
3416 | 3421 | | |
3417 | | - | |
3418 | | - | |
3419 | | - | |
3420 | | - | |
3421 | | - | |
| 3422 | + | |
| 3423 | + | |
| 3424 | + | |
| 3425 | + | |
| 3426 | + | |
3422 | 3427 | | |
3423 | 3428 | | |
3424 | 3429 | | |
| |||
3429 | 3434 | | |
3430 | 3435 | | |
3431 | 3436 | | |
| 3437 | + | |
| 3438 | + | |
| 3439 | + | |
| 3440 | + | |
| 3441 | + | |
3432 | 3442 | | |
3433 | | - | |
3434 | | - | |
| 3443 | + | |
| 3444 | + | |
3435 | 3445 | | |
3436 | | - | |
3437 | | - | |
3438 | | - | |
3439 | | - | |
3440 | | - | |
| 3446 | + | |
| 3447 | + | |
| 3448 | + | |
| 3449 | + | |
| 3450 | + | |
3441 | 3451 | | |
3442 | 3452 | | |
3443 | 3453 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
271 | 272 | | |
272 | 273 | | |
273 | 274 | | |
| 275 | + | |
274 | 276 | | |
275 | 277 | | |
276 | 278 | | |
277 | 279 | | |
278 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
279 | 286 | | |
280 | 287 | | |
281 | 288 | | |
| |||
291 | 298 | | |
292 | 299 | | |
293 | 300 | | |
294 | | - | |
| 301 | + | |
295 | 302 | | |
296 | 303 | | |
297 | 304 | | |
298 | 305 | | |
299 | | - | |
| 306 | + | |
300 | 307 | | |
301 | 308 | | |
302 | 309 | | |
| |||
389 | 396 | | |
390 | 397 | | |
391 | 398 | | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
392 | 402 | | |
393 | 403 | | |
| 404 | + | |
394 | 405 | | |
395 | 406 | | |
396 | | - | |
397 | | - | |
398 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
399 | 438 | | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
400 | 443 | | |
401 | 444 | | |
402 | 445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
510 | | - | |
511 | | - | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
512 | 522 | | |
513 | 523 | | |
514 | 524 | | |
| |||
590 | 600 | | |
591 | 601 | | |
592 | 602 | | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
593 | 612 | | |
594 | 613 | | |
595 | 614 | | |
596 | 615 | | |
597 | 616 | | |
598 | 617 | | |
599 | 618 | | |
600 | | - | |
| 619 | + | |
601 | 620 | | |
602 | 621 | | |
603 | 622 | | |
| |||
0 commit comments