@tinycloud/operations 0.5.5-beta.0 → 0.6.0-beta.1

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.
@@ -2335,6 +2335,3874 @@
2335
2335
  "dynamic": true
2336
2336
  }
2337
2337
  },
2338
+ {
2339
+ "id": "tinycloud.apps.context",
2340
+ "version": 1,
2341
+ "title": "Personal apps context",
2342
+ "description": "Personal records kept in the user's TinyCloud: weight, workouts, goals, todos, anything they track. Use it whenever the user asks to log, record, track, add, look up, list or sum up something about their life, even without mentioning TinyCloud. Call it first: it returns the rules, the user's local time and their apps.",
2343
+ "input": {
2344
+ "type": "object",
2345
+ "properties": {
2346
+ "timezone": {
2347
+ "type": "string"
2348
+ }
2349
+ },
2350
+ "additionalProperties": false,
2351
+ "$schema": "http://json-schema.org/draft-07/schema#"
2352
+ },
2353
+ "output": {
2354
+ "type": "object",
2355
+ "properties": {
2356
+ "rules": {
2357
+ "type": "string"
2358
+ },
2359
+ "now": {
2360
+ "type": "string"
2361
+ },
2362
+ "timezone": {
2363
+ "type": [
2364
+ "string",
2365
+ "null"
2366
+ ]
2367
+ },
2368
+ "catalog": {
2369
+ "type": "object",
2370
+ "properties": {
2371
+ "keys": {
2372
+ "type": "array",
2373
+ "items": {
2374
+ "type": "string"
2375
+ }
2376
+ },
2377
+ "records": {
2378
+ "type": "array",
2379
+ "items": {
2380
+ "type": "object",
2381
+ "properties": {
2382
+ "key": {
2383
+ "type": "string"
2384
+ },
2385
+ "value": {
2386
+ "type": "object",
2387
+ "additionalProperties": {
2388
+ "anyOf": [
2389
+ {
2390
+ "type": "null"
2391
+ },
2392
+ {
2393
+ "type": "boolean"
2394
+ },
2395
+ {
2396
+ "type": "number"
2397
+ },
2398
+ {
2399
+ "type": "string"
2400
+ },
2401
+ {
2402
+ "type": "array",
2403
+ "items": {
2404
+ "$ref": "#/properties/catalog/properties/records/items/properties/value/additionalProperties"
2405
+ }
2406
+ },
2407
+ {
2408
+ "type": "object",
2409
+ "additionalProperties": {
2410
+ "$ref": "#/properties/catalog/properties/records/items/properties/value/additionalProperties"
2411
+ }
2412
+ }
2413
+ ]
2414
+ }
2415
+ },
2416
+ "etag": {
2417
+ "type": "string",
2418
+ "minLength": 1
2419
+ }
2420
+ },
2421
+ "required": [
2422
+ "key",
2423
+ "value",
2424
+ "etag"
2425
+ ],
2426
+ "additionalProperties": false
2427
+ }
2428
+ }
2429
+ },
2430
+ "required": [
2431
+ "keys"
2432
+ ],
2433
+ "additionalProperties": false
2434
+ },
2435
+ "copy": {
2436
+ "type": "string",
2437
+ "enum": [
2438
+ "present",
2439
+ "expired",
2440
+ "none"
2441
+ ]
2442
+ }
2443
+ },
2444
+ "required": [
2445
+ "rules",
2446
+ "now",
2447
+ "timezone",
2448
+ "catalog",
2449
+ "copy"
2450
+ ],
2451
+ "additionalProperties": false,
2452
+ "$schema": "http://json-schema.org/draft-07/schema#"
2453
+ },
2454
+ "result": {
2455
+ "$schema": "http://json-schema.org/draft-07/schema#",
2456
+ "type": "object",
2457
+ "anyOf": [
2458
+ {
2459
+ "type": "object",
2460
+ "properties": {
2461
+ "status": {
2462
+ "const": "ok"
2463
+ },
2464
+ "operation": {
2465
+ "type": "object",
2466
+ "properties": {
2467
+ "operationId": {
2468
+ "type": "string",
2469
+ "const": "tinycloud.apps.context"
2470
+ },
2471
+ "operationVersion": {
2472
+ "type": "integer",
2473
+ "const": 1
2474
+ }
2475
+ },
2476
+ "required": [
2477
+ "operationId",
2478
+ "operationVersion"
2479
+ ],
2480
+ "additionalProperties": false
2481
+ },
2482
+ "context": {
2483
+ "type": "object",
2484
+ "properties": {
2485
+ "profile": {
2486
+ "type": "string",
2487
+ "minLength": 1
2488
+ },
2489
+ "host": {
2490
+ "type": "string",
2491
+ "minLength": 1
2492
+ },
2493
+ "posture": {
2494
+ "type": "string",
2495
+ "enum": [
2496
+ "owner-openkey",
2497
+ "delegate-session",
2498
+ "local-owner-key",
2499
+ "unauthenticated"
2500
+ ]
2501
+ },
2502
+ "operatorType": {
2503
+ "type": "string",
2504
+ "enum": [
2505
+ "human",
2506
+ "agent"
2507
+ ]
2508
+ },
2509
+ "principalDid": {
2510
+ "type": "string",
2511
+ "minLength": 1
2512
+ },
2513
+ "sessionDid": {
2514
+ "type": "string",
2515
+ "minLength": 1
2516
+ },
2517
+ "ownerDid": {
2518
+ "type": "string",
2519
+ "minLength": 1
2520
+ },
2521
+ "space": {
2522
+ "type": "string",
2523
+ "minLength": 1
2524
+ }
2525
+ },
2526
+ "required": [
2527
+ "profile",
2528
+ "host",
2529
+ "posture"
2530
+ ],
2531
+ "additionalProperties": false
2532
+ },
2533
+ "warnings": {
2534
+ "type": "array",
2535
+ "minItems": 1,
2536
+ "items": {
2537
+ "type": "object",
2538
+ "properties": {
2539
+ "code": {
2540
+ "const": "STORED_GRANT_SKIPPED"
2541
+ },
2542
+ "reason": {
2543
+ "type": "string",
2544
+ "enum": [
2545
+ "malformed",
2546
+ "unbound",
2547
+ "outside_request",
2548
+ "host_mismatch",
2549
+ "expired",
2550
+ "cid_mismatch",
2551
+ "authority_invalid",
2552
+ "proof_missing",
2553
+ "proof_invalid",
2554
+ "owner_mismatch",
2555
+ "audience_mismatch",
2556
+ "resources_mismatch",
2557
+ "unsupported",
2558
+ "activation_rejected",
2559
+ "activation_unavailable",
2560
+ "activation_unauthenticated",
2561
+ "invalid"
2562
+ ]
2563
+ },
2564
+ "grantCid": {
2565
+ "type": "string",
2566
+ "pattern": "^bafkr4i[a-z2-7]{52}$"
2567
+ }
2568
+ },
2569
+ "required": [
2570
+ "code",
2571
+ "reason"
2572
+ ],
2573
+ "additionalProperties": false
2574
+ }
2575
+ },
2576
+ "output": {
2577
+ "$ref": "#/$defs/output"
2578
+ }
2579
+ },
2580
+ "required": [
2581
+ "status",
2582
+ "operation",
2583
+ "context",
2584
+ "output"
2585
+ ],
2586
+ "additionalProperties": false
2587
+ },
2588
+ {
2589
+ "type": "object",
2590
+ "properties": {
2591
+ "status": {
2592
+ "const": "authority_required"
2593
+ },
2594
+ "operation": {
2595
+ "type": "object",
2596
+ "properties": {
2597
+ "operationId": {
2598
+ "type": "string",
2599
+ "const": "tinycloud.apps.context"
2600
+ },
2601
+ "operationVersion": {
2602
+ "type": "integer",
2603
+ "const": 1
2604
+ }
2605
+ },
2606
+ "required": [
2607
+ "operationId",
2608
+ "operationVersion"
2609
+ ],
2610
+ "additionalProperties": false
2611
+ },
2612
+ "context": {
2613
+ "type": "object",
2614
+ "properties": {
2615
+ "profile": {
2616
+ "type": "string",
2617
+ "minLength": 1
2618
+ },
2619
+ "host": {
2620
+ "type": "string",
2621
+ "minLength": 1
2622
+ },
2623
+ "posture": {
2624
+ "type": "string",
2625
+ "enum": [
2626
+ "owner-openkey",
2627
+ "delegate-session",
2628
+ "local-owner-key",
2629
+ "unauthenticated"
2630
+ ]
2631
+ },
2632
+ "operatorType": {
2633
+ "type": "string",
2634
+ "enum": [
2635
+ "human",
2636
+ "agent"
2637
+ ]
2638
+ },
2639
+ "principalDid": {
2640
+ "type": "string",
2641
+ "minLength": 1
2642
+ },
2643
+ "sessionDid": {
2644
+ "type": "string",
2645
+ "minLength": 1
2646
+ },
2647
+ "ownerDid": {
2648
+ "type": "string",
2649
+ "minLength": 1
2650
+ },
2651
+ "space": {
2652
+ "type": "string",
2653
+ "minLength": 1
2654
+ }
2655
+ },
2656
+ "required": [
2657
+ "profile",
2658
+ "host",
2659
+ "posture"
2660
+ ],
2661
+ "additionalProperties": false
2662
+ },
2663
+ "warnings": {
2664
+ "type": "array",
2665
+ "minItems": 1,
2666
+ "items": {
2667
+ "type": "object",
2668
+ "properties": {
2669
+ "code": {
2670
+ "const": "STORED_GRANT_SKIPPED"
2671
+ },
2672
+ "reason": {
2673
+ "type": "string",
2674
+ "enum": [
2675
+ "malformed",
2676
+ "unbound",
2677
+ "outside_request",
2678
+ "host_mismatch",
2679
+ "expired",
2680
+ "cid_mismatch",
2681
+ "authority_invalid",
2682
+ "proof_missing",
2683
+ "proof_invalid",
2684
+ "owner_mismatch",
2685
+ "audience_mismatch",
2686
+ "resources_mismatch",
2687
+ "unsupported",
2688
+ "activation_rejected",
2689
+ "activation_unavailable",
2690
+ "activation_unauthenticated",
2691
+ "invalid"
2692
+ ]
2693
+ },
2694
+ "grantCid": {
2695
+ "type": "string",
2696
+ "pattern": "^bafkr4i[a-z2-7]{52}$"
2697
+ }
2698
+ },
2699
+ "required": [
2700
+ "code",
2701
+ "reason"
2702
+ ],
2703
+ "additionalProperties": false
2704
+ }
2705
+ },
2706
+ "missing": {
2707
+ "type": "array",
2708
+ "minItems": 1,
2709
+ "items": {
2710
+ "$ref": "#/$defs/permissionEntry"
2711
+ }
2712
+ },
2713
+ "request": {
2714
+ "$ref": "#/$defs/permissionRequest"
2715
+ },
2716
+ "approval": {
2717
+ "type": "object",
2718
+ "properties": {
2719
+ "kind": {
2720
+ "const": "openkey"
2721
+ },
2722
+ "requestId": {
2723
+ "type": "string",
2724
+ "minLength": 1
2725
+ },
2726
+ "url": {
2727
+ "type": "string",
2728
+ "format": "uri"
2729
+ },
2730
+ "fallback": {
2731
+ "type": "string",
2732
+ "minLength": 1
2733
+ }
2734
+ },
2735
+ "required": [
2736
+ "kind",
2737
+ "requestId",
2738
+ "fallback"
2739
+ ],
2740
+ "additionalProperties": false
2741
+ },
2742
+ "retry": {
2743
+ "type": "object",
2744
+ "properties": {
2745
+ "operationId": {
2746
+ "type": "string",
2747
+ "minLength": 1
2748
+ },
2749
+ "operationVersion": {
2750
+ "type": "integer",
2751
+ "const": 1
2752
+ },
2753
+ "inputDigest": {
2754
+ "type": "string",
2755
+ "pattern": "^[a-f0-9]{64}$"
2756
+ },
2757
+ "safeInput": {
2758
+ "type": "object",
2759
+ "additionalProperties": true
2760
+ },
2761
+ "requiresCallerInput": {
2762
+ "type": "boolean"
2763
+ }
2764
+ },
2765
+ "required": [
2766
+ "operationId",
2767
+ "operationVersion",
2768
+ "inputDigest",
2769
+ "requiresCallerInput"
2770
+ ],
2771
+ "additionalProperties": false
2772
+ }
2773
+ },
2774
+ "required": [
2775
+ "status",
2776
+ "operation",
2777
+ "context",
2778
+ "missing",
2779
+ "request",
2780
+ "approval",
2781
+ "retry"
2782
+ ],
2783
+ "additionalProperties": false
2784
+ },
2785
+ {
2786
+ "type": "object",
2787
+ "properties": {
2788
+ "status": {
2789
+ "const": "setup_required"
2790
+ },
2791
+ "operation": {
2792
+ "type": "object",
2793
+ "properties": {
2794
+ "operationId": {
2795
+ "type": "string",
2796
+ "const": "tinycloud.apps.context"
2797
+ },
2798
+ "operationVersion": {
2799
+ "type": "integer",
2800
+ "const": 1
2801
+ }
2802
+ },
2803
+ "required": [
2804
+ "operationId",
2805
+ "operationVersion"
2806
+ ],
2807
+ "additionalProperties": false
2808
+ },
2809
+ "context": {
2810
+ "type": "object",
2811
+ "properties": {
2812
+ "profile": {
2813
+ "type": "string",
2814
+ "minLength": 1
2815
+ },
2816
+ "host": {
2817
+ "type": "string",
2818
+ "minLength": 1
2819
+ },
2820
+ "posture": {
2821
+ "type": "string",
2822
+ "enum": [
2823
+ "owner-openkey",
2824
+ "delegate-session",
2825
+ "local-owner-key",
2826
+ "unauthenticated"
2827
+ ]
2828
+ },
2829
+ "operatorType": {
2830
+ "type": "string",
2831
+ "enum": [
2832
+ "human",
2833
+ "agent"
2834
+ ]
2835
+ },
2836
+ "principalDid": {
2837
+ "type": "string",
2838
+ "minLength": 1
2839
+ },
2840
+ "sessionDid": {
2841
+ "type": "string",
2842
+ "minLength": 1
2843
+ },
2844
+ "ownerDid": {
2845
+ "type": "string",
2846
+ "minLength": 1
2847
+ },
2848
+ "space": {
2849
+ "type": "string",
2850
+ "minLength": 1
2851
+ }
2852
+ },
2853
+ "required": [
2854
+ "profile",
2855
+ "host",
2856
+ "posture"
2857
+ ],
2858
+ "additionalProperties": false
2859
+ },
2860
+ "warnings": {
2861
+ "type": "array",
2862
+ "minItems": 1,
2863
+ "items": {
2864
+ "type": "object",
2865
+ "properties": {
2866
+ "code": {
2867
+ "const": "STORED_GRANT_SKIPPED"
2868
+ },
2869
+ "reason": {
2870
+ "type": "string",
2871
+ "enum": [
2872
+ "malformed",
2873
+ "unbound",
2874
+ "outside_request",
2875
+ "host_mismatch",
2876
+ "expired",
2877
+ "cid_mismatch",
2878
+ "authority_invalid",
2879
+ "proof_missing",
2880
+ "proof_invalid",
2881
+ "owner_mismatch",
2882
+ "audience_mismatch",
2883
+ "resources_mismatch",
2884
+ "unsupported",
2885
+ "activation_rejected",
2886
+ "activation_unavailable",
2887
+ "activation_unauthenticated",
2888
+ "invalid"
2889
+ ]
2890
+ },
2891
+ "grantCid": {
2892
+ "type": "string",
2893
+ "pattern": "^bafkr4i[a-z2-7]{52}$"
2894
+ }
2895
+ },
2896
+ "required": [
2897
+ "code",
2898
+ "reason"
2899
+ ],
2900
+ "additionalProperties": false
2901
+ }
2902
+ },
2903
+ "setup": {
2904
+ "type": "object",
2905
+ "properties": {
2906
+ "kind": {
2907
+ "const": "secret_manager"
2908
+ },
2909
+ "action": {
2910
+ "const": "add_secret"
2911
+ },
2912
+ "url": {
2913
+ "type": "string",
2914
+ "format": "uri"
2915
+ },
2916
+ "names": {
2917
+ "type": "array",
2918
+ "minItems": 1,
2919
+ "maxItems": 10,
2920
+ "items": {
2921
+ "type": "string",
2922
+ "minLength": 1
2923
+ }
2924
+ },
2925
+ "scope": {
2926
+ "type": "string",
2927
+ "minLength": 1
2928
+ },
2929
+ "owner": {
2930
+ "type": "string",
2931
+ "minLength": 1
2932
+ },
2933
+ "secret": {
2934
+ "type": "object",
2935
+ "properties": {
2936
+ "name": {
2937
+ "type": "string",
2938
+ "minLength": 1
2939
+ },
2940
+ "scope": {
2941
+ "type": "string",
2942
+ "minLength": 1
2943
+ },
2944
+ "space": {
2945
+ "type": "string",
2946
+ "minLength": 1
2947
+ }
2948
+ },
2949
+ "required": [
2950
+ "name",
2951
+ "space"
2952
+ ],
2953
+ "additionalProperties": false
2954
+ },
2955
+ "message": {
2956
+ "type": "string",
2957
+ "minLength": 1
2958
+ }
2959
+ },
2960
+ "required": [
2961
+ "kind",
2962
+ "action",
2963
+ "url",
2964
+ "names",
2965
+ "owner",
2966
+ "secret",
2967
+ "message"
2968
+ ],
2969
+ "additionalProperties": false
2970
+ },
2971
+ "retry": {
2972
+ "type": "object",
2973
+ "properties": {
2974
+ "operationId": {
2975
+ "type": "string",
2976
+ "minLength": 1
2977
+ },
2978
+ "operationVersion": {
2979
+ "type": "integer",
2980
+ "const": 1
2981
+ },
2982
+ "inputDigest": {
2983
+ "type": "string",
2984
+ "pattern": "^[a-f0-9]{64}$"
2985
+ },
2986
+ "safeInput": {
2987
+ "type": "object",
2988
+ "additionalProperties": true
2989
+ },
2990
+ "requiresCallerInput": {
2991
+ "type": "boolean"
2992
+ }
2993
+ },
2994
+ "required": [
2995
+ "operationId",
2996
+ "operationVersion",
2997
+ "inputDigest",
2998
+ "requiresCallerInput"
2999
+ ],
3000
+ "additionalProperties": false
3001
+ }
3002
+ },
3003
+ "required": [
3004
+ "status",
3005
+ "operation",
3006
+ "context",
3007
+ "setup",
3008
+ "retry"
3009
+ ],
3010
+ "additionalProperties": false
3011
+ },
3012
+ {
3013
+ "type": "object",
3014
+ "properties": {
3015
+ "status": {
3016
+ "const": "error"
3017
+ },
3018
+ "operation": {
3019
+ "type": "object",
3020
+ "properties": {
3021
+ "operationId": {
3022
+ "type": "string",
3023
+ "const": "tinycloud.apps.context"
3024
+ },
3025
+ "operationVersion": {
3026
+ "type": "integer",
3027
+ "const": 1
3028
+ }
3029
+ },
3030
+ "required": [
3031
+ "operationId",
3032
+ "operationVersion"
3033
+ ],
3034
+ "additionalProperties": false
3035
+ },
3036
+ "context": {
3037
+ "type": "object",
3038
+ "properties": {
3039
+ "profile": {
3040
+ "type": "string",
3041
+ "minLength": 1
3042
+ },
3043
+ "host": {
3044
+ "type": "string",
3045
+ "minLength": 1
3046
+ },
3047
+ "posture": {
3048
+ "type": "string",
3049
+ "enum": [
3050
+ "owner-openkey",
3051
+ "delegate-session",
3052
+ "local-owner-key",
3053
+ "unauthenticated"
3054
+ ]
3055
+ },
3056
+ "operatorType": {
3057
+ "type": "string",
3058
+ "enum": [
3059
+ "human",
3060
+ "agent"
3061
+ ]
3062
+ },
3063
+ "principalDid": {
3064
+ "type": "string",
3065
+ "minLength": 1
3066
+ },
3067
+ "sessionDid": {
3068
+ "type": "string",
3069
+ "minLength": 1
3070
+ },
3071
+ "ownerDid": {
3072
+ "type": "string",
3073
+ "minLength": 1
3074
+ },
3075
+ "space": {
3076
+ "type": "string",
3077
+ "minLength": 1
3078
+ }
3079
+ },
3080
+ "required": [
3081
+ "profile",
3082
+ "host",
3083
+ "posture"
3084
+ ],
3085
+ "additionalProperties": false
3086
+ },
3087
+ "warnings": {
3088
+ "type": "array",
3089
+ "minItems": 1,
3090
+ "items": {
3091
+ "type": "object",
3092
+ "properties": {
3093
+ "code": {
3094
+ "const": "STORED_GRANT_SKIPPED"
3095
+ },
3096
+ "reason": {
3097
+ "type": "string",
3098
+ "enum": [
3099
+ "malformed",
3100
+ "unbound",
3101
+ "outside_request",
3102
+ "host_mismatch",
3103
+ "expired",
3104
+ "cid_mismatch",
3105
+ "authority_invalid",
3106
+ "proof_missing",
3107
+ "proof_invalid",
3108
+ "owner_mismatch",
3109
+ "audience_mismatch",
3110
+ "resources_mismatch",
3111
+ "unsupported",
3112
+ "activation_rejected",
3113
+ "activation_unavailable",
3114
+ "activation_unauthenticated",
3115
+ "invalid"
3116
+ ]
3117
+ },
3118
+ "grantCid": {
3119
+ "type": "string",
3120
+ "pattern": "^bafkr4i[a-z2-7]{52}$"
3121
+ }
3122
+ },
3123
+ "required": [
3124
+ "code",
3125
+ "reason"
3126
+ ],
3127
+ "additionalProperties": false
3128
+ }
3129
+ },
3130
+ "error": {
3131
+ "type": "object",
3132
+ "properties": {
3133
+ "code": {
3134
+ "type": "string",
3135
+ "enum": [
3136
+ "INPUT_INVALID",
3137
+ "OPERATION_NOT_FOUND",
3138
+ "OPERATION_VERSION_UNSUPPORTED",
3139
+ "PROFILE_NOT_FOUND",
3140
+ "PROFILE_POSTURE_NOT_ALLOWED",
3141
+ "PROFILE_OWNER_OPT_IN_REQUIRED",
3142
+ "PROFILE_MIGRATION_REQUIRED",
3143
+ "AUTH_REQUIRED",
3144
+ "PERMISSION_DENIED",
3145
+ "SESSION_NOT_FOUND",
3146
+ "PERMISSION_HINT_INVALID",
3147
+ "DELEGATION_ARTIFACT_INVALID",
3148
+ "DELEGATION_EXPIRED",
3149
+ "DELEGATION_AUDIENCE_MISMATCH",
3150
+ "DELEGATION_HOST_MISMATCH",
3151
+ "DELEGATION_REJECTED",
3152
+ "ENCRYPTION_NETWORK_UNRESOLVED",
3153
+ "NODE_UNREACHABLE",
3154
+ "NODE_ERROR",
3155
+ "STORAGE_QUOTA_EXCEEDED",
3156
+ "KV_NOT_FOUND",
3157
+ "KV_PRECONDITION_FAILED",
3158
+ "KV_CONFLICT",
3159
+ "KV_RESPONSE_TOO_LARGE",
3160
+ "SQL_QUERY_INVALID",
3161
+ "SQL_EXECUTION_FAILED",
3162
+ "SQL_RESULT_LIMIT_EXCEEDED",
3163
+ "SQL_VALUE_UNSAFE",
3164
+ "SECRET_READ_FAILED",
3165
+ "SECRET_DECRYPT_FAILED",
3166
+ "OUTPUT_INVALID",
3167
+ "INTERNAL_ERROR"
3168
+ ]
3169
+ },
3170
+ "message": {
3171
+ "type": "string",
3172
+ "minLength": 1
3173
+ },
3174
+ "retryable": {
3175
+ "type": "boolean"
3176
+ },
3177
+ "details": {
3178
+ "type": "object",
3179
+ "additionalProperties": true
3180
+ }
3181
+ },
3182
+ "required": [
3183
+ "code",
3184
+ "message",
3185
+ "retryable"
3186
+ ],
3187
+ "additionalProperties": false
3188
+ }
3189
+ },
3190
+ "required": [
3191
+ "status",
3192
+ "operation",
3193
+ "context",
3194
+ "error"
3195
+ ],
3196
+ "additionalProperties": false
3197
+ }
3198
+ ],
3199
+ "$defs": {
3200
+ "permissionEntry": {
3201
+ "type": "object",
3202
+ "properties": {
3203
+ "service": {
3204
+ "type": "string",
3205
+ "minLength": 1
3206
+ },
3207
+ "space": {
3208
+ "type": "string",
3209
+ "minLength": 1
3210
+ },
3211
+ "path": {
3212
+ "type": "string"
3213
+ },
3214
+ "actions": {
3215
+ "type": "array",
3216
+ "items": {
3217
+ "type": "string",
3218
+ "minLength": 1
3219
+ },
3220
+ "minItems": 1
3221
+ },
3222
+ "caveats": {
3223
+ "type": "array",
3224
+ "items": {
3225
+ "type": "object",
3226
+ "additionalProperties": {}
3227
+ }
3228
+ },
3229
+ "skipPrefix": {
3230
+ "type": "boolean"
3231
+ },
3232
+ "expiry": {
3233
+ "type": "string",
3234
+ "minLength": 1
3235
+ },
3236
+ "description": {
3237
+ "type": "string"
3238
+ }
3239
+ },
3240
+ "required": [
3241
+ "service",
3242
+ "path",
3243
+ "actions"
3244
+ ],
3245
+ "additionalProperties": false,
3246
+ "$schema": "http://json-schema.org/draft-07/schema#"
3247
+ },
3248
+ "permissionRequest": {
3249
+ "type": "object",
3250
+ "properties": {
3251
+ "kind": {
3252
+ "type": "string",
3253
+ "const": "tinycloud.auth.request"
3254
+ },
3255
+ "version": {
3256
+ "type": "number",
3257
+ "const": 1
3258
+ },
3259
+ "requestId": {
3260
+ "type": "string",
3261
+ "minLength": 1
3262
+ },
3263
+ "createdAt": {
3264
+ "type": "string",
3265
+ "format": "date-time"
3266
+ },
3267
+ "profile": {
3268
+ "type": "string",
3269
+ "minLength": 1
3270
+ },
3271
+ "posture": {
3272
+ "type": "string",
3273
+ "enum": [
3274
+ "owner-openkey",
3275
+ "delegate-session",
3276
+ "local-owner-key",
3277
+ "unauthenticated"
3278
+ ]
3279
+ },
3280
+ "operatorType": {
3281
+ "type": "string",
3282
+ "enum": [
3283
+ "human",
3284
+ "agent"
3285
+ ]
3286
+ },
3287
+ "host": {
3288
+ "type": "string",
3289
+ "minLength": 1
3290
+ },
3291
+ "sessionDid": {
3292
+ "type": "string",
3293
+ "minLength": 1
3294
+ },
3295
+ "ownerDid": {
3296
+ "type": "string",
3297
+ "minLength": 1
3298
+ },
3299
+ "spaceId": {
3300
+ "type": "string",
3301
+ "minLength": 1
3302
+ },
3303
+ "requestedExpiry": {
3304
+ "anyOf": [
3305
+ {
3306
+ "type": "string",
3307
+ "minLength": 1
3308
+ },
3309
+ {
3310
+ "type": "number"
3311
+ }
3312
+ ]
3313
+ },
3314
+ "requested": {
3315
+ "type": "array",
3316
+ "items": {
3317
+ "type": "object",
3318
+ "properties": {
3319
+ "service": {
3320
+ "type": "string",
3321
+ "minLength": 1
3322
+ },
3323
+ "space": {
3324
+ "type": "string",
3325
+ "minLength": 1
3326
+ },
3327
+ "path": {
3328
+ "type": "string"
3329
+ },
3330
+ "actions": {
3331
+ "type": "array",
3332
+ "items": {
3333
+ "type": "string",
3334
+ "minLength": 1
3335
+ },
3336
+ "minItems": 1
3337
+ },
3338
+ "caveats": {
3339
+ "type": "array",
3340
+ "items": {
3341
+ "type": "object",
3342
+ "additionalProperties": {}
3343
+ }
3344
+ },
3345
+ "skipPrefix": {
3346
+ "type": "boolean"
3347
+ },
3348
+ "expiry": {
3349
+ "type": "string",
3350
+ "minLength": 1
3351
+ },
3352
+ "description": {
3353
+ "type": "string"
3354
+ }
3355
+ },
3356
+ "required": [
3357
+ "service",
3358
+ "path",
3359
+ "actions"
3360
+ ],
3361
+ "additionalProperties": false
3362
+ }
3363
+ },
3364
+ "command": {
3365
+ "type": "object",
3366
+ "properties": {
3367
+ "argv": {
3368
+ "type": "array",
3369
+ "items": {
3370
+ "type": "string"
3371
+ },
3372
+ "minItems": 1
3373
+ },
3374
+ "cwd": {
3375
+ "type": "string",
3376
+ "minLength": 1
3377
+ }
3378
+ },
3379
+ "required": [
3380
+ "argv",
3381
+ "cwd"
3382
+ ],
3383
+ "additionalProperties": false
3384
+ }
3385
+ },
3386
+ "required": [
3387
+ "kind",
3388
+ "version",
3389
+ "requestId",
3390
+ "createdAt",
3391
+ "profile",
3392
+ "posture",
3393
+ "operatorType",
3394
+ "host",
3395
+ "sessionDid",
3396
+ "requested"
3397
+ ],
3398
+ "additionalProperties": false,
3399
+ "$schema": "http://json-schema.org/draft-07/schema#"
3400
+ },
3401
+ "output": {
3402
+ "type": "object",
3403
+ "properties": {
3404
+ "rules": {
3405
+ "type": "string"
3406
+ },
3407
+ "now": {
3408
+ "type": "string"
3409
+ },
3410
+ "timezone": {
3411
+ "type": [
3412
+ "string",
3413
+ "null"
3414
+ ]
3415
+ },
3416
+ "catalog": {
3417
+ "type": "object",
3418
+ "properties": {
3419
+ "keys": {
3420
+ "type": "array",
3421
+ "items": {
3422
+ "type": "string"
3423
+ }
3424
+ },
3425
+ "records": {
3426
+ "type": "array",
3427
+ "items": {
3428
+ "type": "object",
3429
+ "properties": {
3430
+ "key": {
3431
+ "type": "string"
3432
+ },
3433
+ "value": {
3434
+ "type": "object",
3435
+ "additionalProperties": {
3436
+ "anyOf": [
3437
+ {
3438
+ "type": "null"
3439
+ },
3440
+ {
3441
+ "type": "boolean"
3442
+ },
3443
+ {
3444
+ "type": "number"
3445
+ },
3446
+ {
3447
+ "type": "string"
3448
+ },
3449
+ {
3450
+ "type": "array",
3451
+ "items": {
3452
+ "$ref": "#/$defs/output/properties/catalog/properties/records/items/properties/value/additionalProperties"
3453
+ }
3454
+ },
3455
+ {
3456
+ "type": "object",
3457
+ "additionalProperties": {
3458
+ "$ref": "#/$defs/output/properties/catalog/properties/records/items/properties/value/additionalProperties"
3459
+ }
3460
+ }
3461
+ ]
3462
+ }
3463
+ },
3464
+ "etag": {
3465
+ "type": "string",
3466
+ "minLength": 1
3467
+ }
3468
+ },
3469
+ "required": [
3470
+ "key",
3471
+ "value",
3472
+ "etag"
3473
+ ],
3474
+ "additionalProperties": false
3475
+ }
3476
+ }
3477
+ },
3478
+ "required": [
3479
+ "keys"
3480
+ ],
3481
+ "additionalProperties": false
3482
+ },
3483
+ "copy": {
3484
+ "type": "string",
3485
+ "enum": [
3486
+ "present",
3487
+ "expired",
3488
+ "none"
3489
+ ]
3490
+ }
3491
+ },
3492
+ "required": [
3493
+ "rules",
3494
+ "now",
3495
+ "timezone",
3496
+ "catalog",
3497
+ "copy"
3498
+ ],
3499
+ "additionalProperties": false,
3500
+ "$schema": "http://json-schema.org/draft-07/schema#"
3501
+ }
3502
+ }
3503
+ },
3504
+ "postures": [
3505
+ "owner-openkey",
3506
+ "delegate-session",
3507
+ "local-owner-key"
3508
+ ],
3509
+ "effects": [
3510
+ "read"
3511
+ ],
3512
+ "sensitivity": {
3513
+ "input": true,
3514
+ "output": true
3515
+ },
3516
+ "exposure": {
3517
+ "cli": {
3518
+ "status": "excluded",
3519
+ "reason": "Personal apps use the hosted connector; the CLI skill keeps its existing commands."
3520
+ },
3521
+ "mcp": {
3522
+ "status": "required"
3523
+ },
3524
+ "skill": {
3525
+ "status": "required"
3526
+ },
3527
+ "docs": {
3528
+ "status": "required"
3529
+ }
3530
+ },
3531
+ "stableErrors": [
3532
+ "INPUT_INVALID",
3533
+ "OPERATION_NOT_FOUND",
3534
+ "OPERATION_VERSION_UNSUPPORTED",
3535
+ "PROFILE_NOT_FOUND",
3536
+ "PROFILE_POSTURE_NOT_ALLOWED",
3537
+ "PROFILE_OWNER_OPT_IN_REQUIRED",
3538
+ "PROFILE_MIGRATION_REQUIRED",
3539
+ "AUTH_REQUIRED",
3540
+ "PERMISSION_DENIED",
3541
+ "SESSION_NOT_FOUND",
3542
+ "PERMISSION_HINT_INVALID",
3543
+ "DELEGATION_ARTIFACT_INVALID",
3544
+ "DELEGATION_EXPIRED",
3545
+ "DELEGATION_AUDIENCE_MISMATCH",
3546
+ "DELEGATION_HOST_MISMATCH",
3547
+ "DELEGATION_REJECTED",
3548
+ "ENCRYPTION_NETWORK_UNRESOLVED",
3549
+ "NODE_UNREACHABLE",
3550
+ "NODE_ERROR",
3551
+ "STORAGE_QUOTA_EXCEEDED",
3552
+ "KV_NOT_FOUND",
3553
+ "KV_PRECONDITION_FAILED",
3554
+ "KV_CONFLICT",
3555
+ "KV_RESPONSE_TOO_LARGE",
3556
+ "SQL_QUERY_INVALID",
3557
+ "SQL_EXECUTION_FAILED",
3558
+ "SQL_RESULT_LIMIT_EXCEEDED",
3559
+ "SQL_VALUE_UNSAFE",
3560
+ "SECRET_READ_FAILED",
3561
+ "SECRET_DECRYPT_FAILED",
3562
+ "OUTPUT_INVALID",
3563
+ "INTERNAL_ERROR"
3564
+ ],
3565
+ "authority": {
3566
+ "dynamic": true
3567
+ }
3568
+ },
3569
+ {
3570
+ "id": "tinycloud.apps.read",
3571
+ "version": 1,
3572
+ "title": "Read personal records",
3573
+ "description": "List personal-record prefixes in full and read up to 100 records with their ETags. Read fresh before answering or editing.",
3574
+ "input": {
3575
+ "type": "object",
3576
+ "properties": {
3577
+ "prefixes": {
3578
+ "type": "array",
3579
+ "items": {
3580
+ "type": "string"
3581
+ }
3582
+ },
3583
+ "keys": {
3584
+ "type": "array",
3585
+ "items": {
3586
+ "type": "string"
3587
+ },
3588
+ "maxItems": 100
3589
+ }
3590
+ },
3591
+ "additionalProperties": false,
3592
+ "$schema": "http://json-schema.org/draft-07/schema#"
3593
+ },
3594
+ "output": {
3595
+ "type": "object",
3596
+ "properties": {
3597
+ "lists": {
3598
+ "type": "array",
3599
+ "items": {
3600
+ "type": "object",
3601
+ "properties": {
3602
+ "prefix": {
3603
+ "type": "string"
3604
+ },
3605
+ "keys": {
3606
+ "type": "array",
3607
+ "items": {
3608
+ "type": "string"
3609
+ }
3610
+ }
3611
+ },
3612
+ "required": [
3613
+ "prefix",
3614
+ "keys"
3615
+ ],
3616
+ "additionalProperties": false
3617
+ }
3618
+ },
3619
+ "records": {
3620
+ "type": "array",
3621
+ "items": {
3622
+ "anyOf": [
3623
+ {
3624
+ "type": "object",
3625
+ "properties": {
3626
+ "key": {
3627
+ "type": "string"
3628
+ },
3629
+ "value": {
3630
+ "type": "object",
3631
+ "additionalProperties": {
3632
+ "anyOf": [
3633
+ {
3634
+ "type": "null"
3635
+ },
3636
+ {
3637
+ "type": "boolean"
3638
+ },
3639
+ {
3640
+ "type": "number"
3641
+ },
3642
+ {
3643
+ "type": "string"
3644
+ },
3645
+ {
3646
+ "type": "array",
3647
+ "items": {
3648
+ "$ref": "#/properties/records/items/anyOf/0/properties/value/additionalProperties"
3649
+ }
3650
+ },
3651
+ {
3652
+ "type": "object",
3653
+ "additionalProperties": {
3654
+ "$ref": "#/properties/records/items/anyOf/0/properties/value/additionalProperties"
3655
+ }
3656
+ }
3657
+ ]
3658
+ }
3659
+ },
3660
+ "etag": {
3661
+ "type": "string",
3662
+ "minLength": 1
3663
+ }
3664
+ },
3665
+ "required": [
3666
+ "key",
3667
+ "value",
3668
+ "etag"
3669
+ ],
3670
+ "additionalProperties": false
3671
+ },
3672
+ {
3673
+ "type": "object",
3674
+ "properties": {
3675
+ "key": {
3676
+ "type": "string"
3677
+ },
3678
+ "outcome": {
3679
+ "type": "string",
3680
+ "enum": [
3681
+ "NOT_FOUND",
3682
+ "MALFORMED"
3683
+ ]
3684
+ }
3685
+ },
3686
+ "required": [
3687
+ "key",
3688
+ "outcome"
3689
+ ],
3690
+ "additionalProperties": false
3691
+ }
3692
+ ]
3693
+ }
3694
+ }
3695
+ },
3696
+ "required": [
3697
+ "lists",
3698
+ "records"
3699
+ ],
3700
+ "additionalProperties": false,
3701
+ "$schema": "http://json-schema.org/draft-07/schema#"
3702
+ },
3703
+ "result": {
3704
+ "$schema": "http://json-schema.org/draft-07/schema#",
3705
+ "type": "object",
3706
+ "anyOf": [
3707
+ {
3708
+ "type": "object",
3709
+ "properties": {
3710
+ "status": {
3711
+ "const": "ok"
3712
+ },
3713
+ "operation": {
3714
+ "type": "object",
3715
+ "properties": {
3716
+ "operationId": {
3717
+ "type": "string",
3718
+ "const": "tinycloud.apps.read"
3719
+ },
3720
+ "operationVersion": {
3721
+ "type": "integer",
3722
+ "const": 1
3723
+ }
3724
+ },
3725
+ "required": [
3726
+ "operationId",
3727
+ "operationVersion"
3728
+ ],
3729
+ "additionalProperties": false
3730
+ },
3731
+ "context": {
3732
+ "type": "object",
3733
+ "properties": {
3734
+ "profile": {
3735
+ "type": "string",
3736
+ "minLength": 1
3737
+ },
3738
+ "host": {
3739
+ "type": "string",
3740
+ "minLength": 1
3741
+ },
3742
+ "posture": {
3743
+ "type": "string",
3744
+ "enum": [
3745
+ "owner-openkey",
3746
+ "delegate-session",
3747
+ "local-owner-key",
3748
+ "unauthenticated"
3749
+ ]
3750
+ },
3751
+ "operatorType": {
3752
+ "type": "string",
3753
+ "enum": [
3754
+ "human",
3755
+ "agent"
3756
+ ]
3757
+ },
3758
+ "principalDid": {
3759
+ "type": "string",
3760
+ "minLength": 1
3761
+ },
3762
+ "sessionDid": {
3763
+ "type": "string",
3764
+ "minLength": 1
3765
+ },
3766
+ "ownerDid": {
3767
+ "type": "string",
3768
+ "minLength": 1
3769
+ },
3770
+ "space": {
3771
+ "type": "string",
3772
+ "minLength": 1
3773
+ }
3774
+ },
3775
+ "required": [
3776
+ "profile",
3777
+ "host",
3778
+ "posture"
3779
+ ],
3780
+ "additionalProperties": false
3781
+ },
3782
+ "warnings": {
3783
+ "type": "array",
3784
+ "minItems": 1,
3785
+ "items": {
3786
+ "type": "object",
3787
+ "properties": {
3788
+ "code": {
3789
+ "const": "STORED_GRANT_SKIPPED"
3790
+ },
3791
+ "reason": {
3792
+ "type": "string",
3793
+ "enum": [
3794
+ "malformed",
3795
+ "unbound",
3796
+ "outside_request",
3797
+ "host_mismatch",
3798
+ "expired",
3799
+ "cid_mismatch",
3800
+ "authority_invalid",
3801
+ "proof_missing",
3802
+ "proof_invalid",
3803
+ "owner_mismatch",
3804
+ "audience_mismatch",
3805
+ "resources_mismatch",
3806
+ "unsupported",
3807
+ "activation_rejected",
3808
+ "activation_unavailable",
3809
+ "activation_unauthenticated",
3810
+ "invalid"
3811
+ ]
3812
+ },
3813
+ "grantCid": {
3814
+ "type": "string",
3815
+ "pattern": "^bafkr4i[a-z2-7]{52}$"
3816
+ }
3817
+ },
3818
+ "required": [
3819
+ "code",
3820
+ "reason"
3821
+ ],
3822
+ "additionalProperties": false
3823
+ }
3824
+ },
3825
+ "output": {
3826
+ "$ref": "#/$defs/output"
3827
+ }
3828
+ },
3829
+ "required": [
3830
+ "status",
3831
+ "operation",
3832
+ "context",
3833
+ "output"
3834
+ ],
3835
+ "additionalProperties": false
3836
+ },
3837
+ {
3838
+ "type": "object",
3839
+ "properties": {
3840
+ "status": {
3841
+ "const": "authority_required"
3842
+ },
3843
+ "operation": {
3844
+ "type": "object",
3845
+ "properties": {
3846
+ "operationId": {
3847
+ "type": "string",
3848
+ "const": "tinycloud.apps.read"
3849
+ },
3850
+ "operationVersion": {
3851
+ "type": "integer",
3852
+ "const": 1
3853
+ }
3854
+ },
3855
+ "required": [
3856
+ "operationId",
3857
+ "operationVersion"
3858
+ ],
3859
+ "additionalProperties": false
3860
+ },
3861
+ "context": {
3862
+ "type": "object",
3863
+ "properties": {
3864
+ "profile": {
3865
+ "type": "string",
3866
+ "minLength": 1
3867
+ },
3868
+ "host": {
3869
+ "type": "string",
3870
+ "minLength": 1
3871
+ },
3872
+ "posture": {
3873
+ "type": "string",
3874
+ "enum": [
3875
+ "owner-openkey",
3876
+ "delegate-session",
3877
+ "local-owner-key",
3878
+ "unauthenticated"
3879
+ ]
3880
+ },
3881
+ "operatorType": {
3882
+ "type": "string",
3883
+ "enum": [
3884
+ "human",
3885
+ "agent"
3886
+ ]
3887
+ },
3888
+ "principalDid": {
3889
+ "type": "string",
3890
+ "minLength": 1
3891
+ },
3892
+ "sessionDid": {
3893
+ "type": "string",
3894
+ "minLength": 1
3895
+ },
3896
+ "ownerDid": {
3897
+ "type": "string",
3898
+ "minLength": 1
3899
+ },
3900
+ "space": {
3901
+ "type": "string",
3902
+ "minLength": 1
3903
+ }
3904
+ },
3905
+ "required": [
3906
+ "profile",
3907
+ "host",
3908
+ "posture"
3909
+ ],
3910
+ "additionalProperties": false
3911
+ },
3912
+ "warnings": {
3913
+ "type": "array",
3914
+ "minItems": 1,
3915
+ "items": {
3916
+ "type": "object",
3917
+ "properties": {
3918
+ "code": {
3919
+ "const": "STORED_GRANT_SKIPPED"
3920
+ },
3921
+ "reason": {
3922
+ "type": "string",
3923
+ "enum": [
3924
+ "malformed",
3925
+ "unbound",
3926
+ "outside_request",
3927
+ "host_mismatch",
3928
+ "expired",
3929
+ "cid_mismatch",
3930
+ "authority_invalid",
3931
+ "proof_missing",
3932
+ "proof_invalid",
3933
+ "owner_mismatch",
3934
+ "audience_mismatch",
3935
+ "resources_mismatch",
3936
+ "unsupported",
3937
+ "activation_rejected",
3938
+ "activation_unavailable",
3939
+ "activation_unauthenticated",
3940
+ "invalid"
3941
+ ]
3942
+ },
3943
+ "grantCid": {
3944
+ "type": "string",
3945
+ "pattern": "^bafkr4i[a-z2-7]{52}$"
3946
+ }
3947
+ },
3948
+ "required": [
3949
+ "code",
3950
+ "reason"
3951
+ ],
3952
+ "additionalProperties": false
3953
+ }
3954
+ },
3955
+ "missing": {
3956
+ "type": "array",
3957
+ "minItems": 1,
3958
+ "items": {
3959
+ "$ref": "#/$defs/permissionEntry"
3960
+ }
3961
+ },
3962
+ "request": {
3963
+ "$ref": "#/$defs/permissionRequest"
3964
+ },
3965
+ "approval": {
3966
+ "type": "object",
3967
+ "properties": {
3968
+ "kind": {
3969
+ "const": "openkey"
3970
+ },
3971
+ "requestId": {
3972
+ "type": "string",
3973
+ "minLength": 1
3974
+ },
3975
+ "url": {
3976
+ "type": "string",
3977
+ "format": "uri"
3978
+ },
3979
+ "fallback": {
3980
+ "type": "string",
3981
+ "minLength": 1
3982
+ }
3983
+ },
3984
+ "required": [
3985
+ "kind",
3986
+ "requestId",
3987
+ "fallback"
3988
+ ],
3989
+ "additionalProperties": false
3990
+ },
3991
+ "retry": {
3992
+ "type": "object",
3993
+ "properties": {
3994
+ "operationId": {
3995
+ "type": "string",
3996
+ "minLength": 1
3997
+ },
3998
+ "operationVersion": {
3999
+ "type": "integer",
4000
+ "const": 1
4001
+ },
4002
+ "inputDigest": {
4003
+ "type": "string",
4004
+ "pattern": "^[a-f0-9]{64}$"
4005
+ },
4006
+ "safeInput": {
4007
+ "type": "object",
4008
+ "additionalProperties": true
4009
+ },
4010
+ "requiresCallerInput": {
4011
+ "type": "boolean"
4012
+ }
4013
+ },
4014
+ "required": [
4015
+ "operationId",
4016
+ "operationVersion",
4017
+ "inputDigest",
4018
+ "requiresCallerInput"
4019
+ ],
4020
+ "additionalProperties": false
4021
+ }
4022
+ },
4023
+ "required": [
4024
+ "status",
4025
+ "operation",
4026
+ "context",
4027
+ "missing",
4028
+ "request",
4029
+ "approval",
4030
+ "retry"
4031
+ ],
4032
+ "additionalProperties": false
4033
+ },
4034
+ {
4035
+ "type": "object",
4036
+ "properties": {
4037
+ "status": {
4038
+ "const": "setup_required"
4039
+ },
4040
+ "operation": {
4041
+ "type": "object",
4042
+ "properties": {
4043
+ "operationId": {
4044
+ "type": "string",
4045
+ "const": "tinycloud.apps.read"
4046
+ },
4047
+ "operationVersion": {
4048
+ "type": "integer",
4049
+ "const": 1
4050
+ }
4051
+ },
4052
+ "required": [
4053
+ "operationId",
4054
+ "operationVersion"
4055
+ ],
4056
+ "additionalProperties": false
4057
+ },
4058
+ "context": {
4059
+ "type": "object",
4060
+ "properties": {
4061
+ "profile": {
4062
+ "type": "string",
4063
+ "minLength": 1
4064
+ },
4065
+ "host": {
4066
+ "type": "string",
4067
+ "minLength": 1
4068
+ },
4069
+ "posture": {
4070
+ "type": "string",
4071
+ "enum": [
4072
+ "owner-openkey",
4073
+ "delegate-session",
4074
+ "local-owner-key",
4075
+ "unauthenticated"
4076
+ ]
4077
+ },
4078
+ "operatorType": {
4079
+ "type": "string",
4080
+ "enum": [
4081
+ "human",
4082
+ "agent"
4083
+ ]
4084
+ },
4085
+ "principalDid": {
4086
+ "type": "string",
4087
+ "minLength": 1
4088
+ },
4089
+ "sessionDid": {
4090
+ "type": "string",
4091
+ "minLength": 1
4092
+ },
4093
+ "ownerDid": {
4094
+ "type": "string",
4095
+ "minLength": 1
4096
+ },
4097
+ "space": {
4098
+ "type": "string",
4099
+ "minLength": 1
4100
+ }
4101
+ },
4102
+ "required": [
4103
+ "profile",
4104
+ "host",
4105
+ "posture"
4106
+ ],
4107
+ "additionalProperties": false
4108
+ },
4109
+ "warnings": {
4110
+ "type": "array",
4111
+ "minItems": 1,
4112
+ "items": {
4113
+ "type": "object",
4114
+ "properties": {
4115
+ "code": {
4116
+ "const": "STORED_GRANT_SKIPPED"
4117
+ },
4118
+ "reason": {
4119
+ "type": "string",
4120
+ "enum": [
4121
+ "malformed",
4122
+ "unbound",
4123
+ "outside_request",
4124
+ "host_mismatch",
4125
+ "expired",
4126
+ "cid_mismatch",
4127
+ "authority_invalid",
4128
+ "proof_missing",
4129
+ "proof_invalid",
4130
+ "owner_mismatch",
4131
+ "audience_mismatch",
4132
+ "resources_mismatch",
4133
+ "unsupported",
4134
+ "activation_rejected",
4135
+ "activation_unavailable",
4136
+ "activation_unauthenticated",
4137
+ "invalid"
4138
+ ]
4139
+ },
4140
+ "grantCid": {
4141
+ "type": "string",
4142
+ "pattern": "^bafkr4i[a-z2-7]{52}$"
4143
+ }
4144
+ },
4145
+ "required": [
4146
+ "code",
4147
+ "reason"
4148
+ ],
4149
+ "additionalProperties": false
4150
+ }
4151
+ },
4152
+ "setup": {
4153
+ "type": "object",
4154
+ "properties": {
4155
+ "kind": {
4156
+ "const": "secret_manager"
4157
+ },
4158
+ "action": {
4159
+ "const": "add_secret"
4160
+ },
4161
+ "url": {
4162
+ "type": "string",
4163
+ "format": "uri"
4164
+ },
4165
+ "names": {
4166
+ "type": "array",
4167
+ "minItems": 1,
4168
+ "maxItems": 10,
4169
+ "items": {
4170
+ "type": "string",
4171
+ "minLength": 1
4172
+ }
4173
+ },
4174
+ "scope": {
4175
+ "type": "string",
4176
+ "minLength": 1
4177
+ },
4178
+ "owner": {
4179
+ "type": "string",
4180
+ "minLength": 1
4181
+ },
4182
+ "secret": {
4183
+ "type": "object",
4184
+ "properties": {
4185
+ "name": {
4186
+ "type": "string",
4187
+ "minLength": 1
4188
+ },
4189
+ "scope": {
4190
+ "type": "string",
4191
+ "minLength": 1
4192
+ },
4193
+ "space": {
4194
+ "type": "string",
4195
+ "minLength": 1
4196
+ }
4197
+ },
4198
+ "required": [
4199
+ "name",
4200
+ "space"
4201
+ ],
4202
+ "additionalProperties": false
4203
+ },
4204
+ "message": {
4205
+ "type": "string",
4206
+ "minLength": 1
4207
+ }
4208
+ },
4209
+ "required": [
4210
+ "kind",
4211
+ "action",
4212
+ "url",
4213
+ "names",
4214
+ "owner",
4215
+ "secret",
4216
+ "message"
4217
+ ],
4218
+ "additionalProperties": false
4219
+ },
4220
+ "retry": {
4221
+ "type": "object",
4222
+ "properties": {
4223
+ "operationId": {
4224
+ "type": "string",
4225
+ "minLength": 1
4226
+ },
4227
+ "operationVersion": {
4228
+ "type": "integer",
4229
+ "const": 1
4230
+ },
4231
+ "inputDigest": {
4232
+ "type": "string",
4233
+ "pattern": "^[a-f0-9]{64}$"
4234
+ },
4235
+ "safeInput": {
4236
+ "type": "object",
4237
+ "additionalProperties": true
4238
+ },
4239
+ "requiresCallerInput": {
4240
+ "type": "boolean"
4241
+ }
4242
+ },
4243
+ "required": [
4244
+ "operationId",
4245
+ "operationVersion",
4246
+ "inputDigest",
4247
+ "requiresCallerInput"
4248
+ ],
4249
+ "additionalProperties": false
4250
+ }
4251
+ },
4252
+ "required": [
4253
+ "status",
4254
+ "operation",
4255
+ "context",
4256
+ "setup",
4257
+ "retry"
4258
+ ],
4259
+ "additionalProperties": false
4260
+ },
4261
+ {
4262
+ "type": "object",
4263
+ "properties": {
4264
+ "status": {
4265
+ "const": "error"
4266
+ },
4267
+ "operation": {
4268
+ "type": "object",
4269
+ "properties": {
4270
+ "operationId": {
4271
+ "type": "string",
4272
+ "const": "tinycloud.apps.read"
4273
+ },
4274
+ "operationVersion": {
4275
+ "type": "integer",
4276
+ "const": 1
4277
+ }
4278
+ },
4279
+ "required": [
4280
+ "operationId",
4281
+ "operationVersion"
4282
+ ],
4283
+ "additionalProperties": false
4284
+ },
4285
+ "context": {
4286
+ "type": "object",
4287
+ "properties": {
4288
+ "profile": {
4289
+ "type": "string",
4290
+ "minLength": 1
4291
+ },
4292
+ "host": {
4293
+ "type": "string",
4294
+ "minLength": 1
4295
+ },
4296
+ "posture": {
4297
+ "type": "string",
4298
+ "enum": [
4299
+ "owner-openkey",
4300
+ "delegate-session",
4301
+ "local-owner-key",
4302
+ "unauthenticated"
4303
+ ]
4304
+ },
4305
+ "operatorType": {
4306
+ "type": "string",
4307
+ "enum": [
4308
+ "human",
4309
+ "agent"
4310
+ ]
4311
+ },
4312
+ "principalDid": {
4313
+ "type": "string",
4314
+ "minLength": 1
4315
+ },
4316
+ "sessionDid": {
4317
+ "type": "string",
4318
+ "minLength": 1
4319
+ },
4320
+ "ownerDid": {
4321
+ "type": "string",
4322
+ "minLength": 1
4323
+ },
4324
+ "space": {
4325
+ "type": "string",
4326
+ "minLength": 1
4327
+ }
4328
+ },
4329
+ "required": [
4330
+ "profile",
4331
+ "host",
4332
+ "posture"
4333
+ ],
4334
+ "additionalProperties": false
4335
+ },
4336
+ "warnings": {
4337
+ "type": "array",
4338
+ "minItems": 1,
4339
+ "items": {
4340
+ "type": "object",
4341
+ "properties": {
4342
+ "code": {
4343
+ "const": "STORED_GRANT_SKIPPED"
4344
+ },
4345
+ "reason": {
4346
+ "type": "string",
4347
+ "enum": [
4348
+ "malformed",
4349
+ "unbound",
4350
+ "outside_request",
4351
+ "host_mismatch",
4352
+ "expired",
4353
+ "cid_mismatch",
4354
+ "authority_invalid",
4355
+ "proof_missing",
4356
+ "proof_invalid",
4357
+ "owner_mismatch",
4358
+ "audience_mismatch",
4359
+ "resources_mismatch",
4360
+ "unsupported",
4361
+ "activation_rejected",
4362
+ "activation_unavailable",
4363
+ "activation_unauthenticated",
4364
+ "invalid"
4365
+ ]
4366
+ },
4367
+ "grantCid": {
4368
+ "type": "string",
4369
+ "pattern": "^bafkr4i[a-z2-7]{52}$"
4370
+ }
4371
+ },
4372
+ "required": [
4373
+ "code",
4374
+ "reason"
4375
+ ],
4376
+ "additionalProperties": false
4377
+ }
4378
+ },
4379
+ "error": {
4380
+ "type": "object",
4381
+ "properties": {
4382
+ "code": {
4383
+ "type": "string",
4384
+ "enum": [
4385
+ "INPUT_INVALID",
4386
+ "OPERATION_NOT_FOUND",
4387
+ "OPERATION_VERSION_UNSUPPORTED",
4388
+ "PROFILE_NOT_FOUND",
4389
+ "PROFILE_POSTURE_NOT_ALLOWED",
4390
+ "PROFILE_OWNER_OPT_IN_REQUIRED",
4391
+ "PROFILE_MIGRATION_REQUIRED",
4392
+ "AUTH_REQUIRED",
4393
+ "PERMISSION_DENIED",
4394
+ "SESSION_NOT_FOUND",
4395
+ "PERMISSION_HINT_INVALID",
4396
+ "DELEGATION_ARTIFACT_INVALID",
4397
+ "DELEGATION_EXPIRED",
4398
+ "DELEGATION_AUDIENCE_MISMATCH",
4399
+ "DELEGATION_HOST_MISMATCH",
4400
+ "DELEGATION_REJECTED",
4401
+ "ENCRYPTION_NETWORK_UNRESOLVED",
4402
+ "NODE_UNREACHABLE",
4403
+ "NODE_ERROR",
4404
+ "STORAGE_QUOTA_EXCEEDED",
4405
+ "KV_NOT_FOUND",
4406
+ "KV_PRECONDITION_FAILED",
4407
+ "KV_CONFLICT",
4408
+ "KV_RESPONSE_TOO_LARGE",
4409
+ "SQL_QUERY_INVALID",
4410
+ "SQL_EXECUTION_FAILED",
4411
+ "SQL_RESULT_LIMIT_EXCEEDED",
4412
+ "SQL_VALUE_UNSAFE",
4413
+ "SECRET_READ_FAILED",
4414
+ "SECRET_DECRYPT_FAILED",
4415
+ "OUTPUT_INVALID",
4416
+ "INTERNAL_ERROR"
4417
+ ]
4418
+ },
4419
+ "message": {
4420
+ "type": "string",
4421
+ "minLength": 1
4422
+ },
4423
+ "retryable": {
4424
+ "type": "boolean"
4425
+ },
4426
+ "details": {
4427
+ "type": "object",
4428
+ "additionalProperties": true
4429
+ }
4430
+ },
4431
+ "required": [
4432
+ "code",
4433
+ "message",
4434
+ "retryable"
4435
+ ],
4436
+ "additionalProperties": false
4437
+ }
4438
+ },
4439
+ "required": [
4440
+ "status",
4441
+ "operation",
4442
+ "context",
4443
+ "error"
4444
+ ],
4445
+ "additionalProperties": false
4446
+ }
4447
+ ],
4448
+ "$defs": {
4449
+ "permissionEntry": {
4450
+ "type": "object",
4451
+ "properties": {
4452
+ "service": {
4453
+ "type": "string",
4454
+ "minLength": 1
4455
+ },
4456
+ "space": {
4457
+ "type": "string",
4458
+ "minLength": 1
4459
+ },
4460
+ "path": {
4461
+ "type": "string"
4462
+ },
4463
+ "actions": {
4464
+ "type": "array",
4465
+ "items": {
4466
+ "type": "string",
4467
+ "minLength": 1
4468
+ },
4469
+ "minItems": 1
4470
+ },
4471
+ "caveats": {
4472
+ "type": "array",
4473
+ "items": {
4474
+ "type": "object",
4475
+ "additionalProperties": {}
4476
+ }
4477
+ },
4478
+ "skipPrefix": {
4479
+ "type": "boolean"
4480
+ },
4481
+ "expiry": {
4482
+ "type": "string",
4483
+ "minLength": 1
4484
+ },
4485
+ "description": {
4486
+ "type": "string"
4487
+ }
4488
+ },
4489
+ "required": [
4490
+ "service",
4491
+ "path",
4492
+ "actions"
4493
+ ],
4494
+ "additionalProperties": false,
4495
+ "$schema": "http://json-schema.org/draft-07/schema#"
4496
+ },
4497
+ "permissionRequest": {
4498
+ "type": "object",
4499
+ "properties": {
4500
+ "kind": {
4501
+ "type": "string",
4502
+ "const": "tinycloud.auth.request"
4503
+ },
4504
+ "version": {
4505
+ "type": "number",
4506
+ "const": 1
4507
+ },
4508
+ "requestId": {
4509
+ "type": "string",
4510
+ "minLength": 1
4511
+ },
4512
+ "createdAt": {
4513
+ "type": "string",
4514
+ "format": "date-time"
4515
+ },
4516
+ "profile": {
4517
+ "type": "string",
4518
+ "minLength": 1
4519
+ },
4520
+ "posture": {
4521
+ "type": "string",
4522
+ "enum": [
4523
+ "owner-openkey",
4524
+ "delegate-session",
4525
+ "local-owner-key",
4526
+ "unauthenticated"
4527
+ ]
4528
+ },
4529
+ "operatorType": {
4530
+ "type": "string",
4531
+ "enum": [
4532
+ "human",
4533
+ "agent"
4534
+ ]
4535
+ },
4536
+ "host": {
4537
+ "type": "string",
4538
+ "minLength": 1
4539
+ },
4540
+ "sessionDid": {
4541
+ "type": "string",
4542
+ "minLength": 1
4543
+ },
4544
+ "ownerDid": {
4545
+ "type": "string",
4546
+ "minLength": 1
4547
+ },
4548
+ "spaceId": {
4549
+ "type": "string",
4550
+ "minLength": 1
4551
+ },
4552
+ "requestedExpiry": {
4553
+ "anyOf": [
4554
+ {
4555
+ "type": "string",
4556
+ "minLength": 1
4557
+ },
4558
+ {
4559
+ "type": "number"
4560
+ }
4561
+ ]
4562
+ },
4563
+ "requested": {
4564
+ "type": "array",
4565
+ "items": {
4566
+ "type": "object",
4567
+ "properties": {
4568
+ "service": {
4569
+ "type": "string",
4570
+ "minLength": 1
4571
+ },
4572
+ "space": {
4573
+ "type": "string",
4574
+ "minLength": 1
4575
+ },
4576
+ "path": {
4577
+ "type": "string"
4578
+ },
4579
+ "actions": {
4580
+ "type": "array",
4581
+ "items": {
4582
+ "type": "string",
4583
+ "minLength": 1
4584
+ },
4585
+ "minItems": 1
4586
+ },
4587
+ "caveats": {
4588
+ "type": "array",
4589
+ "items": {
4590
+ "type": "object",
4591
+ "additionalProperties": {}
4592
+ }
4593
+ },
4594
+ "skipPrefix": {
4595
+ "type": "boolean"
4596
+ },
4597
+ "expiry": {
4598
+ "type": "string",
4599
+ "minLength": 1
4600
+ },
4601
+ "description": {
4602
+ "type": "string"
4603
+ }
4604
+ },
4605
+ "required": [
4606
+ "service",
4607
+ "path",
4608
+ "actions"
4609
+ ],
4610
+ "additionalProperties": false
4611
+ }
4612
+ },
4613
+ "command": {
4614
+ "type": "object",
4615
+ "properties": {
4616
+ "argv": {
4617
+ "type": "array",
4618
+ "items": {
4619
+ "type": "string"
4620
+ },
4621
+ "minItems": 1
4622
+ },
4623
+ "cwd": {
4624
+ "type": "string",
4625
+ "minLength": 1
4626
+ }
4627
+ },
4628
+ "required": [
4629
+ "argv",
4630
+ "cwd"
4631
+ ],
4632
+ "additionalProperties": false
4633
+ }
4634
+ },
4635
+ "required": [
4636
+ "kind",
4637
+ "version",
4638
+ "requestId",
4639
+ "createdAt",
4640
+ "profile",
4641
+ "posture",
4642
+ "operatorType",
4643
+ "host",
4644
+ "sessionDid",
4645
+ "requested"
4646
+ ],
4647
+ "additionalProperties": false,
4648
+ "$schema": "http://json-schema.org/draft-07/schema#"
4649
+ },
4650
+ "output": {
4651
+ "type": "object",
4652
+ "properties": {
4653
+ "lists": {
4654
+ "type": "array",
4655
+ "items": {
4656
+ "type": "object",
4657
+ "properties": {
4658
+ "prefix": {
4659
+ "type": "string"
4660
+ },
4661
+ "keys": {
4662
+ "type": "array",
4663
+ "items": {
4664
+ "type": "string"
4665
+ }
4666
+ }
4667
+ },
4668
+ "required": [
4669
+ "prefix",
4670
+ "keys"
4671
+ ],
4672
+ "additionalProperties": false
4673
+ }
4674
+ },
4675
+ "records": {
4676
+ "type": "array",
4677
+ "items": {
4678
+ "anyOf": [
4679
+ {
4680
+ "type": "object",
4681
+ "properties": {
4682
+ "key": {
4683
+ "type": "string"
4684
+ },
4685
+ "value": {
4686
+ "type": "object",
4687
+ "additionalProperties": {
4688
+ "anyOf": [
4689
+ {
4690
+ "type": "null"
4691
+ },
4692
+ {
4693
+ "type": "boolean"
4694
+ },
4695
+ {
4696
+ "type": "number"
4697
+ },
4698
+ {
4699
+ "type": "string"
4700
+ },
4701
+ {
4702
+ "type": "array",
4703
+ "items": {
4704
+ "$ref": "#/$defs/output/properties/records/items/anyOf/0/properties/value/additionalProperties"
4705
+ }
4706
+ },
4707
+ {
4708
+ "type": "object",
4709
+ "additionalProperties": {
4710
+ "$ref": "#/$defs/output/properties/records/items/anyOf/0/properties/value/additionalProperties"
4711
+ }
4712
+ }
4713
+ ]
4714
+ }
4715
+ },
4716
+ "etag": {
4717
+ "type": "string",
4718
+ "minLength": 1
4719
+ }
4720
+ },
4721
+ "required": [
4722
+ "key",
4723
+ "value",
4724
+ "etag"
4725
+ ],
4726
+ "additionalProperties": false
4727
+ },
4728
+ {
4729
+ "type": "object",
4730
+ "properties": {
4731
+ "key": {
4732
+ "type": "string"
4733
+ },
4734
+ "outcome": {
4735
+ "type": "string",
4736
+ "enum": [
4737
+ "NOT_FOUND",
4738
+ "MALFORMED"
4739
+ ]
4740
+ }
4741
+ },
4742
+ "required": [
4743
+ "key",
4744
+ "outcome"
4745
+ ],
4746
+ "additionalProperties": false
4747
+ }
4748
+ ]
4749
+ }
4750
+ }
4751
+ },
4752
+ "required": [
4753
+ "lists",
4754
+ "records"
4755
+ ],
4756
+ "additionalProperties": false,
4757
+ "$schema": "http://json-schema.org/draft-07/schema#"
4758
+ }
4759
+ }
4760
+ },
4761
+ "postures": [
4762
+ "owner-openkey",
4763
+ "delegate-session",
4764
+ "local-owner-key"
4765
+ ],
4766
+ "effects": [
4767
+ "read"
4768
+ ],
4769
+ "sensitivity": {
4770
+ "input": true,
4771
+ "output": true
4772
+ },
4773
+ "exposure": {
4774
+ "cli": {
4775
+ "status": "excluded",
4776
+ "reason": "Personal apps use the hosted connector; the CLI skill keeps its existing commands."
4777
+ },
4778
+ "mcp": {
4779
+ "status": "required"
4780
+ },
4781
+ "skill": {
4782
+ "status": "required"
4783
+ },
4784
+ "docs": {
4785
+ "status": "required"
4786
+ }
4787
+ },
4788
+ "stableErrors": [
4789
+ "INPUT_INVALID",
4790
+ "OPERATION_NOT_FOUND",
4791
+ "OPERATION_VERSION_UNSUPPORTED",
4792
+ "PROFILE_NOT_FOUND",
4793
+ "PROFILE_POSTURE_NOT_ALLOWED",
4794
+ "PROFILE_OWNER_OPT_IN_REQUIRED",
4795
+ "PROFILE_MIGRATION_REQUIRED",
4796
+ "AUTH_REQUIRED",
4797
+ "PERMISSION_DENIED",
4798
+ "SESSION_NOT_FOUND",
4799
+ "PERMISSION_HINT_INVALID",
4800
+ "DELEGATION_ARTIFACT_INVALID",
4801
+ "DELEGATION_EXPIRED",
4802
+ "DELEGATION_AUDIENCE_MISMATCH",
4803
+ "DELEGATION_HOST_MISMATCH",
4804
+ "DELEGATION_REJECTED",
4805
+ "ENCRYPTION_NETWORK_UNRESOLVED",
4806
+ "NODE_UNREACHABLE",
4807
+ "NODE_ERROR",
4808
+ "STORAGE_QUOTA_EXCEEDED",
4809
+ "KV_NOT_FOUND",
4810
+ "KV_PRECONDITION_FAILED",
4811
+ "KV_CONFLICT",
4812
+ "KV_RESPONSE_TOO_LARGE",
4813
+ "SQL_QUERY_INVALID",
4814
+ "SQL_EXECUTION_FAILED",
4815
+ "SQL_RESULT_LIMIT_EXCEEDED",
4816
+ "SQL_VALUE_UNSAFE",
4817
+ "SECRET_READ_FAILED",
4818
+ "SECRET_DECRYPT_FAILED",
4819
+ "OUTPUT_INVALID",
4820
+ "INTERNAL_ERROR"
4821
+ ],
4822
+ "authority": {
4823
+ "dynamic": true
4824
+ }
4825
+ },
4826
+ {
4827
+ "id": "tinycloud.apps.write",
4828
+ "version": 1,
4829
+ "title": "Write personal records",
4830
+ "description": "Run 1–10 personal-record puts, moves or requested deletes in order. Omit an ETag to create; supply the read ETag to replace. Catalog writes may precede their records in the same call. Inspect every outcome and any completed move steps before retrying.",
4831
+ "input": {
4832
+ "type": "object",
4833
+ "properties": {
4834
+ "ops": {
4835
+ "type": "array",
4836
+ "items": {
4837
+ "anyOf": [
4838
+ {
4839
+ "type": "object",
4840
+ "properties": {
4841
+ "op": {
4842
+ "type": "string",
4843
+ "const": "put"
4844
+ },
4845
+ "key": {
4846
+ "type": "string"
4847
+ },
4848
+ "value": {
4849
+ "type": "object",
4850
+ "additionalProperties": {
4851
+ "anyOf": [
4852
+ {
4853
+ "type": "null"
4854
+ },
4855
+ {
4856
+ "type": "boolean"
4857
+ },
4858
+ {
4859
+ "type": "number"
4860
+ },
4861
+ {
4862
+ "type": "string"
4863
+ },
4864
+ {
4865
+ "type": "array",
4866
+ "items": {
4867
+ "$ref": "#/properties/ops/items/anyOf/0/properties/value/additionalProperties"
4868
+ }
4869
+ },
4870
+ {
4871
+ "type": "object",
4872
+ "additionalProperties": {
4873
+ "$ref": "#/properties/ops/items/anyOf/0/properties/value/additionalProperties"
4874
+ }
4875
+ }
4876
+ ]
4877
+ }
4878
+ },
4879
+ "etag": {
4880
+ "type": "string",
4881
+ "pattern": "^\"blake3-[0-9a-f]{64}\"$"
4882
+ }
4883
+ },
4884
+ "required": [
4885
+ "op",
4886
+ "key",
4887
+ "value"
4888
+ ],
4889
+ "additionalProperties": false
4890
+ },
4891
+ {
4892
+ "type": "object",
4893
+ "properties": {
4894
+ "op": {
4895
+ "type": "string",
4896
+ "const": "move"
4897
+ },
4898
+ "from": {
4899
+ "$ref": "#/properties/ops/items/anyOf/0/properties/key"
4900
+ },
4901
+ "to": {
4902
+ "$ref": "#/properties/ops/items/anyOf/1/properties/from"
4903
+ },
4904
+ "value": {
4905
+ "$ref": "#/properties/ops/items/anyOf/0/properties/value"
4906
+ },
4907
+ "etag": {
4908
+ "$ref": "#/properties/ops/items/anyOf/0/properties/etag"
4909
+ }
4910
+ },
4911
+ "required": [
4912
+ "op",
4913
+ "from",
4914
+ "to",
4915
+ "value",
4916
+ "etag"
4917
+ ],
4918
+ "additionalProperties": false
4919
+ },
4920
+ {
4921
+ "type": "object",
4922
+ "properties": {
4923
+ "op": {
4924
+ "type": "string",
4925
+ "const": "delete"
4926
+ },
4927
+ "key": {
4928
+ "$ref": "#/properties/ops/items/anyOf/1/properties/from"
4929
+ },
4930
+ "etag": {
4931
+ "$ref": "#/properties/ops/items/anyOf/0/properties/etag"
4932
+ }
4933
+ },
4934
+ "required": [
4935
+ "op",
4936
+ "key"
4937
+ ],
4938
+ "additionalProperties": false
4939
+ }
4940
+ ]
4941
+ },
4942
+ "minItems": 1,
4943
+ "maxItems": 10
4944
+ }
4945
+ },
4946
+ "required": [
4947
+ "ops"
4948
+ ],
4949
+ "additionalProperties": false,
4950
+ "$schema": "http://json-schema.org/draft-07/schema#"
4951
+ },
4952
+ "output": {
4953
+ "type": "object",
4954
+ "properties": {
4955
+ "ops": {
4956
+ "type": "array",
4957
+ "items": {
4958
+ "type": "object",
4959
+ "properties": {
4960
+ "key": {
4961
+ "type": "string"
4962
+ },
4963
+ "outcome": {
4964
+ "type": "string",
4965
+ "enum": [
4966
+ "ok",
4967
+ "EXISTS",
4968
+ "CHANGED",
4969
+ "CATALOG_CHANGE",
4970
+ "INVALID",
4971
+ "NOT_FOUND",
4972
+ "TIMEZONE_REQUIRED",
4973
+ "INPUT_INVALID",
4974
+ "OPERATION_NOT_FOUND",
4975
+ "OPERATION_VERSION_UNSUPPORTED",
4976
+ "PROFILE_NOT_FOUND",
4977
+ "PROFILE_POSTURE_NOT_ALLOWED",
4978
+ "PROFILE_OWNER_OPT_IN_REQUIRED",
4979
+ "PROFILE_MIGRATION_REQUIRED",
4980
+ "AUTH_REQUIRED",
4981
+ "PERMISSION_DENIED",
4982
+ "SESSION_NOT_FOUND",
4983
+ "PERMISSION_HINT_INVALID",
4984
+ "DELEGATION_ARTIFACT_INVALID",
4985
+ "DELEGATION_EXPIRED",
4986
+ "DELEGATION_AUDIENCE_MISMATCH",
4987
+ "DELEGATION_HOST_MISMATCH",
4988
+ "DELEGATION_REJECTED",
4989
+ "ENCRYPTION_NETWORK_UNRESOLVED",
4990
+ "NODE_UNREACHABLE",
4991
+ "NODE_ERROR",
4992
+ "STORAGE_QUOTA_EXCEEDED",
4993
+ "KV_NOT_FOUND",
4994
+ "KV_PRECONDITION_FAILED",
4995
+ "KV_CONFLICT",
4996
+ "KV_RESPONSE_TOO_LARGE",
4997
+ "SQL_QUERY_INVALID",
4998
+ "SQL_EXECUTION_FAILED",
4999
+ "SQL_RESULT_LIMIT_EXCEEDED",
5000
+ "SQL_VALUE_UNSAFE",
5001
+ "SECRET_READ_FAILED",
5002
+ "SECRET_DECRYPT_FAILED",
5003
+ "OUTPUT_INVALID",
5004
+ "INTERNAL_ERROR"
5005
+ ]
5006
+ },
5007
+ "etag": {
5008
+ "type": "string"
5009
+ },
5010
+ "value": {
5011
+ "type": "object",
5012
+ "additionalProperties": {
5013
+ "anyOf": [
5014
+ {
5015
+ "type": "null"
5016
+ },
5017
+ {
5018
+ "type": "boolean"
5019
+ },
5020
+ {
5021
+ "type": "number"
5022
+ },
5023
+ {
5024
+ "type": "string"
5025
+ },
5026
+ {
5027
+ "type": "array",
5028
+ "items": {
5029
+ "$ref": "#/properties/ops/items/properties/value/additionalProperties"
5030
+ }
5031
+ },
5032
+ {
5033
+ "type": "object",
5034
+ "additionalProperties": {
5035
+ "$ref": "#/properties/ops/items/properties/value/additionalProperties"
5036
+ }
5037
+ }
5038
+ ]
5039
+ }
5040
+ },
5041
+ "steps": {
5042
+ "type": "array",
5043
+ "items": {
5044
+ "type": "string",
5045
+ "enum": [
5046
+ "written",
5047
+ "deleted"
5048
+ ]
5049
+ }
5050
+ },
5051
+ "warnings": {
5052
+ "type": "array",
5053
+ "items": {
5054
+ "type": "string"
5055
+ }
5056
+ }
5057
+ },
5058
+ "required": [
5059
+ "key",
5060
+ "outcome"
5061
+ ],
5062
+ "additionalProperties": false
5063
+ }
5064
+ }
5065
+ },
5066
+ "required": [
5067
+ "ops"
5068
+ ],
5069
+ "additionalProperties": false,
5070
+ "$schema": "http://json-schema.org/draft-07/schema#"
5071
+ },
5072
+ "result": {
5073
+ "$schema": "http://json-schema.org/draft-07/schema#",
5074
+ "type": "object",
5075
+ "anyOf": [
5076
+ {
5077
+ "type": "object",
5078
+ "properties": {
5079
+ "status": {
5080
+ "const": "ok"
5081
+ },
5082
+ "operation": {
5083
+ "type": "object",
5084
+ "properties": {
5085
+ "operationId": {
5086
+ "type": "string",
5087
+ "const": "tinycloud.apps.write"
5088
+ },
5089
+ "operationVersion": {
5090
+ "type": "integer",
5091
+ "const": 1
5092
+ }
5093
+ },
5094
+ "required": [
5095
+ "operationId",
5096
+ "operationVersion"
5097
+ ],
5098
+ "additionalProperties": false
5099
+ },
5100
+ "context": {
5101
+ "type": "object",
5102
+ "properties": {
5103
+ "profile": {
5104
+ "type": "string",
5105
+ "minLength": 1
5106
+ },
5107
+ "host": {
5108
+ "type": "string",
5109
+ "minLength": 1
5110
+ },
5111
+ "posture": {
5112
+ "type": "string",
5113
+ "enum": [
5114
+ "owner-openkey",
5115
+ "delegate-session",
5116
+ "local-owner-key",
5117
+ "unauthenticated"
5118
+ ]
5119
+ },
5120
+ "operatorType": {
5121
+ "type": "string",
5122
+ "enum": [
5123
+ "human",
5124
+ "agent"
5125
+ ]
5126
+ },
5127
+ "principalDid": {
5128
+ "type": "string",
5129
+ "minLength": 1
5130
+ },
5131
+ "sessionDid": {
5132
+ "type": "string",
5133
+ "minLength": 1
5134
+ },
5135
+ "ownerDid": {
5136
+ "type": "string",
5137
+ "minLength": 1
5138
+ },
5139
+ "space": {
5140
+ "type": "string",
5141
+ "minLength": 1
5142
+ }
5143
+ },
5144
+ "required": [
5145
+ "profile",
5146
+ "host",
5147
+ "posture"
5148
+ ],
5149
+ "additionalProperties": false
5150
+ },
5151
+ "warnings": {
5152
+ "type": "array",
5153
+ "minItems": 1,
5154
+ "items": {
5155
+ "type": "object",
5156
+ "properties": {
5157
+ "code": {
5158
+ "const": "STORED_GRANT_SKIPPED"
5159
+ },
5160
+ "reason": {
5161
+ "type": "string",
5162
+ "enum": [
5163
+ "malformed",
5164
+ "unbound",
5165
+ "outside_request",
5166
+ "host_mismatch",
5167
+ "expired",
5168
+ "cid_mismatch",
5169
+ "authority_invalid",
5170
+ "proof_missing",
5171
+ "proof_invalid",
5172
+ "owner_mismatch",
5173
+ "audience_mismatch",
5174
+ "resources_mismatch",
5175
+ "unsupported",
5176
+ "activation_rejected",
5177
+ "activation_unavailable",
5178
+ "activation_unauthenticated",
5179
+ "invalid"
5180
+ ]
5181
+ },
5182
+ "grantCid": {
5183
+ "type": "string",
5184
+ "pattern": "^bafkr4i[a-z2-7]{52}$"
5185
+ }
5186
+ },
5187
+ "required": [
5188
+ "code",
5189
+ "reason"
5190
+ ],
5191
+ "additionalProperties": false
5192
+ }
5193
+ },
5194
+ "output": {
5195
+ "$ref": "#/$defs/output"
5196
+ }
5197
+ },
5198
+ "required": [
5199
+ "status",
5200
+ "operation",
5201
+ "context",
5202
+ "output"
5203
+ ],
5204
+ "additionalProperties": false
5205
+ },
5206
+ {
5207
+ "type": "object",
5208
+ "properties": {
5209
+ "status": {
5210
+ "const": "authority_required"
5211
+ },
5212
+ "operation": {
5213
+ "type": "object",
5214
+ "properties": {
5215
+ "operationId": {
5216
+ "type": "string",
5217
+ "const": "tinycloud.apps.write"
5218
+ },
5219
+ "operationVersion": {
5220
+ "type": "integer",
5221
+ "const": 1
5222
+ }
5223
+ },
5224
+ "required": [
5225
+ "operationId",
5226
+ "operationVersion"
5227
+ ],
5228
+ "additionalProperties": false
5229
+ },
5230
+ "context": {
5231
+ "type": "object",
5232
+ "properties": {
5233
+ "profile": {
5234
+ "type": "string",
5235
+ "minLength": 1
5236
+ },
5237
+ "host": {
5238
+ "type": "string",
5239
+ "minLength": 1
5240
+ },
5241
+ "posture": {
5242
+ "type": "string",
5243
+ "enum": [
5244
+ "owner-openkey",
5245
+ "delegate-session",
5246
+ "local-owner-key",
5247
+ "unauthenticated"
5248
+ ]
5249
+ },
5250
+ "operatorType": {
5251
+ "type": "string",
5252
+ "enum": [
5253
+ "human",
5254
+ "agent"
5255
+ ]
5256
+ },
5257
+ "principalDid": {
5258
+ "type": "string",
5259
+ "minLength": 1
5260
+ },
5261
+ "sessionDid": {
5262
+ "type": "string",
5263
+ "minLength": 1
5264
+ },
5265
+ "ownerDid": {
5266
+ "type": "string",
5267
+ "minLength": 1
5268
+ },
5269
+ "space": {
5270
+ "type": "string",
5271
+ "minLength": 1
5272
+ }
5273
+ },
5274
+ "required": [
5275
+ "profile",
5276
+ "host",
5277
+ "posture"
5278
+ ],
5279
+ "additionalProperties": false
5280
+ },
5281
+ "warnings": {
5282
+ "type": "array",
5283
+ "minItems": 1,
5284
+ "items": {
5285
+ "type": "object",
5286
+ "properties": {
5287
+ "code": {
5288
+ "const": "STORED_GRANT_SKIPPED"
5289
+ },
5290
+ "reason": {
5291
+ "type": "string",
5292
+ "enum": [
5293
+ "malformed",
5294
+ "unbound",
5295
+ "outside_request",
5296
+ "host_mismatch",
5297
+ "expired",
5298
+ "cid_mismatch",
5299
+ "authority_invalid",
5300
+ "proof_missing",
5301
+ "proof_invalid",
5302
+ "owner_mismatch",
5303
+ "audience_mismatch",
5304
+ "resources_mismatch",
5305
+ "unsupported",
5306
+ "activation_rejected",
5307
+ "activation_unavailable",
5308
+ "activation_unauthenticated",
5309
+ "invalid"
5310
+ ]
5311
+ },
5312
+ "grantCid": {
5313
+ "type": "string",
5314
+ "pattern": "^bafkr4i[a-z2-7]{52}$"
5315
+ }
5316
+ },
5317
+ "required": [
5318
+ "code",
5319
+ "reason"
5320
+ ],
5321
+ "additionalProperties": false
5322
+ }
5323
+ },
5324
+ "missing": {
5325
+ "type": "array",
5326
+ "minItems": 1,
5327
+ "items": {
5328
+ "$ref": "#/$defs/permissionEntry"
5329
+ }
5330
+ },
5331
+ "request": {
5332
+ "$ref": "#/$defs/permissionRequest"
5333
+ },
5334
+ "approval": {
5335
+ "type": "object",
5336
+ "properties": {
5337
+ "kind": {
5338
+ "const": "openkey"
5339
+ },
5340
+ "requestId": {
5341
+ "type": "string",
5342
+ "minLength": 1
5343
+ },
5344
+ "url": {
5345
+ "type": "string",
5346
+ "format": "uri"
5347
+ },
5348
+ "fallback": {
5349
+ "type": "string",
5350
+ "minLength": 1
5351
+ }
5352
+ },
5353
+ "required": [
5354
+ "kind",
5355
+ "requestId",
5356
+ "fallback"
5357
+ ],
5358
+ "additionalProperties": false
5359
+ },
5360
+ "retry": {
5361
+ "type": "object",
5362
+ "properties": {
5363
+ "operationId": {
5364
+ "type": "string",
5365
+ "minLength": 1
5366
+ },
5367
+ "operationVersion": {
5368
+ "type": "integer",
5369
+ "const": 1
5370
+ },
5371
+ "inputDigest": {
5372
+ "type": "string",
5373
+ "pattern": "^[a-f0-9]{64}$"
5374
+ },
5375
+ "safeInput": {
5376
+ "type": "object",
5377
+ "additionalProperties": true
5378
+ },
5379
+ "requiresCallerInput": {
5380
+ "type": "boolean"
5381
+ }
5382
+ },
5383
+ "required": [
5384
+ "operationId",
5385
+ "operationVersion",
5386
+ "inputDigest",
5387
+ "requiresCallerInput"
5388
+ ],
5389
+ "additionalProperties": false
5390
+ }
5391
+ },
5392
+ "required": [
5393
+ "status",
5394
+ "operation",
5395
+ "context",
5396
+ "missing",
5397
+ "request",
5398
+ "approval",
5399
+ "retry"
5400
+ ],
5401
+ "additionalProperties": false
5402
+ },
5403
+ {
5404
+ "type": "object",
5405
+ "properties": {
5406
+ "status": {
5407
+ "const": "setup_required"
5408
+ },
5409
+ "operation": {
5410
+ "type": "object",
5411
+ "properties": {
5412
+ "operationId": {
5413
+ "type": "string",
5414
+ "const": "tinycloud.apps.write"
5415
+ },
5416
+ "operationVersion": {
5417
+ "type": "integer",
5418
+ "const": 1
5419
+ }
5420
+ },
5421
+ "required": [
5422
+ "operationId",
5423
+ "operationVersion"
5424
+ ],
5425
+ "additionalProperties": false
5426
+ },
5427
+ "context": {
5428
+ "type": "object",
5429
+ "properties": {
5430
+ "profile": {
5431
+ "type": "string",
5432
+ "minLength": 1
5433
+ },
5434
+ "host": {
5435
+ "type": "string",
5436
+ "minLength": 1
5437
+ },
5438
+ "posture": {
5439
+ "type": "string",
5440
+ "enum": [
5441
+ "owner-openkey",
5442
+ "delegate-session",
5443
+ "local-owner-key",
5444
+ "unauthenticated"
5445
+ ]
5446
+ },
5447
+ "operatorType": {
5448
+ "type": "string",
5449
+ "enum": [
5450
+ "human",
5451
+ "agent"
5452
+ ]
5453
+ },
5454
+ "principalDid": {
5455
+ "type": "string",
5456
+ "minLength": 1
5457
+ },
5458
+ "sessionDid": {
5459
+ "type": "string",
5460
+ "minLength": 1
5461
+ },
5462
+ "ownerDid": {
5463
+ "type": "string",
5464
+ "minLength": 1
5465
+ },
5466
+ "space": {
5467
+ "type": "string",
5468
+ "minLength": 1
5469
+ }
5470
+ },
5471
+ "required": [
5472
+ "profile",
5473
+ "host",
5474
+ "posture"
5475
+ ],
5476
+ "additionalProperties": false
5477
+ },
5478
+ "warnings": {
5479
+ "type": "array",
5480
+ "minItems": 1,
5481
+ "items": {
5482
+ "type": "object",
5483
+ "properties": {
5484
+ "code": {
5485
+ "const": "STORED_GRANT_SKIPPED"
5486
+ },
5487
+ "reason": {
5488
+ "type": "string",
5489
+ "enum": [
5490
+ "malformed",
5491
+ "unbound",
5492
+ "outside_request",
5493
+ "host_mismatch",
5494
+ "expired",
5495
+ "cid_mismatch",
5496
+ "authority_invalid",
5497
+ "proof_missing",
5498
+ "proof_invalid",
5499
+ "owner_mismatch",
5500
+ "audience_mismatch",
5501
+ "resources_mismatch",
5502
+ "unsupported",
5503
+ "activation_rejected",
5504
+ "activation_unavailable",
5505
+ "activation_unauthenticated",
5506
+ "invalid"
5507
+ ]
5508
+ },
5509
+ "grantCid": {
5510
+ "type": "string",
5511
+ "pattern": "^bafkr4i[a-z2-7]{52}$"
5512
+ }
5513
+ },
5514
+ "required": [
5515
+ "code",
5516
+ "reason"
5517
+ ],
5518
+ "additionalProperties": false
5519
+ }
5520
+ },
5521
+ "setup": {
5522
+ "type": "object",
5523
+ "properties": {
5524
+ "kind": {
5525
+ "const": "secret_manager"
5526
+ },
5527
+ "action": {
5528
+ "const": "add_secret"
5529
+ },
5530
+ "url": {
5531
+ "type": "string",
5532
+ "format": "uri"
5533
+ },
5534
+ "names": {
5535
+ "type": "array",
5536
+ "minItems": 1,
5537
+ "maxItems": 10,
5538
+ "items": {
5539
+ "type": "string",
5540
+ "minLength": 1
5541
+ }
5542
+ },
5543
+ "scope": {
5544
+ "type": "string",
5545
+ "minLength": 1
5546
+ },
5547
+ "owner": {
5548
+ "type": "string",
5549
+ "minLength": 1
5550
+ },
5551
+ "secret": {
5552
+ "type": "object",
5553
+ "properties": {
5554
+ "name": {
5555
+ "type": "string",
5556
+ "minLength": 1
5557
+ },
5558
+ "scope": {
5559
+ "type": "string",
5560
+ "minLength": 1
5561
+ },
5562
+ "space": {
5563
+ "type": "string",
5564
+ "minLength": 1
5565
+ }
5566
+ },
5567
+ "required": [
5568
+ "name",
5569
+ "space"
5570
+ ],
5571
+ "additionalProperties": false
5572
+ },
5573
+ "message": {
5574
+ "type": "string",
5575
+ "minLength": 1
5576
+ }
5577
+ },
5578
+ "required": [
5579
+ "kind",
5580
+ "action",
5581
+ "url",
5582
+ "names",
5583
+ "owner",
5584
+ "secret",
5585
+ "message"
5586
+ ],
5587
+ "additionalProperties": false
5588
+ },
5589
+ "retry": {
5590
+ "type": "object",
5591
+ "properties": {
5592
+ "operationId": {
5593
+ "type": "string",
5594
+ "minLength": 1
5595
+ },
5596
+ "operationVersion": {
5597
+ "type": "integer",
5598
+ "const": 1
5599
+ },
5600
+ "inputDigest": {
5601
+ "type": "string",
5602
+ "pattern": "^[a-f0-9]{64}$"
5603
+ },
5604
+ "safeInput": {
5605
+ "type": "object",
5606
+ "additionalProperties": true
5607
+ },
5608
+ "requiresCallerInput": {
5609
+ "type": "boolean"
5610
+ }
5611
+ },
5612
+ "required": [
5613
+ "operationId",
5614
+ "operationVersion",
5615
+ "inputDigest",
5616
+ "requiresCallerInput"
5617
+ ],
5618
+ "additionalProperties": false
5619
+ }
5620
+ },
5621
+ "required": [
5622
+ "status",
5623
+ "operation",
5624
+ "context",
5625
+ "setup",
5626
+ "retry"
5627
+ ],
5628
+ "additionalProperties": false
5629
+ },
5630
+ {
5631
+ "type": "object",
5632
+ "properties": {
5633
+ "status": {
5634
+ "const": "error"
5635
+ },
5636
+ "operation": {
5637
+ "type": "object",
5638
+ "properties": {
5639
+ "operationId": {
5640
+ "type": "string",
5641
+ "const": "tinycloud.apps.write"
5642
+ },
5643
+ "operationVersion": {
5644
+ "type": "integer",
5645
+ "const": 1
5646
+ }
5647
+ },
5648
+ "required": [
5649
+ "operationId",
5650
+ "operationVersion"
5651
+ ],
5652
+ "additionalProperties": false
5653
+ },
5654
+ "context": {
5655
+ "type": "object",
5656
+ "properties": {
5657
+ "profile": {
5658
+ "type": "string",
5659
+ "minLength": 1
5660
+ },
5661
+ "host": {
5662
+ "type": "string",
5663
+ "minLength": 1
5664
+ },
5665
+ "posture": {
5666
+ "type": "string",
5667
+ "enum": [
5668
+ "owner-openkey",
5669
+ "delegate-session",
5670
+ "local-owner-key",
5671
+ "unauthenticated"
5672
+ ]
5673
+ },
5674
+ "operatorType": {
5675
+ "type": "string",
5676
+ "enum": [
5677
+ "human",
5678
+ "agent"
5679
+ ]
5680
+ },
5681
+ "principalDid": {
5682
+ "type": "string",
5683
+ "minLength": 1
5684
+ },
5685
+ "sessionDid": {
5686
+ "type": "string",
5687
+ "minLength": 1
5688
+ },
5689
+ "ownerDid": {
5690
+ "type": "string",
5691
+ "minLength": 1
5692
+ },
5693
+ "space": {
5694
+ "type": "string",
5695
+ "minLength": 1
5696
+ }
5697
+ },
5698
+ "required": [
5699
+ "profile",
5700
+ "host",
5701
+ "posture"
5702
+ ],
5703
+ "additionalProperties": false
5704
+ },
5705
+ "warnings": {
5706
+ "type": "array",
5707
+ "minItems": 1,
5708
+ "items": {
5709
+ "type": "object",
5710
+ "properties": {
5711
+ "code": {
5712
+ "const": "STORED_GRANT_SKIPPED"
5713
+ },
5714
+ "reason": {
5715
+ "type": "string",
5716
+ "enum": [
5717
+ "malformed",
5718
+ "unbound",
5719
+ "outside_request",
5720
+ "host_mismatch",
5721
+ "expired",
5722
+ "cid_mismatch",
5723
+ "authority_invalid",
5724
+ "proof_missing",
5725
+ "proof_invalid",
5726
+ "owner_mismatch",
5727
+ "audience_mismatch",
5728
+ "resources_mismatch",
5729
+ "unsupported",
5730
+ "activation_rejected",
5731
+ "activation_unavailable",
5732
+ "activation_unauthenticated",
5733
+ "invalid"
5734
+ ]
5735
+ },
5736
+ "grantCid": {
5737
+ "type": "string",
5738
+ "pattern": "^bafkr4i[a-z2-7]{52}$"
5739
+ }
5740
+ },
5741
+ "required": [
5742
+ "code",
5743
+ "reason"
5744
+ ],
5745
+ "additionalProperties": false
5746
+ }
5747
+ },
5748
+ "error": {
5749
+ "type": "object",
5750
+ "properties": {
5751
+ "code": {
5752
+ "type": "string",
5753
+ "enum": [
5754
+ "INPUT_INVALID",
5755
+ "OPERATION_NOT_FOUND",
5756
+ "OPERATION_VERSION_UNSUPPORTED",
5757
+ "PROFILE_NOT_FOUND",
5758
+ "PROFILE_POSTURE_NOT_ALLOWED",
5759
+ "PROFILE_OWNER_OPT_IN_REQUIRED",
5760
+ "PROFILE_MIGRATION_REQUIRED",
5761
+ "AUTH_REQUIRED",
5762
+ "PERMISSION_DENIED",
5763
+ "SESSION_NOT_FOUND",
5764
+ "PERMISSION_HINT_INVALID",
5765
+ "DELEGATION_ARTIFACT_INVALID",
5766
+ "DELEGATION_EXPIRED",
5767
+ "DELEGATION_AUDIENCE_MISMATCH",
5768
+ "DELEGATION_HOST_MISMATCH",
5769
+ "DELEGATION_REJECTED",
5770
+ "ENCRYPTION_NETWORK_UNRESOLVED",
5771
+ "NODE_UNREACHABLE",
5772
+ "NODE_ERROR",
5773
+ "STORAGE_QUOTA_EXCEEDED",
5774
+ "KV_NOT_FOUND",
5775
+ "KV_PRECONDITION_FAILED",
5776
+ "KV_CONFLICT",
5777
+ "KV_RESPONSE_TOO_LARGE",
5778
+ "SQL_QUERY_INVALID",
5779
+ "SQL_EXECUTION_FAILED",
5780
+ "SQL_RESULT_LIMIT_EXCEEDED",
5781
+ "SQL_VALUE_UNSAFE",
5782
+ "SECRET_READ_FAILED",
5783
+ "SECRET_DECRYPT_FAILED",
5784
+ "OUTPUT_INVALID",
5785
+ "INTERNAL_ERROR"
5786
+ ]
5787
+ },
5788
+ "message": {
5789
+ "type": "string",
5790
+ "minLength": 1
5791
+ },
5792
+ "retryable": {
5793
+ "type": "boolean"
5794
+ },
5795
+ "details": {
5796
+ "type": "object",
5797
+ "additionalProperties": true
5798
+ }
5799
+ },
5800
+ "required": [
5801
+ "code",
5802
+ "message",
5803
+ "retryable"
5804
+ ],
5805
+ "additionalProperties": false
5806
+ }
5807
+ },
5808
+ "required": [
5809
+ "status",
5810
+ "operation",
5811
+ "context",
5812
+ "error"
5813
+ ],
5814
+ "additionalProperties": false
5815
+ }
5816
+ ],
5817
+ "$defs": {
5818
+ "permissionEntry": {
5819
+ "type": "object",
5820
+ "properties": {
5821
+ "service": {
5822
+ "type": "string",
5823
+ "minLength": 1
5824
+ },
5825
+ "space": {
5826
+ "type": "string",
5827
+ "minLength": 1
5828
+ },
5829
+ "path": {
5830
+ "type": "string"
5831
+ },
5832
+ "actions": {
5833
+ "type": "array",
5834
+ "items": {
5835
+ "type": "string",
5836
+ "minLength": 1
5837
+ },
5838
+ "minItems": 1
5839
+ },
5840
+ "caveats": {
5841
+ "type": "array",
5842
+ "items": {
5843
+ "type": "object",
5844
+ "additionalProperties": {}
5845
+ }
5846
+ },
5847
+ "skipPrefix": {
5848
+ "type": "boolean"
5849
+ },
5850
+ "expiry": {
5851
+ "type": "string",
5852
+ "minLength": 1
5853
+ },
5854
+ "description": {
5855
+ "type": "string"
5856
+ }
5857
+ },
5858
+ "required": [
5859
+ "service",
5860
+ "path",
5861
+ "actions"
5862
+ ],
5863
+ "additionalProperties": false,
5864
+ "$schema": "http://json-schema.org/draft-07/schema#"
5865
+ },
5866
+ "permissionRequest": {
5867
+ "type": "object",
5868
+ "properties": {
5869
+ "kind": {
5870
+ "type": "string",
5871
+ "const": "tinycloud.auth.request"
5872
+ },
5873
+ "version": {
5874
+ "type": "number",
5875
+ "const": 1
5876
+ },
5877
+ "requestId": {
5878
+ "type": "string",
5879
+ "minLength": 1
5880
+ },
5881
+ "createdAt": {
5882
+ "type": "string",
5883
+ "format": "date-time"
5884
+ },
5885
+ "profile": {
5886
+ "type": "string",
5887
+ "minLength": 1
5888
+ },
5889
+ "posture": {
5890
+ "type": "string",
5891
+ "enum": [
5892
+ "owner-openkey",
5893
+ "delegate-session",
5894
+ "local-owner-key",
5895
+ "unauthenticated"
5896
+ ]
5897
+ },
5898
+ "operatorType": {
5899
+ "type": "string",
5900
+ "enum": [
5901
+ "human",
5902
+ "agent"
5903
+ ]
5904
+ },
5905
+ "host": {
5906
+ "type": "string",
5907
+ "minLength": 1
5908
+ },
5909
+ "sessionDid": {
5910
+ "type": "string",
5911
+ "minLength": 1
5912
+ },
5913
+ "ownerDid": {
5914
+ "type": "string",
5915
+ "minLength": 1
5916
+ },
5917
+ "spaceId": {
5918
+ "type": "string",
5919
+ "minLength": 1
5920
+ },
5921
+ "requestedExpiry": {
5922
+ "anyOf": [
5923
+ {
5924
+ "type": "string",
5925
+ "minLength": 1
5926
+ },
5927
+ {
5928
+ "type": "number"
5929
+ }
5930
+ ]
5931
+ },
5932
+ "requested": {
5933
+ "type": "array",
5934
+ "items": {
5935
+ "type": "object",
5936
+ "properties": {
5937
+ "service": {
5938
+ "type": "string",
5939
+ "minLength": 1
5940
+ },
5941
+ "space": {
5942
+ "type": "string",
5943
+ "minLength": 1
5944
+ },
5945
+ "path": {
5946
+ "type": "string"
5947
+ },
5948
+ "actions": {
5949
+ "type": "array",
5950
+ "items": {
5951
+ "type": "string",
5952
+ "minLength": 1
5953
+ },
5954
+ "minItems": 1
5955
+ },
5956
+ "caveats": {
5957
+ "type": "array",
5958
+ "items": {
5959
+ "type": "object",
5960
+ "additionalProperties": {}
5961
+ }
5962
+ },
5963
+ "skipPrefix": {
5964
+ "type": "boolean"
5965
+ },
5966
+ "expiry": {
5967
+ "type": "string",
5968
+ "minLength": 1
5969
+ },
5970
+ "description": {
5971
+ "type": "string"
5972
+ }
5973
+ },
5974
+ "required": [
5975
+ "service",
5976
+ "path",
5977
+ "actions"
5978
+ ],
5979
+ "additionalProperties": false
5980
+ }
5981
+ },
5982
+ "command": {
5983
+ "type": "object",
5984
+ "properties": {
5985
+ "argv": {
5986
+ "type": "array",
5987
+ "items": {
5988
+ "type": "string"
5989
+ },
5990
+ "minItems": 1
5991
+ },
5992
+ "cwd": {
5993
+ "type": "string",
5994
+ "minLength": 1
5995
+ }
5996
+ },
5997
+ "required": [
5998
+ "argv",
5999
+ "cwd"
6000
+ ],
6001
+ "additionalProperties": false
6002
+ }
6003
+ },
6004
+ "required": [
6005
+ "kind",
6006
+ "version",
6007
+ "requestId",
6008
+ "createdAt",
6009
+ "profile",
6010
+ "posture",
6011
+ "operatorType",
6012
+ "host",
6013
+ "sessionDid",
6014
+ "requested"
6015
+ ],
6016
+ "additionalProperties": false,
6017
+ "$schema": "http://json-schema.org/draft-07/schema#"
6018
+ },
6019
+ "output": {
6020
+ "type": "object",
6021
+ "properties": {
6022
+ "ops": {
6023
+ "type": "array",
6024
+ "items": {
6025
+ "type": "object",
6026
+ "properties": {
6027
+ "key": {
6028
+ "type": "string"
6029
+ },
6030
+ "outcome": {
6031
+ "type": "string",
6032
+ "enum": [
6033
+ "ok",
6034
+ "EXISTS",
6035
+ "CHANGED",
6036
+ "CATALOG_CHANGE",
6037
+ "INVALID",
6038
+ "NOT_FOUND",
6039
+ "TIMEZONE_REQUIRED",
6040
+ "INPUT_INVALID",
6041
+ "OPERATION_NOT_FOUND",
6042
+ "OPERATION_VERSION_UNSUPPORTED",
6043
+ "PROFILE_NOT_FOUND",
6044
+ "PROFILE_POSTURE_NOT_ALLOWED",
6045
+ "PROFILE_OWNER_OPT_IN_REQUIRED",
6046
+ "PROFILE_MIGRATION_REQUIRED",
6047
+ "AUTH_REQUIRED",
6048
+ "PERMISSION_DENIED",
6049
+ "SESSION_NOT_FOUND",
6050
+ "PERMISSION_HINT_INVALID",
6051
+ "DELEGATION_ARTIFACT_INVALID",
6052
+ "DELEGATION_EXPIRED",
6053
+ "DELEGATION_AUDIENCE_MISMATCH",
6054
+ "DELEGATION_HOST_MISMATCH",
6055
+ "DELEGATION_REJECTED",
6056
+ "ENCRYPTION_NETWORK_UNRESOLVED",
6057
+ "NODE_UNREACHABLE",
6058
+ "NODE_ERROR",
6059
+ "STORAGE_QUOTA_EXCEEDED",
6060
+ "KV_NOT_FOUND",
6061
+ "KV_PRECONDITION_FAILED",
6062
+ "KV_CONFLICT",
6063
+ "KV_RESPONSE_TOO_LARGE",
6064
+ "SQL_QUERY_INVALID",
6065
+ "SQL_EXECUTION_FAILED",
6066
+ "SQL_RESULT_LIMIT_EXCEEDED",
6067
+ "SQL_VALUE_UNSAFE",
6068
+ "SECRET_READ_FAILED",
6069
+ "SECRET_DECRYPT_FAILED",
6070
+ "OUTPUT_INVALID",
6071
+ "INTERNAL_ERROR"
6072
+ ]
6073
+ },
6074
+ "etag": {
6075
+ "type": "string"
6076
+ },
6077
+ "value": {
6078
+ "type": "object",
6079
+ "additionalProperties": {
6080
+ "anyOf": [
6081
+ {
6082
+ "type": "null"
6083
+ },
6084
+ {
6085
+ "type": "boolean"
6086
+ },
6087
+ {
6088
+ "type": "number"
6089
+ },
6090
+ {
6091
+ "type": "string"
6092
+ },
6093
+ {
6094
+ "type": "array",
6095
+ "items": {
6096
+ "$ref": "#/$defs/output/properties/ops/items/properties/value/additionalProperties"
6097
+ }
6098
+ },
6099
+ {
6100
+ "type": "object",
6101
+ "additionalProperties": {
6102
+ "$ref": "#/$defs/output/properties/ops/items/properties/value/additionalProperties"
6103
+ }
6104
+ }
6105
+ ]
6106
+ }
6107
+ },
6108
+ "steps": {
6109
+ "type": "array",
6110
+ "items": {
6111
+ "type": "string",
6112
+ "enum": [
6113
+ "written",
6114
+ "deleted"
6115
+ ]
6116
+ }
6117
+ },
6118
+ "warnings": {
6119
+ "type": "array",
6120
+ "items": {
6121
+ "type": "string"
6122
+ }
6123
+ }
6124
+ },
6125
+ "required": [
6126
+ "key",
6127
+ "outcome"
6128
+ ],
6129
+ "additionalProperties": false
6130
+ }
6131
+ }
6132
+ },
6133
+ "required": [
6134
+ "ops"
6135
+ ],
6136
+ "additionalProperties": false,
6137
+ "$schema": "http://json-schema.org/draft-07/schema#"
6138
+ }
6139
+ }
6140
+ },
6141
+ "postures": [
6142
+ "owner-openkey",
6143
+ "delegate-session",
6144
+ "local-owner-key"
6145
+ ],
6146
+ "effects": [
6147
+ "destructive"
6148
+ ],
6149
+ "sensitivity": {
6150
+ "input": true,
6151
+ "output": true
6152
+ },
6153
+ "exposure": {
6154
+ "cli": {
6155
+ "status": "excluded",
6156
+ "reason": "Personal apps use the hosted connector; the CLI skill keeps its existing commands."
6157
+ },
6158
+ "mcp": {
6159
+ "status": "required"
6160
+ },
6161
+ "skill": {
6162
+ "status": "required"
6163
+ },
6164
+ "docs": {
6165
+ "status": "required"
6166
+ }
6167
+ },
6168
+ "stableErrors": [
6169
+ "INPUT_INVALID",
6170
+ "OPERATION_NOT_FOUND",
6171
+ "OPERATION_VERSION_UNSUPPORTED",
6172
+ "PROFILE_NOT_FOUND",
6173
+ "PROFILE_POSTURE_NOT_ALLOWED",
6174
+ "PROFILE_OWNER_OPT_IN_REQUIRED",
6175
+ "PROFILE_MIGRATION_REQUIRED",
6176
+ "AUTH_REQUIRED",
6177
+ "PERMISSION_DENIED",
6178
+ "SESSION_NOT_FOUND",
6179
+ "PERMISSION_HINT_INVALID",
6180
+ "DELEGATION_ARTIFACT_INVALID",
6181
+ "DELEGATION_EXPIRED",
6182
+ "DELEGATION_AUDIENCE_MISMATCH",
6183
+ "DELEGATION_HOST_MISMATCH",
6184
+ "DELEGATION_REJECTED",
6185
+ "ENCRYPTION_NETWORK_UNRESOLVED",
6186
+ "NODE_UNREACHABLE",
6187
+ "NODE_ERROR",
6188
+ "STORAGE_QUOTA_EXCEEDED",
6189
+ "KV_NOT_FOUND",
6190
+ "KV_PRECONDITION_FAILED",
6191
+ "KV_CONFLICT",
6192
+ "KV_RESPONSE_TOO_LARGE",
6193
+ "SQL_QUERY_INVALID",
6194
+ "SQL_EXECUTION_FAILED",
6195
+ "SQL_RESULT_LIMIT_EXCEEDED",
6196
+ "SQL_VALUE_UNSAFE",
6197
+ "SECRET_READ_FAILED",
6198
+ "SECRET_DECRYPT_FAILED",
6199
+ "OUTPUT_INVALID",
6200
+ "INTERNAL_ERROR"
6201
+ ],
6202
+ "authority": {
6203
+ "dynamic": true
6204
+ }
6205
+ },
2338
6206
  {
2339
6207
  "id": "tinycloud.auth.capabilities",
2340
6208
  "version": 1,
@@ -7443,7 +11311,7 @@
7443
11311
  "id": "tinycloud.kv.delete",
7444
11312
  "version": 1,
7445
11313
  "title": "Delete a TinyCloud KV value",
7446
- "description": "Delete one exact KV key, optionally only when its ETag still matches.",
11314
+ "description": "Delete one exact KV key, optionally only when its ETag still matches. For personal records under xyz.tinycloud.agent-data/, use tinycloud_apps_write.",
7447
11315
  "input": {
7448
11316
  "type": "object",
7449
11317
  "properties": {
@@ -11966,7 +15834,7 @@
11966
15834
  "id": "tinycloud.kv.put",
11967
15835
  "version": 1,
11968
15836
  "title": "Write a TinyCloud KV value",
11969
- "description": "Create, conditionally replace, or explicitly upsert one exact KV key.",
15837
+ "description": "Create, conditionally replace, or explicitly upsert one exact KV key. For personal records under xyz.tinycloud.agent-data/, use tinycloud_apps_write.",
11970
15838
  "input": {
11971
15839
  "anyOf": [
11972
15840
  {